C# Класс HestonEstimator.HestonCall

Handles the calculation of the call prices on a given Heston model instance.
Наследование: IIntegrable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
HestonCall ( ) : System

Initializes a new instance of the HestonEstimator.HestonCall class.

HestonCallPrice ( Vector x, double s0, double T, double K, double r, double q ) : double

Calculates the Heston model call price.

Note that this function is a wrapper for the other one which sets all the variables locally before calling it.

IntegrandFunc ( double u ) : double

Calculates value of the integrand function that appears in the Heston model call price formula.

IntegrandFunc ( double u, double kappa, double theta, double sigma, double rho, double s0, double v0, double rate, double dividend, double T, double K ) : double

Calculates value of the integrand function that appears in the Heston model call price formula.

Phi ( System.Complex u, double kappa, double theta, double sigma, double rho, double s0, double v0, double r, double T ) : System.Complex

Calculates the Heston characteristic function.

The calculation does not follow the original paper by Heston but uses the form found in the paper
Schoutens, W., Simons E. and Tistaert, J. (2004) A perfect calibration! Now what?, Wilmott Magazine, March 2005, 66–78.
As stated in: Albrecher, H., Mayer, Ph., Schoutens, W and Tistaert, J. (2007) The Little Heston Trap. Wilmott Magazine, January Issue, 83-92.
This form does not have the discontinuity issue that affects the form found in the original Heston paper.

PutIntegrandFunc ( double u ) : double

Приватные методы

Метод Описание
HestonCall ( HestonCallOptimizationProblem problem ) : System

Initializes a new instance of the HestonEstimator.HestonCall class.

HestonCall ( HestonCallOptimizationProblem problem, Vector x, double s0 ) : System

Initializes a new instance of the HestonEstimator.HestonCall class.

HestonCallPrice ( ) : double

Calculates the Heston model call price by using local variables.

The indefinite integral present in the formula is performed with extremes [1E-8, 1000]. This choice seems to be sufficient to correctly estimate the indefinite integral.

HestonCallPutPrice ( ) : Vector

Jointly calculate a call and a put price.

HestonPutPrice ( ) : double

Calculates a put price using the Heston model

PerformIntegral ( double a, double b, TAEDelegateFunction1D f ) : double

Numerical integral in R+ assuming the integrand is exponential decaying.

Phi ( double u, double kappa, double theta, double sigma, double rho, double v0, double s0, double r, double T ) : System.Complex

Calculates Heston characteristic function with input u real.

Описание методов

HestonCall() публичный Метод

Initializes a new instance of the HestonEstimator.HestonCall class.
public HestonCall ( ) : System
Результат System

HestonCallPrice() публичный Метод

Calculates the Heston model call price.
Note that this function is a wrapper for the other one which sets all the variables locally before calling it.
public HestonCallPrice ( Vector x, double s0, double T, double K, double r, double q ) : double
x Vector Vector of Heston model parameters.
s0 double Starting value for the stock process.
T double Maturity of the call option which price is to be calculated.
K double Strike of the call option which price is to be calculated.
r double Risk free rate.
q double Dividend yield.
Результат double

IntegrandFunc() публичный Метод

Calculates value of the integrand function that appears in the Heston model call price formula.
public IntegrandFunc ( double u ) : double
u double Value at which the integrand function is to be calculated.
Результат double

IntegrandFunc() публичный Метод

Calculates value of the integrand function that appears in the Heston model call price formula.
public IntegrandFunc ( double u, double kappa, double theta, double sigma, double rho, double s0, double v0, double rate, double dividend, double T, double K ) : double
u double Value at which the integrand function is to be calculated.
kappa double Heston volatility mean reversion speed parameter.
theta double Heston volatility mean reversion level parameter.
sigma double Heston volatility of volatility parameter.
rho double /// Correlation between the two Wiener processes in the Heston dynamics. ///
s0 double Starting value for the stock process.
v0 double Starting value for the volatility process.
rate double Risk free rate.
dividend double Dividend yield.
T double Maturity of the call option which price is to be calculated.
K double Strike of the call option which price is to be calculated.
Результат double

Phi() публичный Метод

Calculates the Heston characteristic function.
The calculation does not follow the original paper by Heston but uses the form found in the paper
Schoutens, W., Simons E. and Tistaert, J. (2004) A perfect calibration! Now what?, Wilmott Magazine, March 2005, 66–78.
As stated in: Albrecher, H., Mayer, Ph., Schoutens, W and Tistaert, J. (2007) The Little Heston Trap. Wilmott Magazine, January Issue, 83-92.
This form does not have the discontinuity issue that affects the form found in the original Heston paper.
public Phi ( System.Complex u, double kappa, double theta, double sigma, double rho, double s0, double v0, double r, double T ) : System.Complex
u System.Complex /// Complex value at which the characteristic function is to be calculated. ///
kappa double Heston volatility mean reversion speed parameter.
theta double Heston volatility mean reversion level parameter.
sigma double Heston volatility of volatility parameter.
rho double /// Correlation between the two Wiener processes in the Heston dynamics. ///
s0 double Starting value for the stock process.
v0 double Starting value for the volatility process.
r double Risk free rate.
T double Time at which the characteristic function is to be calculated.
Результат System.Complex

PutIntegrandFunc() публичный Метод

public PutIntegrandFunc ( double u ) : double
u double
Результат double