[R-SIG-Finance] fOptions and RQuantlib give different vanilla option premiums

Dirk Eddelbuettel edd at debian.org
Wed Mar 16 13:21:28 CET 2011


On 16 March 2011 at 10:16, Vladimir Vladimirov wrote:
| library(fOptions)
| library(RQuantLib)
| 
| > EuropeanOption(type="call", underlying=1.56, strike=1.6, dividendYield=0.06-0.08, riskFreeRate=0.06, maturity=1/2, volatility=0.12)
| Concise summary of valuation for EuropeanOption
|   value   delta   gamma    vega   theta     rho  divRho
|  0.0652  0.5912  2.9743  0.4343 -0.1220  0.4285 -0.4611
| 
| > GBSCharacteristics(TypeFlag = "c", S = 1.5600, X = 1.6000,  Time = 1/2, r = 0.06, b = 0.06-0.08, sigma = 0.12)
| $premium
| [1] 0.02909931
| $delta
| [1] 0.3403860
| $theta
| [1] -0.03494785
| $vega
| [1] 0.3942821
| $rho
| [1] 0.2509514
| $lambda
| [1] 18.24793
| $gamma
| [1] 2.700266

As Vladimir already said, you get indentical results if you call
EuropeanOption with *separate* values for divident yield and short rate:

R> EuropeanOption(type="call", underlying=1.56, strike=1.6, dividendYield=0.08, riskFreeRate=0.06, maturity=1/2, volatility=0.12)
Concise summary of valuation for EuropeanOption 
  value   delta   gamma    vega   theta     rho  divRho 
 0.0291  0.3404  2.7003  0.3943 -0.0349  0.2510 -0.2655 
R> 

Evidently both packages vary in whether the divident yield is given outright
(RQuantLib) or as a delta to the short term rate (fOptions).

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-SIG-Finance mailing list