Table of Contents

Class PiecewiseTimeDependentHestonModel

Namespace
NanoQL.Models
Assembly
NanoQL.dll

The Heston model with piecewise time-dependent parameters on a time grid, calibrated.

public sealed class PiecewiseTimeDependentHestonModel : CalibratedModel, ICalibratedModel
Inheritance
PiecewiseTimeDependentHestonModel
Implements
Inherited Members
Extension Methods

Remarks

Its arguments are θ, κ, σ, ρ and v₀, in that order: the first four as given, v₀ a positive constant parameter. Immutable: WithParams(Vector) returns a new model. The model's time runs from the earlier of its curves' reference dates on the risk-free curve's day counter, and its parameters' grid is on that clock, where QuantLib's runs from the risk-free curve's reference date and reads the dividend curve at the risk-free curve's times; a market whose dividend curve isn't dated before the risk-free curve keeps QuantLib's times.

References: S. Heston, A Closed-Form Solution for Options with Stochastic Volatility with Applications to Bond and Currency Options, The Review of Financial Studies 6(2), 1993, 327-343; A. Elices, Models with time-dependent parameters using transform methods: application to Heston's model, http://arxiv.org/pdf/0708.2020.

Constructors

PiecewiseTimeDependentHestonModel(YieldTermStructure, YieldTermStructure, double, double, Parameter, Parameter, Parameter, Parameter, TimeGrid)

Initializes a new instance of the PiecewiseTimeDependentHestonModel class.

public PiecewiseTimeDependentHestonModel(YieldTermStructure riskFreeRate, YieldTermStructure dividendYield, double s0, double v0, Parameter theta, Parameter kappa, Parameter sigma, Parameter rho, TimeGrid timeGrid)

Parameters

riskFreeRate YieldTermStructure

The risk-free curve.

dividendYield YieldTermStructure

The dividend curve.

s0 double

The spot.

v0 double

The variance's value.

theta Parameter

The variance's long-run mean.

kappa Parameter

The variance's mean-reversion speed.

sigma Parameter

The variance's volatility.

rho Parameter

The correlation.

timeGrid TimeGrid

The parameters' time grid, on the model's clock.

Exceptions

ArgumentNullException

A curve, a parameter or the time grid is null.

ArgumentException

v0 isn't positive.

Properties

DividendYield

Gets the dividend curve.

public YieldTermStructure DividendYield { get; }

Property Value

YieldTermStructure

RiskFreeRate

Gets the risk-free curve.

public YieldTermStructure RiskFreeRate { get; }

Property Value

YieldTermStructure

S0

Gets the spot.

public double S0 { get; }

Property Value

double

TimeGrid

Gets the parameters' time grid, on the model's clock.

public TimeGrid TimeGrid { get; }

Property Value

TimeGrid

V0

Gets the variance's value v₀.

public double V0 { get; }

Property Value

double

Methods

Kappa(double)

The variance's mean-reversion speed at a time.

public double Kappa(double t)

Parameters

t double

The time, on the model's clock.

Returns

double

κ(t).

Rho(double)

The correlation at a time.

public double Rho(double t)

Parameters

t double

The time, on the model's clock.

Returns

double

ρ(t).

Sigma(double)

The variance's volatility at a time.

public double Sigma(double t)

Parameters

t double

The time, on the model's clock.

Returns

double

σ(t).

Theta(double)

The variance's long-run mean at a time.

public double Theta(double t)

Parameters

t double

The time, on the model's clock.

Returns

double

θ(t).