i am trying to calculate the implied volatility in excel. This is funaction i am using:
=+_xlfn.STDEV.P(LN(INDEX($B$2:$B$486,MATCH(G3,$A$2:$A$486,0)):INDEX($B$2:$B$486,MATCH(G3,$A$2:$A$486,0)+30)/INDEX($B$2:$B$486,MATCH(G3,$A$2:$A$486,0)+1):INDEX($B$2:$B$486,MATCH(G3,$A$2:$A$486,0)+31))*SQRT(252))
G3
- price date
column A
- dates
Columns B
- Stock prices
Why is this not working?