cosPricing: Cosine Transform pricing

Description Usage Arguments Details Value

Description

Implementation of Fang and Oosterlee's (2008) Fourier-cosine expansion method of pricing European derivatives.

Usage

1
2
3
cosTransformPricer(strikeMat, mkt, N = 120, intLim,
  payCoeffFoo = callCosCoeffs, N.factors = 3, charFun = affineCF,
  preCalc = NULL, ...)

Arguments

strikeMat

array of size TxKxS of relative log-strikes

mkt

data.frame with T rows and fields: r – risk-free rate, q – dividend yield, t – option maturity.

N

number of points of integration.

intLim

numeric(2) integration limits in terms of log-strikes, see Fang and Oosterlee for some optimal choices.

payCoeffFoo

function which accepts arguments intLim, Nterms, strikeMat and calculates the cosine expansion coefficents of a given derivative contract. This function determines what you are pricing. Use callCosCoeffs to price call (and put, via parity) options.

N.factors

integer, number of stochastic volatility factors, argument for charFun. If your charFun doesn't accept such an argument, for example you're pricing in the Black-Scholes model, use N.factors = 0.

preCalc

optional, array of size NxTxKxS with pre-calculated characteristic function values for integration. If you provide it, you can ommit charFun as it will not be called.

...

arguments to charFun required for pricing (state variables, parameters, etc.)

Details

The integration method is described in detail in F. Fang and C.W. Oosterlee, “A Novel Pricing Method for European Options Based on Fourier-Cosine Series Expansions”, accessible at http://ta.twi.tudelft.nl/mf/users/oosterle/oosterlee/COS.pdf.

Value

list of arrays of size T x K x S with relative prices of call options, put options, out of the money options.


piotrek-orlowski/transformOptionPricer documentation built on July 21, 2020, 11:51 a.m.