- Joined
- 8/7/15
- Messages
- 92
- Points
- 18
I have been using so much time to make this function to work but I can't seem to find the problem. In world of no interest rate and no dividend I want to compute the theta of a call option
here is my code
Function theta(spot, strike, vol, T)
d1den = vol * Sqr(T)
d1num = Log(spot / strike) + (0.5 * vol ^ 2) * T
d1 = d1num / d1den
theta = -((spot * Application.NormDist(d1, 0, 1, False) * vol) / (2 * Sqr(T)))
What goes wrong here? I cant make it return any correct number.
for instance: spot = 100, strike = 105, vol = 0.1 and T =1 then the answer should be : -0.004965323. I can't replicate that number.
here is my code
Function theta(spot, strike, vol, T)
d1den = vol * Sqr(T)
d1num = Log(spot / strike) + (0.5 * vol ^ 2) * T
d1 = d1num / d1den
theta = -((spot * Application.NormDist(d1, 0, 1, False) * vol) / (2 * Sqr(T)))
What goes wrong here? I cant make it return any correct number.
for instance: spot = 100, strike = 105, vol = 0.1 and T =1 then the answer should be : -0.004965323. I can't replicate that number.