Learn R Programming

NMOF (version 0.22-0)

callCF: Price a Plain-Vanilla Call with the Characteristic Function

Description

Price a European plain-vanilla call with the characteric function.

Usage

callCF(cf, S, X, tau, r, q = 0, ..., implVol = 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)

Arguments

cf
characteristic function
S
spot
X
strike
tau
time to maturity
r
rate
q
the dividend rate
...
arguments passed to the characteristic function
implVol
compute implied vol?
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

Value

  • Returns the value of the call (numeric) under the respective model or, if implVol == TRUE, a list of the value and the implied volatility.

Details

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. If implVol is TRUE, the function will compute the implied volatility necessary to obtain the same price under Black--Scholes--Merton. The implied volatility is computed with uniroot from the stats package.

References

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. (2011) Numerical Methods and Optimization in Finance. Elsevier. http://www.elsevierdirect.com/product.jsp?isbn=9780123756626 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.

See Also

callHestoncf

Examples

Run this code
S <- 100; X <- 100; tau <- 1
r <- 0.02; q <- 0.08
v0 <- 0.2^2  # variance, not volatility
vT <- 0.2^2  #
v <- vT
rho <- -0.3; k <- .2
sigma <- 0.3
#
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)

Run the code above in your browser using DataLab