市场指数波动率降至历史低点:沪深300与中证500(附带程序)

论坛 期权论坛 期权     
合晶睿智   2018-4-29 00:04   2756   0



结论:波动率反映市场活跃程度,目前市场指数波动率降至历史低点,如果抄底买些什么呢? 个人而言,不仅需要赚取价格反弹,还有赚取波动率回升的品种,有哪些呢?
首先是含期权的品种,类如转债、无下折分级B(150023),以及某些分级B,如果反弹的话,这些品种不仅价格回升,溢价率同时也会回升。友情提示,试探性抄底的仓位不要超过50%!
%%基于Wind获取指数数据
StockList=['000300.SH']%。
w=windmatlab
[w_data,w_codes,w_fields,w_times]=w.wsd(StockList,'close','2004-12-31','2016-5-25');

IndexName='沪深300指数'

IndexPrice=w_data;
N=length(IndexPrice);
RetraceRatio=zeros(N,1);
%计算T,交T之前最大收益的回撤比例
for i=2:N
  C = max(IndexPrice(1:i));
  if C == IndexPrice(i)
  %若现在是最大,则回撤比例为0
    RetraceRatio(i) = 0;
  else
  %当前点与之前最高点回撤比例
    RetraceRatio(i) = (IndexPrice(i)-C)/C;
  end
end
%画图
IndexRate=price2ret(IndexPrice);%log收益率
IV20=NaN*zeros(N-1,1);%30日波动率
for i=20:N-1
  IV20(i)=std(IndexRate(i-19:i))*sqrt(244);
end
IV60=NaN*zeros(N-1,1);%60日波动率
for i=60:N-1
  IV60(i)=std(IndexRate(i-59:i))*sqrt(244);
end
IV120=NaN*zeros(N-1,1);%120日波动率
for i=120:N-1
  IV120(i)=std(IndexRate(i-119:i))*sqrt(244);
end
subplot(3,1,1)
plot(w_times,IndexPrice,'LineWidth',2.00);
xlabel('时间');
ylabel('指数')
xlim([w_times(1),w_times(end)])
dateaxis('x',17);
s=[IndexName,'价格']
title(s)
subplot(3,1,2)
plot(w_times,[NaN;IV20],'LineWidth',2.00);
hold on
plot(w_times,[NaN;IV60],'LineWidth',2.00);
plot(w_times,[NaN;IV120],'LineWidth',2.00);
xlabel('时间');
ylabel('指数波动率')
xlim([w_times(1),w_times(end)])
dateaxis('x',17);
s=[IndexName,'波动率'];
title(s)
legend('20交易日','60交易日','120交易日')

subplot(3,1,3)
fill([w_times;w_times(end)],[RetraceRatio;0],'r')
xlabel('时间')
ylabel('最大回撤')
dateaxis('x',17);
xlim([w_times(1),w_times(end)])
s=[IndexName,'最大回撤'];
title(s)
Matlab金融应用培训班:北京(2016年6月17-19日 )

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:39
帖子:1
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP