- java.lang.Object
-
- net.finmath.fouriermethod.models.HestonModel
-
- All Implemented Interfaces:
CharacteristicFunctionModel
,Model
public class HestonModel extends Object implements CharacteristicFunctionModel
Implements the characteristic function of a Heston model. The model is \[ dS(t) = r^{\text{c}}(t) S(t) dt + \sqrt{V(t)} S(t) dW_{1}(t), \quad S(0) = S_{0}, \] \[ dV(t) = \kappa ( \theta - V(t) ) dt + \xi \sqrt{V(t)} dW_{2}(t), \quad V(0) = \sigma^2, \] \[ dW_{1} dW_{2} = \rho dt \] \[ dN(t) = r^{\text{d}}(t) N(t) dt, \quad N(0) = N_{0}, \] where \( W \) is a Brownian motion. The model allows to specify two independent rate for forwarding (\( r^{\text{c}} \)) and discounting (\( r^{\text{d}} \)). It thus allow for a simple modelling of a funding / collateral curve (via (\( r^{\text{d}} \)) and/or the specification of a dividend yield. The free parameters of this model are:- \( S_{0} \)
- spot - initial value of S
- \( r^{\text{c}} \)
- the risk free rate (may be provided as a curve or a constant)
- \( \sigma \)
- the initial volatility level
- \( r^{\text{d}} \)
- the discount rate (may be provided as a curve or a constant)
- \( \xi \)
- the volatility of volatility
- \( \theta \)
- the mean reversion level of the stochastic volatility
- \( \kappa \)
- the mean reversion speed of the stochastic volatility
- \( \rho \)
- the correlation of the Brownian drivers
- Version:
- 1.0
- Author:
- Christian Fries, Andy Graf, Lorenzo Toricelli
-
-
Constructor Summary
Constructors Constructor Description HestonModel(double initialValue, double riskFreeRate, double volatility, double theta, double kappa, double xi, double rho)
HestonModel(double initialValue, double riskFreeRate, double volatility, double discountRate, double theta, double kappa, double xi, double rho)
Create a Heston model (characteristic function)HestonModel(double initialValue, DiscountCurve discountCurveForForwardRate, DiscountCurve discountCurveForDiscountRate, double volatility, double theta, double kappa, double xi, double rho)
Create a Heston model (characteristic function)HestonModel(LocalDate referenceDate, double initialValue, DiscountCurve discountCurveForForwardRate, DiscountCurve discountCurveForDiscountRate, double volatility, double theta, double kappa, double xi, double rho)
Create a Heston model (characteristic function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharacteristicFunction
apply(double time)
Returns the characteristic function of X(t), where X isthis
stochastic process.DiscountCurve
getDiscountCurveForDiscountRate()
DiscountCurve
getDiscountCurveForForwardRate()
double
getDiscountRate()
double
getInitialValue()
double
getKappa()
LocalDate
getReferenceDate()
double
getRho()
double
getRiskFreeRate()
double
getTheta()
double
getVolatility()
double
getXi()
String
toString()
-
-
-
Constructor Detail
-
HestonModel
public HestonModel(LocalDate referenceDate, double initialValue, DiscountCurve discountCurveForForwardRate, DiscountCurve discountCurveForDiscountRate, double volatility, double theta, double kappa, double xi, double rho)
Create a Heston model (characteristic function)- Parameters:
referenceDate
- The date representing the time t = 0. All other double times are followingFloatingpointDate
.initialValue
- \( S_{0} \) - spot - initial value of SdiscountCurveForForwardRate
- The curve specifying \( t \mapsto exp(- r^{\text{c}}(t) \cdot t) \) - with \( r^{\text{c}}(t) \) the risk free ratediscountCurveForDiscountRate
- The curve specifying \( t \mapsto exp(- r^{\text{d}}(t) \cdot t) \) - with \( r^{\text{d}}(t) \) the discount ratevolatility
- \( \sigma \) the initial volatility leveltheta
- \( \theta \) - the mean reversion level of the stochastic volatilitykappa
- \( \kappa \) - the mean reversion speed of the stochastic volatilityxi
- \( \xi \) - the volatility of volatilityrho
- \( \rho \) - the correlation of the Brownian drivers
-
HestonModel
public HestonModel(double initialValue, DiscountCurve discountCurveForForwardRate, DiscountCurve discountCurveForDiscountRate, double volatility, double theta, double kappa, double xi, double rho)
Create a Heston model (characteristic function)- Parameters:
initialValue
- \( S_{0} \) - spot - initial value of SdiscountCurveForForwardRate
- The curve specifying \( t \mapsto exp(- r^{\text{c}}(t) \cdot t) \) - with \( r^{\text{c}}(t) \) the risk free ratediscountCurveForDiscountRate
- The curve specifying \( t \mapsto exp(- r^{\text{d}}(t) \cdot t) \) - with \( r^{\text{d}}(t) \) the discount ratevolatility
- \( \sigma \) the initial volatility leveltheta
- \( \theta \) - the mean reversion level of the stochastic volatilitykappa
- \( \kappa \) - the mean reversion speed of the stochastic volatilityxi
- \( \xi \) - the volatility of volatilityrho
- \( \rho \) - the correlation of the Brownian drivers
-
HestonModel
public HestonModel(double initialValue, double riskFreeRate, double volatility, double discountRate, double theta, double kappa, double xi, double rho)
Create a Heston model (characteristic function)- Parameters:
initialValue
- \( S_{0} \) - spot - initial value of SriskFreeRate
- \( r^{\text{c}} \) - the risk free ratevolatility
- \( \sigma \) the initial volatility leveldiscountRate
- \( r^{\text{d}} \) - the discount ratetheta
- \( \theta \) - the mean reversion level of the stochastic volatilitykappa
- \( \kappa \) - the mean reversion speed of the stochastic volatilityxi
- \( \xi \) - the volatility of volatilityrho
- \( \rho \) - the correlation of the Brownian drivers
-
HestonModel
public HestonModel(double initialValue, double riskFreeRate, double volatility, double theta, double kappa, double xi, double rho)
-
-
Method Detail
-
apply
public CharacteristicFunction apply(double time)
Description copied from interface:CharacteristicFunctionModel
Returns the characteristic function of X(t), where X isthis
stochastic process.- Specified by:
apply
in interfaceCharacteristicFunctionModel
- Parameters:
time
- The time at which the stochastic process is observed.- Returns:
- The characteristic function of X(t).
-
getReferenceDate
public LocalDate getReferenceDate()
- Returns:
- the referenceDate
-
getInitialValue
public double getInitialValue()
- Returns:
- the initialValue
-
getDiscountCurveForForwardRate
public DiscountCurve getDiscountCurveForForwardRate()
- Returns:
- the discountCurveForForwardRate
-
getRiskFreeRate
public double getRiskFreeRate()
- Returns:
- the riskFreeRate
-
getDiscountCurveForDiscountRate
public DiscountCurve getDiscountCurveForDiscountRate()
- Returns:
- the discountCurveForDiscountRate
-
getDiscountRate
public double getDiscountRate()
- Returns:
- the discountRate
-
getVolatility
public double getVolatility()
- Returns:
- the volatility
-
getTheta
public double getTheta()
- Returns:
- the theta
-
getKappa
public double getKappa()
- Returns:
- the kappa
-
getXi
public double getXi()
- Returns:
- the xi
-
getRho
public double getRho()
- Returns:
- the rho
-
-