Description Usage Arguments Value Examples
The hestonSLVForwardOptionPricer
function evaluates a forward starting vanilla european option
under the Heston Stochastic Volatility model using Monte-Carlo simulations.
The option value and the implied Black-Scholes-Merton volatility are returned.
1 2 | hestonSLVForwardOptionPricer(referenceDate, strike, resetDate, optionType, maturityDate,
nSimulations, hestonProcess, leverageFunction)
|
referenceDate |
a date setting the reference date for the calculation |
strike |
the relative strike of the option. The absolute strike is spot value at reset date times the relative strike |
resetDate |
the reset date at which the absolute strike is fixed |
optionType |
a string with one of the values “call” or “put” |
maturityDate |
the maturity date |
nSimulation |
number of Monte-Carlo simulations used to calculate the option value |
hestonProcess |
the Heston model part of the HestonSLV specification |
leverageFunction |
the leverage function of the HestonSLV model |
The hestonSLVForwardOptionPricer
function returns a list with the following
components:
value |
Value of option |
impliedVol |
implied Black-Scholes-Merton volatility of the option |
1 2 3 4 5 6 7 8 9 10 11 | process <- HestonProcess(function(t,s) {0.05}, function(t,s) {0.02},
100, 0.09, 1.0, 0.06, 0.4, -0.75)
leverageFct <- function(t, s) { exp(-t)*(s+70)/100.0 }
s <- seq(0.7, 1.5, 0.1)
plot(s, sapply(s, function(strike) {
hestonSLVForwardOptionPricer(Sys.Date(), strike, Sys.Date()+182, "call", Sys.Date()+365,
4000, process, leverageFct)$impliedVol
}), type="b",lty=2, ylab="Implied Volatility",xlab="Strike"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.