Libor.LiborProcess
Class FactorLoading

java.lang.Object
  extended byLibor.LiborProcess.FactorLoading
Direct Known Subclasses:
CS_FactorLoading, EP_FactorLoading, JR_FactorLoading

public abstract class FactorLoading
extends java.lang.Object

This class provides access to the factor loadings nu_i(s) in the form of the Libor volatilities sigma_i(t) and correlations rho_ij. With t<T continuous times, set

cv_ij(s)=sigma_i(s)sigma_j(s)rho_ij=nu_i(s).nu_j(s)
and
CV_ij(t,T)=integral_t^T cv_ij(s)ds =<log(L_i),log(L_j)>_t^T

and let CV(t,T) be the matrix

CV(p,n,t,T)=( CV_ij(t,T) )_{p<=i,j<n}).

This matrix is called the (log Libor) covariation matrix on the interval [t,T]. The Cholesky root of this matrix is used in the simulation of the time step t->T for the Libors L_p,L_{p+1},...,L_{n-1}

Covariation matrix array. Since we simulate Libor paths with time steps T_t->T_{t+1} (ie. from one reset time to the next) we need the array CV[] of matrices CV[t]=CV(t+1,n,T_t,T_{t+1}), t=0,1,...,n-2. We also need the corresponding array L[] of Cholesky roots L[t] of CV[t].

These arrays are path independent and hence are best precomputed and stored in advance of any Libor path simulation. Only the upper triangular half of the matrices CV[t] is used and the matrices L[t] are lower triangular.

Consequently the array CV[] is allocated as a UTRMatrixArray (stores the upper half of each matrix CV[t]) while the array L[] is allocated as a LTRMatrixArray (stores the lower half of each matrix L[t]).

These structures expose references to the underlying raw java data array so access to the data is possible without accessor functions (speed).

The class FactorLoading has abstract methodes to compute various covariation integrals (which obviously depend on the concrete volatility and correlation structure) and uses these to compute the various matrices and matrix arrays and allocates the matrix arrays needed for path simulation.

Concrete subclass: the subclass CS_FactorLoading implements a volatility and correlation structure dependoing on five parameters following ideas of B. Coffey and J. Shoenmakers.


Constructor Summary
FactorLoading(int n, double[] Tc)
          The covariation and Cholesky root sequence arrays can be allocated but must be initialized from the concrete subclasses once all the structures necessary to compute the integrals are in place.
 
Method Summary
 LTRMatrixArray getCholeskyRootArray()
          The array of covariation matrices.
 UTRMatrixArray getCovariationMatrixArray()
          The array of covariation matrices.
 int getDimension()
          Number n of forward Libors including L_0.
 double[] getTenorStructure()
          Array Tc of continuous Libor reset times Tc[j]=T_j.
abstract  double integral_sgi_sgj_rhoij(int i, int j, double t, double T)
          The integral
integral_t^T sigma_i(s)sigma_j(s)rho_ijds= <log(L_i),log(L_j)>_t^T
neeeded for the distribution of time step increments.
 ColtMatrix logCovariationCholeskyRoot(int t)
          The Cholesky root of the logCovariationMatrix(int) This matrix is needed to drive the time step t->t+1 of the Libors (L_{t+1},...,L_{n-1}).
 ColtMatrix logCovariationCholeskyRoot(int p, int q, double t, double T)
          The Cholesky root of logCovariationMatrix(int,int,double,double).
 ColtMatrix logCovariationMatrix(int t)
          The matrix of covariations <log(L_i),log(L_j)>_{T_t}^{T_{t+1}}
 ColtMatrix logCovariationMatrix(int p, int q, double t, double T)
          The matrix of log-Libor covariations <log(L_i),log(L_j)>_t^T on the interval [t,T]
 ColtMatrix rho()
          The n by n matrix of instantaneous log-Libor correlations (rho_ij)_{0<=i,j<n}.
abstract  double rho(int i, int j)
          Instantaneous correlation rho_ij of log-Libor increments for 0<=i,j<n.
abstract  double sigma(int i, double t)
          Volatility sigma_i(t) of forward Libor L_i(t) See document LiborProcess.ps
abstract  java.lang.String toString()
          String containing a message indicating what type of facto loading it is, all the parameter values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactorLoading

public FactorLoading(int n,
                     double[] Tc)

The covariation and Cholesky root sequence arrays can be allocated but must be initialized from the concrete subclasses once all the structures necessary to compute the integrals are in place.

Parameters:
n - dimension of Libor process
Tc - tenor structure array
Method Detail

getDimension

public int getDimension()
Number n of forward Libors including L_0.


getTenorStructure

public double[] getTenorStructure()
Array Tc of continuous Libor reset times Tc[j]=T_j.


getCovariationMatrixArray

public UTRMatrixArray getCovariationMatrixArray()
The array of covariation matrices.


getCholeskyRootArray

public LTRMatrixArray getCholeskyRootArray()
The array of covariation matrices.


rho

public abstract double rho(int i,
                           int j)
Instantaneous correlation rho_ij of log-Libor increments for 0<=i,j<n. This includes L_0 and so takes the view that all Libors live to the horizon. See document LiborProcess.ps.

Parameters:
i - index of forward Libor L_i(t), 0<=i<n.
j - index of forward Libor L_j(t), 0<=j<n.

sigma

public abstract double sigma(int i,
                             double t)
Volatility sigma_i(t) of forward Libor L_i(t) See document LiborProcess.ps

Parameters:
i - index of forward Libor L_i(t).
t - current continuous time.

integral_sgi_sgj_rhoij

public abstract double integral_sgi_sgj_rhoij(int i,
                                              int j,
                                              double t,
                                              double T)
The integral
integral_t^T sigma_i(s)sigma_j(s)rho_ijds= <log(L_i),log(L_j)>_t^T
neeeded for the distribution of time step increments. See document LiborProcess.ps

Parameters:
i - index of forward Libor L_i(t)
j - index of forward Libor L_j(t)

toString

public abstract java.lang.String toString()
String containing a message indicating what type of facto loading it is, all the parameter values.


logCovariationMatrix

public ColtMatrix logCovariationMatrix(int t)

The matrix of covariations <log(L_i),log(L_j)>_{T_t}^{T_{t+1}}

CV(t)=( integral_{T_t}^{T_{t+1}}cv_ij(s)ds )_{i,j=t+1}^{n-1}
where
cv_ij(s)=sigma_i(s)sigma_j(s)rho_ij=nu_i(s).nu_j(s).

The Cholesky root of this matrix is needed to drive the time step t->t+1 of the Libors (L_{t+1},...,L_{n-1}).

WARNING: index shift to zero based matrix indices (i,j)->(i-t-1,j-t-1).

Parameters:
t - discrete time (continuous time T_t).

logCovariationCholeskyRoot

public ColtMatrix logCovariationCholeskyRoot(int t)
The Cholesky root of the logCovariationMatrix(int) This matrix is needed to drive the time step t->t+1 of the Libors (L_{t+1},...,L_{n-1}).

Parameters:
t - beginning of time interval (time step).

rho

public ColtMatrix rho()

The n by n matrix of instantaneous log-Libor correlations (rho_ij)_{0<=i,j<n}. Note that this includes Libor L_0 ie. we are taking the view here that all Libors live to the horizon. Otherwise L_0 would be a constant and correlations with L_0 undefined. See document LiborProcess.ps.


logCovariationMatrix

public ColtMatrix logCovariationMatrix(int p,
                                       int q,
                                       double t,
                                       double T)

The matrix of log-Libor covariations <log(L_i),log(L_j)>_t^T on the interval [t,T]

CV(p,q,t,T)=( integral_t^T cv_ij(s)ds )_{i,j=p}^{q-1}
where
cv_ij(s)=sigma_i(s)sigma_j(s)rho_ij=nu_i(s).nu_j(s).

WARNING: index shift to zero based matrix indices (i,j)->(i-p,j-p).

Parameters:
p - Libors L_j, j=p,...,q-1.
t - time interval [t,T], continuous time.
T - time interval [t,T], continuous time.

logCovariationCholeskyRoot

public ColtMatrix logCovariationCholeskyRoot(int p,
                                             int q,
                                             double t,
                                             double T)

The Cholesky root of logCovariationMatrix(int,int,double,double).

Parameters:
p - Libors L_j, j=p,...,q-1.
t - time interval [t,T], continuous time.
T - time interval [t,T], continuous time.