Learn R Programming

ecd (version 0.9.2.4)

Elliptic Lambda Distribution and Option Pricing Model

Description

Elliptic lambda distribution and lambda option pricing model have been evolved into a framework of stable-law inspired distributions, such as the extended stable lambda distribution for asset return, stable count distribution for volatility, and Lihn-Laplace process as a leptokurtic extension of Wiener process. This package contains functions for the computation of density, probability, quantile, random variable, fitting procedures, option prices, volatility smile. It also comes with sample financial data, and plotting routines.

Copy Link

Version

Install

install.packages('ecd')

Monthly Downloads

62

Version

0.9.2.4

License

Artistic-2.0

Maintainer

Stephen Lihn

Last Published

May 9th, 2022

Functions in ecd (0.9.2.4)

dsl

Stable lambda distribution
bootstrap.ecdb

Bootstrap data for the Elliptic DB (ECDB)
dstablecnt

Stable Count distribution
ecd.adj_gamma

Discriminant-adjusted gamma
discr.ecd

Discriminant of the elliptic curve \(y(x)\)
ecd-class

The ecd class
ecd.cusp

Cusp constructor of ecd class
dstdlap

Standardized Laplace process and distribution
dec

The Elliptic Distribution
ecd.asymp_stats

Compute asymptotic statistics of an ecd object
ecd

Constructor of ecd class
ecd.estimate_const

Estimate the normalization constant for an ecd object
ecd.ccdf

Complementary CDF of ecd
ecd.rational

Utility to convert a numeric to a rational
ecd.fit_data

Sample data fit
ecd.data_stats

Statistics and histogram on log returns
ecd.df2ts

Utility to standardize timeseries from data.frame to xts
ecd.imgf

Incomplete MGF of ecd
ecd.integrate

Wrapper to integrate numeric and mpfr
ecd.cusp_std_moment

The moments, characteristic function (CF), and moment generating function (MGF) of standard cusp distribution.
ecd.mp2f

Wrapper to convert mpfr to numeric
ecd.cusp_a2r

Conversion between alpha and gamma for cusp distribution
ecd.max_kurtosis

Utility to calculate where the maximum kurtosis is on the positive j=0 line
ecd.diff

Utility to diff a vector of numeric or mpfr to get first derivative
ecd.data

Read sample data
ecld.ivol_ogf_star

Calculate implied volatility using star OGF and small sigma formula
ecd.y0_isomorphic

The analytic solution of \(y(0)\) via isomorphic mapping.
ecd.erfq

Quartic scaled error function
ecd.read_csv_by_symbol

Read csv file of sample data
ecd.cdf

CDF of ecd
ecd.mpnum

Wrappers for ecd to maintain consistent type between mpfr and numeric
ecd.fit_ts_conf

Timeseries fitting utility
ecd-package

ecd: A package for the stable lambda distribution family.
ecd.has_quantile

Whether the ecd object has quantile data or not
ecdattr-class

An S4 class to represent the ecdattr row in the Elliptic Database (ECDB)
ecd.ogf

Option generating function of ecd
ecd.sd

Standard deviation, variance, mean, skewness, and kurtosis of ecd
ecd.read_symbol_conf

Read conf for sample data
ecd.polar

Polar constructor of ecd class
ecd.pdf

Calculate the PDF of an ecd object
ecd.lag

Utility to shift a vector of numeric or mpfr
ecd.cubic

Generate or solve the cubic polynomial for ecd
ecd.manage_hist_tails

Manage histogram tails
ecdb-class

setClass for ecdb class
ecld.op_V

The O, V, U operators in option pricing model
ecld-class

An S4 class to represent the lambda distribution
ecld

Constructor of ecld class
ecdb

Constructor of ecdb class for the elliptic database
ecd.toString

String representation of ecd
ecd.stats

Compute statistics of an ecd object
ecld.pdf

Calculate the PDF of an ecld object
ecd.mpfr_qagi

Utility to integrate mpfr with infinity via qagi
ecdq-class

setClass for ecdq class
ecd.mpfr

Wrapper to convert numeric to mpfr
ecd.ts_lag_stats

Lag statistics on timeseries of log returns
ecld.imnt

Incomplete moment (imnt) of ecld
ecdq

Constructor of ecdq class
ecld.ogf

Option generating function (OGF) of ecld
ecld.mu_D

mu_D of ecld
ecd.uniroot

Uniroot wrapper
ecld.mgf_term

The term structure of ecld symmetric MGF
ecld.imgf

Incomplete moment generating function (IMGF) of ecld
ecd.setup_const

Integration preprocessor for an ecd object
ecld.moment

The moments and MGF of ecld
ecop.bs_option_price

Calculate option price from implied volatility in Black-Sholes model
ecd.solve_cusp_asym

Trigonometric solution for asymmetric cusp distribution
levy.domain_coloring

Domain coloring of Laplace kernel of lambda distribution
lamp

Constructor of lamp class
solve.ecd

Solve the elliptic curve \(y(x)\)
ecdattr.pairs

Create a list of basic ecdattr objects
levy.dlambda

Standard Lambda distribution
ecld.mpnum

Wrappers for ecld to maintain consistent type between mpfr and numeric
lamp-class

An S4 class to represent the lambda process
ecld.quartic_Qp

The ATM volatility and skew of \(Q_p\) in quartic model
ecld.const

Analytic solution of the normalization constant for lambda distribution
ecdattr.pairs_polar

Create a list of basic ecdattr objects in polar coordinate
ecld.cdf

CDF and CCDF of ecld
ecdb.dbSendQuery

Send query to the elliptic database
solve_sym.ecd

Analytic solution for a symmetric elliptic curve
ecdb.protectiveCommit

Protective commit
ecdattr

Constructor of ecdattr class for the Elliptic Database (ECDB)
ecld.gamma

Incomplete gamma function and asymptotic expansion
ecld.fixed_point_SN0_atm_ki

The ATM RNO related constants and calculations in fixed point model
ecop-class

An S4 class to represent the top-level option model
ecop.find_fixed_point_lambda_by_atm_skew

Utility to find the fixed point lambda that matches ATM skew
y_slope.ecd

Slope of \(y(x)\)
write.ecdb

Write API for the ecdb for a list of basic ecdattr objects
ecop.bs_implied_volatility

Implied volatility of Black-Sholes model
ecdattr.enrich

Enrich a basic ecdattr object
ecop.get_ld_triple

Get triple list of ecld objects by stdev
ecld.y_slope

Analytic solution for the slope of \(y(x)\) in lambda distribution
ecop.opt-class

An S4 class to represent the option data and model calculation
lamp.generate_tau

Generate tau from stable distribution
ecop.vix_plot_3x3

Produce 3x3 plot of VIX volatility smiles for a date
ecldOrEcd-class

The ecldOrEcd class
ellipticity.ecd

Ellipticity of ecd object
numericMpfr-class

The numericMpfr class
lamp.qsl_fit_plot

Plot the fit to asset returns using quartic stable lambda distribution
lamp.qsl_fit_config

Read QSLD fit config
ecld.quartic_Qp_atm_attr

Calculate ATM attributes from key quartic parameters
ecop.term_master_calculator

Master calculator for all the analytics of volatility smiles required for a date
ecop.term_plot_3x3

Produce 3x3 plot of volatility smiles for a date
levy.dskewed

Skewed Levy distribution in Levy statistics
ecop.find_fixed_point_sd_by_lambda

Utility to find the fixed point stdev when lambda is given
ecld.solve

Analytic solution for \(y(x)\) in lambda distribution
ecld.sged_const

The integral solutions of SGED
ecop.from_symbol_conf

Constructor of ecop class by read conf for option sample data
qsld.fit

Fit observations to QSLD via MLE
moment.ecd

Compute the moment of ecd via integration
qsl_kurtosis_analytic

Analytic solutions on the statistics of quartic stable lambda distribution
k2mnt

Conversion between cumulants and moments
jinv.ecd

J-invariant of the elliptic curve \(y(x)\)
sld.sd

Compute statistics analytically for an sld object
sld

Constructor of sld class
lamp.plot_sim4

Plot the simulation result in standard layout
lamp.sd_factor

Calculate sd adjustment factor
quantilize.ecd

Add the quantile data to the ecd object
lamp.simulate1

Simulate one sequence of lambda process from stable distribution
read.ecdb

Read API for the ecdb
ecld.ogf_star

Star OGF of ecld
ecld.op_Q

The Q operator in option pricing model
ecld.quartic_SN0_atm_ki

The ATM RNO related constants and calculations in quartic model
plot_2x2.ecd

Standard 2x2 plot for sample data
solve_trig.ecd

Trigonometric solution for a elliptic curve
summary.ecdb

Summary for the Elliptic DB (ECDB)
ecld.sd

Compute statistics analytically for an ecld object
ecop.polyfit_option

Poly fit on option prices
history.ecdb

List of history in the Elliptic DB
ecop.read_csv_by_symbol

Read option data csv
integrate_pdf.ecd

Integrate a function with PDF of the distribution
lamp.stable_rnd_walk

Calculate the stable random walk
lamp.simulate_iter

Simulate lambda process from stable distribution iteratively
rlaplace0

Laplace distribution
sld-class

An S4 class to represent the stable lambda distribution