楼主: nicole喜隅安
202 0

[数据管理求助] 基于B-S期权计算期权价值对历史波动率的计算出现的问题 [推广有奖]

  • 1关注
  • 0粉丝

高中生

22%

还不是VIP/贵宾

-

威望
0
论坛币
1 个
通用积分
0.0000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
129 点
帖子
5
精华
0
在线时间
43 小时
注册时间
2021-11-2
最后登录
2023-6-1

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
各位老师好,目前想做计算可转债折价率。但计算理论价值中的期权价值部分出现了问题。首先筛选公告发行日T-2 前250个日期计算日波动率,在代入b-s公式计算期权价值

两个问题,我这种方式筛选出来的交易日期是否合理
第二个问题,我这个日波动率就百分之十几是不是有误
附上代码
merge m:1 id_stock        using         f_Conver_id_stock.dta
gen var3=date(发行公告日,"DMY")
format var3 %td
gen var5=date(TradingDate, "YMD")  //jiaoyiri
format var5 %td
gen var4=var3-2 //t-2
format var4 %td
gen day1 = var4-var5

replace earliest_date = v4_t2 - 350
keep if v5_trade >= earliest_date & v5_trade < v4_t2

dataex id Cnvtprc ClosePrice  sigema csd in 5/15
dataex id_stock v5_trade v4_t2 day1 earliest cp_lnst csd in 1/10

----------------------- copy starting from the next line -----------------------
  1. * Example generated by -dataex-. For more info, type help dataex
  2. clear
  3. input str12 id_stock float(v5_trade v4_t2 day1 earliest_date cp_lnst csd)
  4. "300723" 22259 22304  45 21954 .009554235 .12835492
  5. "300723" 22001 22304 303 21954 -.26990408 .12835492
  6. "300723" 22004 22304 300 21954 -.26745802 .12835492
  7. "300723" 22005 22304 299 21954 -.21316914 .12835492
  8. "300723" 22006 22304 298 21954 -.23263843 .12835492
  9. "300723" 22007 22304 297 21954  -.2163464 .12835492
  10. "300723" 22008 22304 296 21954   -.209431 .12835492
  11. "300723" 22011 22304 293 21954 -.24645425 .12835492
  12. "300723" 22012 22304 292 21954   -.201436 .12835492
  13. "300723" 22013 22304 291 21954  -.1669583 .12835492
  14. end
复制代码

------------------ copy up to and including the previous line ------------------


bys 证券简称 :gen cp_st_ = ClosePrice
bys 证券简称 :gen cp_st_1 = 0
replace cp_st_1=0 if n == 1
bys 证券简称 : replace cp_st_1 = ClosePrice[n-1] if n != 1

bys 证券简称 :gen cp_lnst = log(cp_st_ )-log(cp_st_1)
replace cp_lnst=ClosePrice if n == 1
replace cp_lnst=0 if n == 1
bys 证券简称 :replace cp_lnst = log(cp_st_ )-log(cp_st_1)

egen cpstmean =mean(cp_lnst),by(证券简称)
egen csd= sd(cp_lnst),by(证券简称)

bys id: egen sum = nvals(n)
gen day_2 = sqrt(sum)//根号天数
gen sigma = csd * day_2


----------------------- copy starting from the next line -----------------------
  1. * Example generated by -dataex-. For more info, type help dataex
  2. clear
  3. input str6 id double(Cnvtprc ClosePrice) float(sigema2 csd)
  4. "110048"  8.69  21.093  .005923446 .10884343
  5. "110052"  8.13   8.528    .0121633 .15596987
  6. "110053"   7.9   7.454 .0007878512 .03969512
  7. "110055"  17.6  60.715  .064305335  .3586233
  8. "110057" 10.09   92.68  .004099632  .0905498
  9. "110058"   6.5  65.732  .005691642 .10669248
  10. "110059" 15.05  164.25  .003549309  .0842533
  11. "110060"  7.24  55.875  .008393915 .12956786
  12. "110061"  9.92 189.026  .005772712 .10744964
  13. "110062" 25.99  88.207   .00362888 .08519249
  14. "110067"  8.77   8.962  .008355752 .12927298
  15. end
复制代码

------------------ copy up to and including the previous line ------------------

第一次发帖,本科水平。求助各位老师大神
二维码

扫码加我 拉你入群

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

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

关键词:历史波动率 期权计算 B-S 波动率 including 历史波动率计算 理论价值计算 stata操作

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

本版微信群
加好友,备注jltj
拉您入交流群

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

GMT+8, 2024-5-1 03:51