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函数的要求看下,期权这玩意专业性太强了,实在帮助不到你
添加回答
举报
0/150
提交
取消