finMath lib documentation
net.finmath.montecarlo.interestrate.modelplugins

## Class LIBORCovarianceModelStochasticHestonVolatility

• All Implemented Interfaces:
Serializable, LIBORCovarianceModelCalibrateable

public class LIBORCovarianceModelStochasticHestonVolatility
extends AbstractLIBORCovarianceModelParametric
As Heston like stochastic volatility model, using a process $$lambda(t) = \sqrt(V(t))$$ $dV(t) = \kappa ( \theta - V(t) ) dt + \xi \sqrt{V(t)} dW_{1}(t), \quad V(0) = 1.0,$ where $$\lambda(0) = 1$$ to scale all factor loadings $$f_{i}$$ returned by a given covariance model. The model constructed is $$\lambda(t) F(t)$$ where $$\lambda(t)$$ is a discretization of the above process and $$F = ( f_{1}, \ldots, f_{m} )$$ is the factor loading from the given covariance model. The process uses the first factor of the Brownian motion provided by an object implementing BrownianMotionInterface. This can be used to generate correlations to other objects. If you like to reuse a factor of another Brownian motion use a BrownianMotionView to delegate $$( \mathrm{d} W_{1}(t) )$$ to a different object. The parameter of this model is a joint parameter vector, consisting of the parameter vector of the given base covariance model and appending the parameters κ, θ and ξ at the end. If this model is not calibrateable, its parameter vector is that of the covariance model, i.e., ν and ρ will be not part of the calibration. For an illustration of its usage see the associated unit test.
Version:
1.0
Author:
Christian Fries
Serialized Form
• ### Constructor Summary

Constructors
Constructor and Description
LIBORCovarianceModelStochasticHestonVolatility(AbstractLIBORCovarianceModelParametric covarianceModel, BrownianMotionInterface brownianMotion, double kappa, double theta, double xi, boolean isCalibrateable)
Create a modification of a given AbstractLIBORCovarianceModelParametric with a stochastic volatility scaling.
• ### Method Summary

All Methods
Modifier and Type Method and Description
Object clone()
AbstractLIBORCovarianceModelParametric getCloneWithModifiedParameters(double[] parameters)
Return an instance of this model using a new set of parameters.
RandomVariableInterface[] getFactorLoading(int timeIndex, int component, RandomVariableInterface[] realizationAtTimeIndex)
Return the factor loading for a given time index and component index.
RandomVariableInterface getFactorLoadingPseudoInverse(int timeIndex, int component, int factor, RandomVariableInterface[] realizationAtTimeIndex)
Returns the pseudo inverse of the factor matrix.
double[] getParameter()
Get the parameters of determining this parametric covariance model.
• ### Methods inherited from class net.finmath.montecarlo.interestrate.modelplugins.AbstractLIBORCovarianceModelParametric

getCloneCalibrated, getCloneCalibrated, getCloneCalibrated, toString
• ### Methods inherited from class net.finmath.montecarlo.interestrate.modelplugins.AbstractLIBORCovarianceModel

getCovariance, getCovariance, getFactorLoading, getFactorLoading, getLiborPeriodDiscretization, getNumberOfFactors, getTimeDiscretization
• ### Methods inherited from class java.lang.Object

equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Constructor Detail

• #### LIBORCovarianceModelStochasticHestonVolatility

public LIBORCovarianceModelStochasticHestonVolatility(AbstractLIBORCovarianceModelParametric covarianceModel,
BrownianMotionInterface brownianMotion,
double kappa,
double theta,
double xi,
boolean isCalibrateable)
Create a modification of a given AbstractLIBORCovarianceModelParametric with a stochastic volatility scaling.
Parameters:
covarianceModel - A given AbstractLIBORCovarianceModelParametric.
brownianMotion - An object implementing BrownianMotionInterface with at least two factors. This class uses the first two factors, but you may use BrownianMotionView to change this.
kappa - The initial value for κ, the mean reversion speed of the variance process V.
theta - The initial value for θ the mean reversion level of the variance process V.
xi - The initial value for ξ the volatility of the variance process V.
isCalibrateable - If true, the parameters ν and ρ are parameters. Note that the covariance model (covarianceModel) may have its own parameter calibration settings.
• ### Method Detail

• #### getParameter

public double[] getParameter()
Description copied from class: AbstractLIBORCovarianceModelParametric
Get the parameters of determining this parametric covariance model. The parameters are usually free parameters which may be used in calibration.
Specified by:
getParameter in class AbstractLIBORCovarianceModelParametric
Returns:
Parameter vector.
• #### clone

public Object clone()
Specified by:
clone in class AbstractLIBORCovarianceModelParametric
• #### getCloneWithModifiedParameters

public AbstractLIBORCovarianceModelParametric getCloneWithModifiedParameters(double[] parameters)
Description copied from class: AbstractLIBORCovarianceModelParametric
Return an instance of this model using a new set of parameters. Note: To improve performance it is admissible to return the same instance of the object given that the parameters have not changed. Models should be immutable.
Specified by:
getCloneWithModifiedParameters in class AbstractLIBORCovarianceModelParametric
Parameters:
parameters - The new set of parameters.
Returns:
An instance of AbstractLIBORCovarianceModelParametric with modified parameters.

public RandomVariableInterface[] getFactorLoading(int timeIndex,
int component,
RandomVariableInterface[] realizationAtTimeIndex)
Description copied from class: AbstractLIBORCovarianceModel
Return the factor loading for a given time index and component index. The factor loading is the vector fi such that the scalar product
fjfk = fj,1fk,1 + ... + fj,mfk,m
is the instantaneous covariance of the component j and k.
Specified by:
getFactorLoading in class AbstractLIBORCovarianceModel
Parameters:
timeIndex - The time index at which factor loading is requested.
component - The index of the component i.
realizationAtTimeIndex - The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
Returns:

public RandomVariableInterface getFactorLoadingPseudoInverse(int timeIndex,
int component,
int factor,
RandomVariableInterface[] realizationAtTimeIndex)
Description copied from class: AbstractLIBORCovarianceModel
Returns the pseudo inverse of the factor matrix.
Specified by:
getFactorLoadingPseudoInverse in class AbstractLIBORCovarianceModel
Parameters:
timeIndex - The time index at which factor loading inverse is requested.
component - The index of the component i.
factor - The index of the factor j.
realizationAtTimeIndex - The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
Returns:
The entry of the pseudo-inverse of the factor loading matrix.