public class HestonModel extends AbstractProcessModel
MonteCarloProcess via the specification of
\( f_{1} = exp , f_{2} = identity \), \( \mu_{1} = r^{\text{c}} - \frac{1}{2} V^{+}(t) , \mu_{2} = \kappa ( \theta - V^{+}(t) ) \), \( \lambda_{1,1} = \sqrt{V^{+}(t)} , \lambda_{1,2} = 0 ,\lambda_{2,1} = \xi \sqrt{V^+(t)} \rho , \lambda_{2,2} = \xi \sqrt{V^+(t)} \sqrt{1-\rho^{2}} \), i.e.,
of the SDE
\[
dX_{1} = \mu_{1} dt + \lambda_{1,1} dW_{1} + \lambda_{1,2} dW_{2}, \quad X_{1}(0) = \log(S_{0}),
\]
\[
dX_{2} = \mu_{2} dt + \lambda_{2,1} dW_{1} + \lambda_{2,2} dW_{2}, \quad X_{2}(0) = V_{0} = \sigma^2,
\]
with \( S = f_{1}(X_{1}) , V = f_{2}(X_{2}) \).
See MonteCarloProcess for the notation.
Here \( V^{+} \) denotes a truncated value of V. Different truncation schemes are available:
FULL_TRUNCATION: \( V^{+} = max(V,0) \),
REFLECTION: \( V^{+} = abs(V) \).
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:
The interface for numerical schemes.,
The interface for models provinding parameters to numerical schemes.| Modifier and Type | Class and Description |
|---|---|
static class |
HestonModel.Scheme
Truncation schemes to be used in the calculation of drift and diffusion coefficients.
|
| Constructor and Description |
|---|
HestonModel(double initialValue,
double riskFreeRate,
double volatility,
double discountRate,
double theta,
double kappa,
double xi,
double rho,
HestonModel.Scheme scheme)
Create a Heston model.
|
HestonModel(double initialValue,
double riskFreeRate,
double volatility,
double discountRate,
double theta,
double kappa,
double xi,
double rho,
HestonModel.Scheme scheme,
AbstractRandomVariableFactory randomVariableFactory)
Create a Heston model.
|
HestonModel(double initialValue,
double riskFreeRate,
double volatility,
double theta,
double kappa,
double xi,
double rho,
HestonModel.Scheme scheme)
Create a Heston model.
|
HestonModel(HestonModelDescriptor descriptor,
HestonModel.Scheme scheme,
AbstractRandomVariableFactory randomVariableFactory)
Create the model from a descriptor.
|
HestonModel(RandomVariable initialValue,
DiscountCurve discountCurveForForwardRate,
RandomVariable volatility,
DiscountCurve discountCurveForDiscountRate,
RandomVariable theta,
RandomVariable kappa,
RandomVariable xi,
RandomVariable rho,
HestonModel.Scheme scheme,
AbstractRandomVariableFactory randomVariableFactory)
Create a Heston model.
|
HestonModel(RandomVariable initialValue,
RandomVariable riskFreeRate,
RandomVariable volatility,
RandomVariable discountRate,
RandomVariable theta,
RandomVariable kappa,
RandomVariable xi,
RandomVariable rho,
HestonModel.Scheme scheme,
AbstractRandomVariableFactory randomVariableFactory)
Create a Heston model.
|
| Modifier and Type | Method and Description |
|---|---|
RandomVariable |
applyStateSpaceTransform(int componentIndex,
RandomVariable randomVariable)
Applies the state space transform fi to the given state random variable
such that Yi → fi(Yi) =: Xi.
|
RandomVariable |
applyStateSpaceTransformInverse(int componentIndex,
RandomVariable randomVariable) |
HestonModel |
getCloneWithModifiedData(Map<String,Object> dataModified)
Returns a clone of this model where the specified properties have been modified.
|
RandomVariable[] |
getDrift(int timeIndex,
RandomVariable[] realizationAtTimeIndex,
RandomVariable[] realizationPredictor)
This method has to be implemented to return the drift, i.e.
|
RandomVariable[] |
getFactorLoading(int timeIndex,
int component,
RandomVariable[] realizationAtTimeIndex)
This method has to be implemented to return the factor loadings, i.e.
|
RandomVariable[] |
getInitialState()
Returns the initial value of the state variable of the process Y, not to be
confused with the initial value of the model X (which is the state space transform
applied to this state value.
|
int |
getNumberOfComponents()
Returns the number of components
|
RandomVariable |
getNumeraire(double time)
Return the numeraire at a given time index.
|
RandomVariable |
getRandomVariableForConstant(double value)
Return a random variable initialized with a constant using the models random variable factory.
|
RandomVariable |
getRiskFreeRate()
Returns the risk free rate parameter of this model.
|
RandomVariable |
getVolatility()
Returns the volatility parameter of this model.
|
String |
toString() |
getInitialValue, getMonteCarloWeights, getNumberOfFactors, getProcess, getProcessValue, getReferenceDate, getTime, getTimeDiscretization, getTimeIndex, setProcesspublic HestonModel(HestonModelDescriptor descriptor, HestonModel.Scheme scheme, AbstractRandomVariableFactory randomVariableFactory)
descriptor - A descriptor of the product.scheme - The scheme.randomVariableFactory - A random variable factory to be used for the parameters.public HestonModel(RandomVariable initialValue, DiscountCurve discountCurveForForwardRate, RandomVariable volatility, DiscountCurve discountCurveForDiscountRate, RandomVariable theta, RandomVariable kappa, RandomVariable xi, RandomVariable rho, HestonModel.Scheme scheme, AbstractRandomVariableFactory randomVariableFactory)
initialValue - \( S_{0} \) - spot - initial value of SdiscountCurveForForwardRate - the discount curve \( df^{\text{c}} \) used to calculate the risk free rate \( r^{\text{c}}(t_{i},t_{i+1}) = \frac{\ln(\frac{df^{\text{c}}(t_{i})}{df^{\text{c}}(t_{i+1})}}{t_{i+1}-t_{i}} \)volatility - \( \sigma \) the initial volatility leveldiscountCurveForDiscountRate - the discount curve \( df^{\text{d}} \) used to calculate the numeraire, \( r^{\text{d}}(t_{i},t_{i+1}) = \frac{\ln(\frac{df^{\text{d}}(t_{i})}{df^{\text{d}}(t_{i+1})}}{t_{i+1}-t_{i}} \)theta - \( \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 driversscheme - The truncation scheme, that is, either reflection (V → abs(V)) or truncation (V → max(V,0)).randomVariableFactory - The factory to be used to construct random variables.public HestonModel(RandomVariable initialValue, RandomVariable riskFreeRate, RandomVariable volatility, RandomVariable discountRate, RandomVariable theta, RandomVariable kappa, RandomVariable xi, RandomVariable rho, HestonModel.Scheme scheme, AbstractRandomVariableFactory randomVariableFactory)
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 driversscheme - The truncation scheme, that is, either reflection (V → abs(V)) or truncation (V → max(V,0)).randomVariableFactory - The factory to be used to construct random variables.public HestonModel(double initialValue,
double riskFreeRate,
double volatility,
double discountRate,
double theta,
double kappa,
double xi,
double rho,
HestonModel.Scheme scheme,
AbstractRandomVariableFactory randomVariableFactory)
initialValue - Spot value.riskFreeRate - The risk free rate.volatility - The log volatility.discountRate - The discount rate used in the numeraire.theta - The longterm mean reversion level of V (a reasonable value is volatility*volatility).kappa - The mean reversion speed.xi - The volatility of the volatility (of V).rho - The instantaneous correlation of the Brownian drivers (aka leverage).scheme - The truncation scheme, that is, either reflection (V → abs(V)) or truncation (V → max(V,0)).randomVariableFactory - The factory to be used to construct random variables..public HestonModel(double initialValue,
double riskFreeRate,
double volatility,
double discountRate,
double theta,
double kappa,
double xi,
double rho,
HestonModel.Scheme scheme)
initialValue - Spot value.riskFreeRate - The risk free rate.volatility - The log volatility.discountRate - The discount rate used in the numeraire.theta - The longterm mean reversion level of V (a reasonable value is volatility*volatility).kappa - The mean reversion speed.xi - The volatility of the volatility (of V).rho - The instantaneous correlation of the Brownian drivers (aka leverage).scheme - The truncation scheme, that is, either reflection (V → abs(V)) or truncation (V → max(V,0)).public HestonModel(double initialValue,
double riskFreeRate,
double volatility,
double theta,
double kappa,
double xi,
double rho,
HestonModel.Scheme scheme)
initialValue - Spot value.riskFreeRate - The risk free rate.volatility - The log volatility.theta - The longterm mean reversion level of V (a reasonable value is volatility*volatility).kappa - The mean reversion speed.xi - The volatility of the volatility (of V).rho - The instantaneous correlation of the Brownian drivers (aka leverage).scheme - The truncation scheme, that is, either reflection (V → abs(V)) or truncation (V → max(V,0)).public RandomVariable[] getInitialState()
ProcessModelpublic RandomVariable[] getDrift(int timeIndex, RandomVariable[] realizationAtTimeIndex, RandomVariable[] realizationPredictor)
ProcessModeltimeIndex - The time index (related to the model times discretization).realizationAtTimeIndex - The given realization at timeIndexrealizationPredictor - The given realization at timeIndex+1 or null if no predictor is available.public RandomVariable[] getFactorLoading(int timeIndex, int component, RandomVariable[] realizationAtTimeIndex)
ProcessModeltimeIndex - The time index (related to the model times discretization).component - The index j of the driven component.realizationAtTimeIndex - The realization of X at the time corresponding to timeIndex (in order to implement local and stochastic volatlity models).public RandomVariable applyStateSpaceTransform(int componentIndex, RandomVariable randomVariable)
ProcessModelcomponentIndex - The component index i.randomVariable - The state random variable Yi.public RandomVariable applyStateSpaceTransformInverse(int componentIndex, RandomVariable randomVariable)
public RandomVariable getNumeraire(double time)
ProcessModeltime - The time t for which the numeraire N(t) should be returned.RandomVariableFromDoubleArraypublic int getNumberOfComponents()
ProcessModelpublic RandomVariable getRandomVariableForConstant(double value)
ProcessModelvalue - The constant value.public HestonModel getCloneWithModifiedData(Map<String,Object> dataModified)
ProcessModeldataModified. If data is provided which is ignored by the model
no exception may be thrown.dataModified - Key-value-map of parameters to modify.public RandomVariable getRiskFreeRate()
public RandomVariable getVolatility()
Copyright © 2019. All rights reserved.