Libor.LiborProcess
Class EP_FactorLoading

java.lang.Object
  extended byLibor.LiborProcess.FactorLoading
      extended byLibor.LiborProcess.EP_FactorLoading

public class EP_FactorLoading
extends FactorLoading

A factor loading with log-Libor volatilities of the form sigma_j(t)=c_jg(1-t/T_j) with g(t)=1+Ah(t) where h(t)=t(1-t) and correlations rho_ij=b_i/b_j, for i<=j, with b_i=exp(beta*i^alpha).

Here A is intended to be positive. The volatility then is humped, peaking halfway to the date Libor is set.

This factor loading is used to generate the synthetic data we use to calibrate the LMM based on a CS_FactorLoading.


Constructor Summary
EP_FactorLoading(int n, double A, double alpha, double beta, double[] c, double[] Tc)
          For the meaning of the parameters A,D,alpha,beta,rho00 see LiborProcess.ps.
 
Method Summary
 ColtMatrix correlationMatrix()
          The correlation matrix rho_ij as a ColtMatrix.
 double[][] getRho()
          Accessor to correlation matrix rho[][].
 double integral_sgi_sgj_rhoij(int i, int j, double t, double T)
          The integral <log(L_i),log(L_j)>_t^T= int_t^T sigma_i(s)sigma_j(s)rho_ijds
neeeded for the distribution of time step increments.
static void main(java.lang.String[] args)
          Small test program.
 double rho(int i, int j)
          Instantaneous log-Libor correlations.
static EP_FactorLoading sample(int n)
          Provides a sample CS_FactorLoading object of dimension n.
 double sigma(int i, double t)
          Volatility sigma_i(t) of log(L_i(t)), defined on [0,T_i].
 java.lang.String toString()
          A message what type of factor loading it is, all the parameter values.
 
Methods inherited from class Libor.LiborProcess.FactorLoading
getCholeskyRootArray, getCovariationMatrixArray, getDimension, getTenorStructure, logCovariationCholeskyRoot, logCovariationCholeskyRoot, logCovariationMatrix, logCovariationMatrix, rho
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EP_FactorLoading

public EP_FactorLoading(int n,
                        double A,
                        double alpha,
                        double beta,
                        double[] c,
                        double[] Tc)
For the meaning of the parameters A,D,alpha,beta,rho00 see LiborProcess.ps. Parameter array c starts with c[0]=c_0 even though L_0(t) is constant and so superfluous.

Parameters:
n - number of forward Libors including L_0.
c - array of c_j factors calibrating volatilities to caplet prices.
Tc - continuous time tenor structure (0=T_0,T_1,...,T_n).
Method Detail

getRho

public double[][] getRho()
Accessor to correlation matrix rho[][]. WARNING: rho[i][j]=rho_{i+1,j+1} because we do not store the correlations rho_{0,j}.


correlationMatrix

public ColtMatrix correlationMatrix()
The correlation matrix rho_ij as a ColtMatrix. See LiborProcess.ps. Used for testing purposes only.


rho

public double rho(int i,
                  int j)
Instantaneous log-Libor correlations. Note the index shift since Libors L_i(t) start at i=1,2,...,n-1 while array indexing starts at zero.

Specified by:
rho in class FactorLoading
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 double sigma(int i,
                    double t)
Volatility sigma_i(t) of log(L_i(t)), defined on [0,T_i].

Specified by:
sigma in class FactorLoading
Parameters:
i - index of forward Libor L_i(t)
t - current continuous time.

integral_sgi_sgj_rhoij

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

Specified by:
integral_sgi_sgj_rhoij in class FactorLoading
Parameters:
i - index of forward Libor L_i(t)
j - index of forward Libor L_j(t)

sample

public static EP_FactorLoading sample(int n)

Provides a sample CS_FactorLoading object of dimension n. Parameter values are as follows:

delta_j=0.25, c_j=0.25, A=1.2, alpha=0.7, beta=0.4.

This choice implies annualized Libor volatilities of about 33% and a humped volatility peaking halfway out to the reset date.

Parameters:
n - dimension of the Libor process

toString

public java.lang.String toString()
A message what type of factor loading it is, all the parameter values.

Specified by:
toString in class FactorLoading

main

public static void main(java.lang.String[] args)
Small test program. Allocates a factor loading of size n=50 to time the computation of the matrix arrays (happens in the constructor). There is a separate class of junit tests which tests the class more thoroughly.