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

## Class AbstractLIBORCovarianceModel

• java.lang.Object
• net.finmath.montecarlo.interestrate.modelplugins.AbstractLIBORCovarianceModel
• ### Constructor Summary

Constructors
Constructor and Description
AbstractLIBORCovarianceModel(TimeDiscretizationInterface timeDiscretization, TimeDiscretizationInterface liborPeriodDiscretization, int numberOfFactors)
Constructor consuming time discretizations, which are handled by the super class.
• ### Method Summary

All Methods
Modifier and Type Method and Description
RandomVariableInterface getCovariance(double time, int component1, int component2, RandomVariableInterface[] realizationAtTimeIndex)
RandomVariableInterface getCovariance(int timeIndex, int component1, int component2, RandomVariableInterface[] realizationAtTimeIndex)
RandomVariableInterface[] getFactorLoading(double time, double component, RandomVariableInterface[] realizationAtTimeIndex)
Return the factor loading for a given time and a given component.
RandomVariableInterface[] getFactorLoading(double time, int component, RandomVariableInterface[] realizationAtTimeIndex)
abstract RandomVariableInterface[] getFactorLoading(int timeIndex, int component, RandomVariableInterface[] realizationAtTimeIndex)
Return the factor loading for a given time index and component index.
abstract RandomVariableInterface getFactorLoadingPseudoInverse(int timeIndex, int component, int factor, RandomVariableInterface[] realizationAtTimeIndex)
Returns the pseudo inverse of the factor matrix.
TimeDiscretizationInterface getLiborPeriodDiscretization()
The forward rate time discretization associated with this model (defines the components).
int getNumberOfFactors()
TimeDiscretizationInterface getTimeDiscretization()
The simulation time discretization associated with this model.
• ### Methods inherited from class java.lang.Object

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

• #### AbstractLIBORCovarianceModel

public AbstractLIBORCovarianceModel(TimeDiscretizationInterface timeDiscretization,
TimeDiscretizationInterface liborPeriodDiscretization,
int numberOfFactors)
Constructor consuming time discretizations, which are handled by the super class.
Parameters:
timeDiscretization - The vector of simulation time discretization points.
liborPeriodDiscretization - The vector of tenor discretization points.
numberOfFactors - The number of factors to use (a factor reduction is performed)
• ### Method Detail

public RandomVariableInterface[] getFactorLoading(double time,
double component,
RandomVariableInterface[] realizationAtTimeIndex)
Return the factor loading for a given time and a given component. 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. With respect to simulation time t, this method uses a piece wise constant interpolation, i.e., it calculates t_i such that t_i is the largest point in getTimeDiscretization such that t_i ≤ t . The component here, it given via a double T which may be associated with the LIBOR fixing date. With respect to component time T, this method uses a piece wise constant interpolation, i.e., it calculates T_j such that T_j is the largest point in getTimeDiscretization such that T_j ≤ T .
Parameters:
time - The time t at which factor loading is requested.
component - The component time (as a double associated with the fixing of the forward rate) Ti.
realizationAtTimeIndex - The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
Returns:

public RandomVariableInterface[] getFactorLoading(double time,
int component,
RandomVariableInterface[] realizationAtTimeIndex)
Return the factor loading for a given time 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. With respect to simulation time t, this method uses a piece wise constant interpolation, i.e., it calculates t_i such that t_i is the largest point in getTimeDiscretization such that t_i ≤ t .
Parameters:
time - The time t at which factor loading is requested.
component - The index of the component i. Note that this class may have its own LIBOR time discretization and that this index refers to this discretization.
realizationAtTimeIndex - The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
Returns:

public abstract RandomVariableInterface[] getFactorLoading(int timeIndex,
int component,
RandomVariableInterface[] realizationAtTimeIndex)
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.
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 abstract RandomVariableInterface getFactorLoadingPseudoInverse(int timeIndex,
int component,
int factor,
RandomVariableInterface[] realizationAtTimeIndex)
Returns the pseudo inverse of the factor matrix.
Parameters:
timeIndex - The time index at which factor loading inverse is requested.
factor - The index of the factor j.
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:
• #### getCovariance

public RandomVariableInterface getCovariance(double time,
int component1,
int component2,
RandomVariableInterface[] realizationAtTimeIndex)
Parameters:
time - The time t at which covariance is requested.
component1 - Index of component i.
component2 - Index of component j.
realizationAtTimeIndex - The realization of the stochastic process.
Returns:
The instantaneous covariance between component i and j.
• #### getCovariance

public RandomVariableInterface getCovariance(int timeIndex,
int component1,
int component2,
RandomVariableInterface[] realizationAtTimeIndex)
Parameters:
timeIndex - The time index at which covariance is requested.
component1 - Index of component i.
component2 - Index of component j.
realizationAtTimeIndex - The realization of the stochastic process.
Returns:
The instantaneous covariance between component i and j.
• #### getTimeDiscretization

public TimeDiscretizationInterface getTimeDiscretization()
The simulation time discretization associated with this model.
Returns:
the timeDiscretization
• #### getLiborPeriodDiscretization

public TimeDiscretizationInterface getLiborPeriodDiscretization()
The forward rate time discretization associated with this model (defines the components).
Returns:
the forward rate time discretization associated with this model.
• #### getNumberOfFactors

public int getNumberOfFactors()
Returns:
the numberOfFactors