ecld-class: An S4 class to represent the lambda distribution

ecld-classR Documentation

An S4 class to represent the lambda distribution

Description

The ecld class serves as an object-oriented interface for the lambda distribution. The ecld prefix is also used as the namespace for many analytic formulai derived in lambda distribution, especially when lambda = 1,2,3. Because of the extensive use of analytic formulai and enhanced precision through the unit distribution, MPFR is not needed in most cases. This makes option pricing calculation in ecld much faster than its counterpart built on the more general-purpose ecd library.

Slots

call

the match.call slot

lambda

numeric

sigma

numeric

beta

numeric

mu

numeric

use.mpfr

logical, whether to use mpfr for ecld object. If any of the above parameters is mpfr, then this flag is set to TRUE.

is.sged

logical, if TRUE, interpret parameters as SGED.

ecd

the companion object of ecd class (optional)

mu_D

the risk-neutral drift, optional, but preferred to have value if the object is to engage with OGF calculation.

epsilon

the residual risk, optional as a storage for lambda transformation

rho

the momentum shift, optional as a storage for lambda transformation

ecd_RN

the risk-neutral companion object of ecd class (optional)

status

numeric, bitmap recording the state of the calculation layers. 1: bare bone; 2: ecd; 4: mu_D; 8: ecd_RN

Details

The lambda distribution is defined by a depressed polynomial of λ-th order,

{≤ft|y(z)\right|}^λ + ... - β z y(z) = z^2

where y(z) must approach minus infinity as z approaches plus or minus infinity. The density function is defined as

P≤ft(x; λ, σ, β, μ\right) \equiv\, \frac{1}{C\,σ} e^{y≤ft(≤ft|\frac{x-μ}{σ}\right|\right)},

and C is the normalization constant,

C = \int_{-∞}^{∞}e^{y(z)}\,dz,

where λ is the shape parameter, σ is the scale parameter, β is the asymmetric parameter, μ is the location parameter.
The distribution is symmetric when β=0, which becomes

P≤ft(x; λ, σ, μ\right) \equiv\, \frac{1}{λ Γ≤ft(\frac{2}{λ}\right) σ} e^{-{≤ft|\frac{x-μ}{σ}\right|}^{\frac{2}{λ}}}.

This functional form is not unfamiliar and has appeared under several names, such as generalized normal distribution and power exponential distribution, where λ < 2.
However, we are most interested in λ >= 2, which is called the "local regime". In this regime, the MGF diverges which requires regularization aka truncation of the right tail. The λ option model pays special attention to λ=2,3,4 where many closed form solutions can be obtained. In particular, SPX options fit best at λ=4, which is called "quartic lambda".
Since option model often has to deal with very small numbers which are closed to the machine error of double precision calculation, the method supports MPFR. As soon as one of the ecld parameters becomes MPFR (by simply multiplying ecd.mp1), the subsequent calculations will use MPFR.

Author(s)

Stephen H. Lihn

References

For lambda distribution and option pricing model, see Stephen Lihn (2015). The Special Elliptic Option Pricing Model and Volatility Smile. SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2707810.
Closed form solutions are derived in Stephen Lihn (2016). Closed Form Solution and Term Structure for SPX Options. SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2805769 and
Stephen Lihn (2017). From Volatility Smile to Risk Neutral Probability and Closed Form Solution of Local Volatility Function. SSRN: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2906522


ecd documentation built on May 10, 2022, 1:07 a.m.