[R-SIG-Finance] American Option implied volatility

Ravi S. Shankar ravis at ambaresearch.com
Mon Jul 20 11:37:57 CEST 2009


Hi R,

I am estimating the implied volatility for American options.
I have split the data based on date. 
dat1[[i]]
         Date     Expiry Strike.Price Settle.Price   Spot  RF rate
Time
7  2007-01-03 2007-01-25          900         28.8 894.55 0.0848
0.06746032
8  2007-01-03 2007-01-25          880         40.0 894.55 0.0848
0.06746032
9  2007-01-03 2007-01-25          840         45.0 894.55 0.0848
0.06746032
10 2007-01-03 2007-01-25          940         11.0 894.55 0.0848
0.06746032
11 2007-01-03 2007-01-25          920         19.0 894.55 0.0848
0.06746032

But when I try 

apply(dat1[[i]],1,function(x){AmericanOptionImpliedVolatility.default("c
all",x[4],x[5],x[3],x[6],x[7],volatility=0.1,dividendYield=0)[[1]]})

I get Error in AmericanOptionImpliedVolatility.default("call", x[4],
x[5], x[3],  : 
  Exception: root not bracketed: f[1e-07,4] ->
[1.428540e+01,3.264693e+02]


 How do I resolve this? Any help would be appreciated

> sessionInfo()
R version 2.9.0 (2009-04-17) 
i386-pc-mingw32 

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets  methods
base     

other attached packages:
 [1] RQuantLib_0.2.11    Rcpp_0.6.5          fOptions_251.70
fSeries_251.70      nnet_7.2-46         mgcv_1.3-26
fBasics_240.10068.1
 [8] fCalendar_251.70    MASS_7.2-46         fEcofin_251.70
spatial_7.2-46     

loaded via a namespace (and not attached):
[1] tools_2.9.0


Thank you,
Ravi Shankar S 
This e-mail may contain confidential and/or privileged i...{{dropped:10}}



More information about the R-SIG-Finance mailing list