Libor.LiborProcess
Class JR_FactorLoading

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

public class JR_FactorLoading
extends FactorLoading

Implements the correlation and volatility structure from Jaeckel's book Monte Carlo Methods in Finance.


Constructor Summary
JR_FactorLoading(int n, double a, double b, double c, double d, double[] k, 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
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.
static void main(java.lang.String[] args)
          Small test program.
 double rho(int i, int j)
          Instantaneous log-Libor correlations rho_ij for i,j>=1.
static JR_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

JR_FactorLoading

public JR_FactorLoading(int n,
                        double a,
                        double b,
                        double c,
                        double d,
                        double[] k,
                        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 rho_ij for i,j>=1.

Specified by:
rho in class FactorLoading
Parameters:
i - index of L_i(t), must satisfy i>=1.
j - index of L_j(t), must satisfy j>=1.

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
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

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 JR_FactorLoading sample(int n)

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

delta_j=0.25, k_j=0.25, a=1.3, b=2, c=0.5, d=1.0, beta=0.01.

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 JR factor loading of size n=20 and prints the Libor volatilities.