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.
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
The lambda distribution is defined by a depressed polynomial of \(\lambda\)-th order, $$ {\left|y(z)\right|}^\lambda + ... - \beta 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\left(x; \lambda, \sigma, \beta, \mu\right) \equiv\, \frac{1}{C\,\sigma} e^{y\left(\left|\frac{x-\mu}{\sigma}\right|\right)}, $$ and \(C\) is the normalization constant,$$ C = \int_{-\infty}^{\infty}e^{y(z)}\,dz, $$ where \(\lambda\) is the shape parameter, \(\sigma\) is the scale parameter, \(\beta\) is the asymmetric parameter, \(\mu\) is the location parameter.
The distribution is symmetric when \(\beta=0\), which becomes $$ P\left(x; \lambda, \sigma, \mu\right) \equiv\, \frac{1}{\lambda \Gamma\left(\frac{2}{\lambda}\right) \sigma} e^{-{\left|\frac{x-\mu}{\sigma}\right|}^{\frac{2}{\lambda}}}. $$ This functional form is not unfamiliar and has appeared under several names, such as generalized normal distribution and power exponential distribution, where \(\lambda < 2\).
However, we are most interested in \(\lambda >= 2\), which is called the "local regime". In this regime, the MGF diverges which requires regularization aka truncation of the right tail. The \(\lambda\) option model pays special attention to \(\lambda=2,3,4\) where many closed form solutions can be obtained. In particular, SPX options fit best at \(\lambda=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.
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