[R-SIG-Finance] American Option implied volatility

davidr at rhotrading.com davidr at rhotrading.com
Mon Jul 20 16:44:50 CEST 2009


Just a guess that entry #9 is causing a problem since the option value
is below parity, so there is no implied vol. Probably the function
should check that first before it tries to solve for vol.

David L. Reiner, PhD
Head Quant
Rho Trading Securities, LLC


-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch
[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Ravi S.
Shankar
Sent: Monday, July 20, 2009 4:38 AM
To: r-sig-finance at stat.math.ethz.ch
Subject: [R-SIG-Finance] American Option implied volatility

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}}

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.


This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof (collectively, "Rho Content") are confidential and proprietary to Rho Trading Securities, LLC ("Rho") and/or its affiliates, and are protected by intellectual property laws.  Without the prior written consent of Rho, the Rho Content may not (i) be disclosed to any third party or (ii) be reproduced or otherwise used by anyone other than current employees of Rho or its affiliates, on behalf of Rho or its affiliates.

THE RHO CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY KIND.  TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, RHO HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE RHO CONTENT, AND NEITHER RHO NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR INABILITY TO USE, ANY RHO CONTENT, EVEN IF RHO IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.



More information about the R-SIG-Finance mailing list