请选择 进入手机版 | 继续访问电脑版
楼主: lgcgj1713
2728 2

芝加哥商品期货交易所skew和vix指数计算(python语言实现) [推广有奖]

  • 0关注
  • 10粉丝

硕士生

30%

还不是VIP/贵宾

-

威望
0
论坛币
1444 个
通用积分
50.2184
学术水平
0 点
热心指数
5 点
信用等级
0 点
经验
11789 点
帖子
25
精华
0
在线时间
257 小时
注册时间
2017-11-5
最后登录
2024-3-28

lgcgj1713 学生认证  发表于 2019-4-22 10:41:41 |显示全部楼层 |坛友微信交流群
相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
芝加哥商品期货交易所发布的vix及skew指数无论在学术研究还是投资实务中均具有举足轻重的作用。本贴旨在提供以芝加哥商品期货交易所发布的计算白皮书为依据的上述两种指数的python计算源码,并以50etf期权为例子实现。以下附件中包含多个py文件,涵盖数据的预处理以及计算和指数绘图实现。计算步骤:
1.Determinination of options in SKEW portfolio.
   1.1Selection of option months: The near and next-term options are usually the first
and second SPX contract months. “Near-term” options must have at least one
week to expiration; this requirement is intended to minimize pricing anomalies that
might occur close to expiration. When the near-term options have less than a week
to expiration, SKEW “rolls” to the second and third SPX contract months. For
example, on the second Friday in June, SKEW would be calculated using SPX
options expiring in June and July. On the following Monday, July would replace
June as the “near-term” and August would replace July as the “next-term.”.
   1.2Calculation of time to expiration: The time to expiration of the selected options is
calculated next. This is needed to calculated interest rate factors and also to
interpolate between values at adjacent months to get the 30-day SKEW. The time
to expiration is expressed as a fraction of a year, based on the number of minutes
to expiration. The options are deemed to expire at 8:30 am Chicago time on the
third Friday and a year is deemed to have 365 days.
  1.3Interest rate used: The second piece of data to calculate interest rate discount
factors is the risk-free interest rate, r. r is the bond-equivalent yield of the U.S. Tbill
maturing closest to the expiration dates of relevant SPX options. As such, the
SKEW calculation may use different risk-free interest rates for near- and next-term
options.
  1.4Calculation of S&P 500 forward price and determination of at-the-money strike:
Similar to VIX, is calculated from at and out-of-the-money puts and calls. The atthe-
money strike is defined as the listed strike immediately below the S&P 500
forward price. To find the forward price, find the strike for which the difference
between the midquotes of the call and put is at a minimum. Then calculate the
forward price as
F = erT * (C – P) +K, where T is the time to expiration, C and P are the call and
put midquotes, and K is the strike at which minimum occurs.
2.Calculate SKEW for both near-term and next-term options
3.Calculate the 30-day weighted average of S1 and S 2.
Then take the difference between 100 and 10 times that weighted average to get
SKEW.
  SKEW = 100 − S = 100 −10 *( w S1 + (1− w) S2)

部分结果展示

部分结果展示

附件列表

附件列表

skew.zip (6.52 MB, 需要: RMB 199 元)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝


Terrence97 发表于 2020-1-16 11:27:14 |显示全部楼层 |坛友微信交流群
你好 买了你vix和skew指数的代码 有一些疑问可以问问您吗?这个代码为什么画了两次图,有一张图还是空的,还有一个问题,为什么要引入上海银行间同业拆放利率?

使用道具

群小群 发表于 2021-5-14 09:27:56 |显示全部楼层 |坛友微信交流群
Terrence97 发表于 2020-1-16 11:27
你好 买了你vix和skew指数的代码 有一些疑问可以问问您吗?这个代码为什么画了两次图,有一张图还是空的,还 ...
上海银行间同业拆借率表示R,就是无风险利率,一般用3%就可以

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加JingGuanBbs
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-17 04:46