Price a Plain-Vanilla Call with the Characteristic Function
Price a European plain-vanilla call with the characteric function.
callCF(cf, S, X, tau, r, q = 0, ..., implVol = FALSE, uniroot.control = list(), uniroot.info = FALSE) cfBSM(om, S, tau, r, q, v) cfMerton(om, S, tau, r, q, v, lambda, muJ, vJ) cfBates(om, S, tau, r, q, v0, vT, rho, k, sigma, lambda, muJ, vJ) cfHeston(om, S, tau, r, q, v0, vT, rho, k, sigma) cfVG(om, S, tau, r, q, nu, theta, sigma)
cf |
characteristic function |
S |
spot |
X |
strike |
tau |
time to maturity |
r |
the interest rate |
q |
the dividend rate |
... |
arguments passed to the characteristic function |
implVol |
logical: compute implied vol? |
uniroot.control |
A list. If there are elements named
|
uniroot.info |
logical; default is |
om |
a (usually complex) argument |
v0 |
a numeric vector of length one |
vT |
a numeric vector of length one |
v |
a numeric vector of length one |
rho |
a numeric vector of length one |
k |
a numeric vector of length one |
sigma |
a numeric vector of length one |
lambda |
a numeric vector of length one |
muJ |
a numeric vector of length one |
vJ |
a numeric vector of length one |
nu |
a numeric vector of length one |
theta |
a numeric vector of length one |
The function computes the value of a plain vanilla European call under
different models, using the representation of Bakshi/Madan. Put values
can be computed through put–call parity (see
putCallParity
).
If implVol
is TRUE
, the function will compute the
implied volatility necessary to obtain the same value under
Black–Scholes–Merton. The implied volatility is computed with
uniroot
from the stats package. The default search
interval is c(0.00001, 2)
; it can be changed through
uniroot.control
.
The function uses variances as inputs (not volatilities).
The function is not vectorised (but see the NMOF Manual for examples of how to efficiently price more than one option at once).
Returns the value of the call (numeric) under the respective model or,
if implVol
is TRUE
, a list of the value and the implied
volatility. (If, in addition, uniroot.info
is TRUE
, the
information provided by uniroot
is also returned.)
If implVol
is TRUE
, the function will return a list with
elements named value
and impliedVol
. Prior to version
0.26-3, the first element was named callPrice
.
Enrico Schumann
Bates, David S. (1996) Jumps and Stochastic Volatility: Exchange Rate Processes Implicit in Deutsche Mark Options. Review of Financial Studies 9 (1), 69–107.
Gilli, M., Maringer, D. and Schumann, E. (2019) Numerical Methods and Optimization in Finance. 2nd edition. Elsevier. https://www.elsevier.com/books/numerical-methods-and-optimization-in-finance/gilli/978-0-12-815065-8
Heston, S.L. (1993) A Closed-Form Solution for Options with Stochastic Volatility with Applications to Bonds and Currency options. Review of Financial Studies 6 (2), 327–343.
Schumann, E. (2019) Financial Optimisation with R (NMOF Manual). http://enricoschumann.net/NMOF.htm#NMOFmanual
S <- 100; X <- 100; tau <- 1 r <- 0.02; q <- 0.08 v0 <- 0.2^2 ## variance, not volatility vT <- 0.2^2 ## variance, not volatility v <- vT rho <- -0.3; k <- .2 sigma <- 0.3 ## jump parameters (Merton and Bates) lambda <- 0.1 muJ <- -0.2 vJ <- 0.1^2 ## get Heston price and BSM implied volatility callHestoncf(S, X, tau, r, q, v0, vT, rho, k, sigma, implVol = FALSE) callCF(cf = cfHeston, S=S, X=X, tau=tau, r=r, q = q, v0 = v0, vT = vT, rho = rho, k = k, sigma = sigma, implVol = FALSE) ## Black-Scholes-Merton callCF(cf = cfBSM, S=S, X=X, tau = tau, r = r, q = q, v = v, implVol = TRUE) ## Bates callCF(cf = cfBates, S = S, X = X, tau = tau, r = r, q = q, v0 = v0, vT = vT, rho = rho, k = k, sigma = sigma, lambda = lambda, muJ = muJ, vJ = vJ, implVol = FALSE) ## Merton callCF(cf = cfMerton, S = S, X = X, tau = tau, r = r, q = q, v = v, lambda = lambda, muJ = muJ, vJ = vJ, implVol = FALSE) ## variance gamma nu <- 0.1; theta <- -0.1; sigma <- 0.15 callCF(cf = cfVG, S = S, X = X, tau = tau, r = r, q = q, nu = nu, theta = theta, sigma = sigma, implVol = FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.