realizedDistribution: Extract realized distribution of the underlying prices

Description Usage Arguments Details Value

View source: R/distribution.R

Description

Extract realized probability distribution from the time series data of the underlying price.

Usage

1
2
realizedDistribution(x, t, n = 512, bounds = c(-0.2, 0.2),
  normalization = TRUE)

Arguments

x

Time series of underlying prices in xts format. The frequency is assumed to be daily.

t

Maturity (in years). This is used to scale the daily returns using a square root of time scaling.

n

Number of division for the range of strikes to generate the distribution. This number should ideally be a power of 2 (becuase of Fourier transform used within) although it is not a requirement.

bounds

The range (in percentage) of the underlying to estimate the distribution.

normalization

A logical value. If true, the implied distribution is normalized to sum up to 1, as well as the first moment is normalized to be equal to the forward level (100).

Details

Extracting probability density from the prices data is done in two steps. First the prices are converted to returns and appropriately scaled. Then these scaled returns are use to fit a (gaussian) kernel density estimate. The probability distribution is normalized in the zero-th moment to sum up to 1 and also in the first moment to match the forward (100). The strikes of the underlying of the distribution is always scaled so that the current forward is at 100.

Value

A dataframe with strikes and corresponding probability density function estimates.


prodipta/bsoption documentation built on May 29, 2019, 2:57 p.m.