为了账号安全,请及时绑定邮箱和手机立即绑定

请问为什么使用Excel VBA计算期权Option Greek的函数,返回值为#VALUE!

请问为什么使用Excel VBA计算期权Option Greek的函数,返回值为#VALUE!

临摹微笑 2022-03-31 15:15:18
Function BSOptionDelta(iopt, S, X, r, q, tyr, sigma)'iopt is the option type, 1 is call, -1 is put'X is the exercise price'r is the risk free rate'rfgn is the foreign interest rate, similar with the divident rate'tyr is the option life or maturity'sigma is the standard deviation of optionDim eqt, c, c1, c1d, c2, d, g As Double'd is the value of delta'g is the value of gamma'c is the option value'c1 is N(d1)'c2 is N(d2)'c1d is the N'(d1)eqt = Exp(-q * tyr)c = BSOptionV.BSOptionValue(iopt, S, X, r, q, tyr, sigma)c1 = Application.NormSDist(iopt * BSDOne(S, X, r, q, tyr, sigma))c1d = BlackScholesNdashOne.BSNdashDOne(iopt, S, X, r, q, tyr, sigma)c2 = Application.NormSDist(iopt * BSDTwo(S, X, r, q, tyr, sigma))d = iopt * eqt * c1g = eqt * c1d / (S * sigma * Sqr(tyr))BSOptionDelta = dEnd Function
查看完整描述

1 回答

?
跃然一笑

TA贡献1826条经验 获得超6个赞

BSDOne可能是调用的另外的自定义函数,计算过程未知,没办法帮你调试,你还是自己检查下参数的输入把,对照BSDOne函数的要求看下,期权这玩意专业性太强了,实在帮助不到你

查看完整回答
反对 回复 2022-04-06
  • 1 回答
  • 0 关注
  • 275 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号