Learn R Programming

RND (version 1.2)

extract.ew.density: Extract Edgeworth Based Density

Description

ew.extraction extracts the parameters for the density approximated by the Edgeworth expansion method.

Usage

extract.ew.density(initial.values = c(NA, NA, NA), r, y, te, s0, market.calls, call.strikes, call.weights = 1, lambda = 1, hessian.flag = F, cl = list(maxit = 10000))

Arguments

initial.values
initial values for the optimization
r
risk free rate
y
dividend yield
te
time to expiration
s0
current asset value
market.calls
market calls (most expensive to cheapest)
call.strikes
strikes for the calls (smallest to largest)
call.weights
weights to be used for calls
lambda
Penalty parameter to enforce the martingale condition
hessian.flag
if F, no hessian is produced
cl
list of parameter values to be passed to the optimization function

Value

Details

If initial.values are not specified then the function will attempt to pick them automatically. cl in form of a list can be used to pass parameters to the optim function.

References

E. Jondeau and S. Poon and M. Rockinger (2007): Financial Modeling Under Non-Gaussian Distributions Springer-Verlag, London

R. Jarrow and A. Rudd (1982) Approximate valuation for arbitrary stochastic processes. Journal of Finanical Economics, 10, 347-369

C.J. Corrado and T. Su (1996) S&P 500 index option tests of Jarrow and Rudd's approximate option valuation formula. Journal of Futures Markets, 6, 611-629

Examples

Run this code

#
#  ln.skew & ln.kurt are the normalized skewness and kurtosis of a true lognormal.
#

r       = 0.05
y       = 0.03
s0      = 1000
sigma   = 0.25
te      = 100/365
strikes = seq(from=600, to = 1400, by = 1)
v       = sqrt(exp(sigma^2 * te) - 1)
ln.skew = 3 * v + v^3
ln.kurt = 16 * v^2 + 15 * v^4 + 6 * v^6 + v^8

#
# Now "perturb" the lognormal
#

new.skew = ln.skew * 1.50
new.kurt = ln.kurt * 1.50

#
# new.skew & new.kurt should not be extracted.
# Note that weights are automatically set to 1.
#

market.calls      =  price.ew.option(r = r, te = te, s0 = s0, k=strikes, sigma=sigma, 
                     y=y, skew = new.skew, kurt = new.kurt)$call
ew.extracted.obj  =  extract.ew.density(r = r, y = y, te = te, s0 = s0, 
                     market.calls = market.calls, call.strikes = strikes, 
                     lambda = 1, hessian.flag = FALSE)
ew.extracted.obj

Run the code above in your browser using DataLab