by John_Val » Fri Aug 28, 2009 9:59 am
I have data on about 25 option prices,both puts and calls, with maturities from 1 month to 9 months, and risk free rates for the same maturities. I want to estimate the volatility parameter(sigma). The formula for a call is SN(d1) - Ke^(-r(T-t))N(d2).
N(d1) is the integral of the standard normal curve from negative infinity to d1(=(ln(S/K) +(r+sigma^2/2(T-t))/sigma*sqr(T-t)).
I am having trouble with setting up the integral. I suppose you set it up numerically, but I don't know how to incorporate it into the NLLS general procedure.
If you could provide the code it would be greatly appreciated.