net.finmath.montecarlo.interestrate.models.covariance.LIBORCovarianceModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib Show documentation
Show all versions of finmath-lib Show documentation
finmath lib is a Mathematical Finance Library in Java.
It provides algorithms and methodologies related to mathematical finance.
/*
* (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
*
* Created on 20.05.2006
*/
package net.finmath.montecarlo.interestrate.models.covariance;
import net.finmath.montecarlo.interestrate.models.LIBORMarketModelFromCovarianceModel;
import net.finmath.stochastic.RandomVariable;
import net.finmath.time.TimeDiscretization;
/**
* Interface for covariance models providing a vector of (possibly stochastic) factor loadings.
*
* Classes implementing this interface can be used as "plug ins" for {@link LIBORMarketModelFromCovarianceModel}.
*
* @author Christian Fries
* @version 1.0
*/
public interface LIBORCovarianceModel {
/**
* 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 .
*
* @param time The time t at which factor loading is requested.
* @param component The component time (as a double associated with the fixing of the forward rate) Ti.
* @param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
* @return The factor loading fi(t).
*/
RandomVariable[] getFactorLoading(double time, double component, RandomVariable[] 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 .
*
* @param time The time t at which factor loading is requested.
* @param 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.
* @param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
* @return The factor loading fi(t).
*/
RandomVariable[] getFactorLoading(double time, int component, RandomVariable[] 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.
*
* @param timeIndex The time index at which factor loading is requested.
* @param component The index of the component i.
* @param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
* @return The factor loading fi(t).
*/
RandomVariable[] getFactorLoading(int timeIndex, int component, RandomVariable[] realizationAtTimeIndex);
/**
* Returns the pseudo inverse of the factor matrix.
*
* @param timeIndex The time index at which factor loading inverse is requested.
* @param factor The index of the factor j.
* @param component The index of the component i.
* @param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).
* @return The entry of the pseudo-inverse of the factor loading matrix.
*/
RandomVariable getFactorLoadingPseudoInverse(int timeIndex, int component, int factor,
RandomVariable[] realizationAtTimeIndex);
/**
* Returns the instantaneous covariance calculated from factor loadings.
*
* @param time The time t at which covariance is requested.
* @param component1 Index of component i.
* @param component2 Index of component j.
* @param realizationAtTimeIndex The realization of the stochastic process.
* @return The instantaneous covariance between component i and j.
*/
RandomVariable getCovariance(double time, int component1, int component2, RandomVariable[] realizationAtTimeIndex);
/**
* Returns the instantaneous covariance calculated from factor loadings.
*
* @param timeIndex The time index at which covariance is requested.
* @param component1 Index of component i.
* @param component2 Index of component j.
* @param realizationAtTimeIndex The realization of the stochastic process.
* @return The instantaneous covariance between component i and j.
*/
RandomVariable getCovariance(int timeIndex, int component1, int component2,
RandomVariable[] realizationAtTimeIndex);
/**
* The simulation time discretization associated with this model.
*
* @return the timeDiscretizationFromArray
*/
TimeDiscretization getTimeDiscretization();
/**
* The forward rate time discretization associated with this model (defines the components).
*
* @return the forward rate time discretization associated with this model.
*/
TimeDiscretization getLiborPeriodDiscretization();
/**
* @return the numberOfFactors
*/
int getNumberOfFactors();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy