Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Correlations Class Reference

#include <VolatilityAndCorrelation.h>

Inheritance diagram for Correlations:

CS_Correlations JR_Correlations List of all members.

Detailed Description

Constant instantaneous correlations of asset returns, log-Libors, ... To simplify calibration (the same parameters for all types) we assume that the correlations depend on three Real paramters

If more are needed the calibration routines will have to be rewritten in trivial ways. Only Libor correlations are implemented. To cater to this case the correlations are indexed

with index base 1. All matrices, vectors respect this convention. The reason is that Libor is constant and is not evolved.

Definition at line 329 of file VolatilityAndCorrelation.h.

Public Member Functions

int getType () const
int getDimension () const
 Correlations (int n, Real alpha, Real beta, Real r_oo, int correlationType)
virtual ~Correlations ()
virtual void setCorrelations ()=0
Realoperator() (int i, int j)
const UTRRealMatrixgetCorrelationMatrix () const
void setParameters (Real _alpha, Real _beta, Real _r_oo)
virtual std::ostream & printSelf (std::ostream &os) const=0
std::string correlationType ()

Static Public Member Functions

string correlationType (int type)
Correlations * sample (int n, int type)

Static Public Attributes

const int JR = 0
const int CS = 1

Protected Attributes

int n
int corrType
Real alpha
Real beta
Real r_oo
UTRRealMatrix correlationMatrix

Constructor & Destructor Documentation

Correlations::Correlations int    n,
Real    alpha,
Real    beta,
Real    r_oo,
int    correlationType

Correlation matrix is allocated but not initialized Do this from the concrete subclasses.

correlationType JR or CS.
alpha see class description.

virtual Correlations::~Correlations   [inline, virtual]

Definition at line 366 of file VolatilityAndCorrelation.h.

Member Function Documentation

int Correlations::getType   const [inline]

CS or JR.

Definition at line 350 of file VolatilityAndCorrelation.h.

string Correlations::correlationType int    type [static]

"CS" or "JR", converts integer type ID to string.

int Correlations::getDimension   const [inline]

n: index range [1,n).

Definition at line 356 of file VolatilityAndCorrelation.h.

Correlations* Correlations::sample int    n,
int    type

A sample correlation in dimension n of type = JR, CS.

virtual void Correlations::setCorrelations   [pure virtual]

Update correlation matrix using the current parameters.

Implemented in JR_Correlations, and CS_Correlations.

Real& Correlations::operator() int    i,
int    j

Correlations for .

const UTRRealMatrix& Correlations::getCorrelationMatrix   const [inline]

The upper half of the correlation matrix

Definition at line 385 of file VolatilityAndCorrelation.h.

void Correlations::setParameters Real    _alpha,
Real    _beta,
Real    _r_oo

Sets the parameters (calibration).

virtual std::ostream& Correlations::printSelf std::ostream &    os const [pure virtual]

Message and fields.

Implemented in JR_Correlations, and CS_Correlations.

std::string Correlations::correlationType  

Converts integer type ID to string "JR", "CS".

Member Data Documentation

int Correlations::n [protected]

Index range [1,n).

Definition at line 334 of file VolatilityAndCorrelation.h.

int Correlations::corrType [protected]

The type of correlations JR, CS

Definition at line 338 of file VolatilityAndCorrelation.h.

Real Correlations::alpha [protected]

Definition at line 340 of file VolatilityAndCorrelation.h.

Real Correlations::beta [protected]

Definition at line 340 of file VolatilityAndCorrelation.h.

Real Correlations::r_oo [protected]

Definition at line 340 of file VolatilityAndCorrelation.h.

UTRRealMatrix Correlations::correlationMatrix [protected]

Definition at line 342 of file VolatilityAndCorrelation.h.

const int Correlations::JR = 0 [static]

Correlation type JR, CS.

Definition at line 347 of file VolatilityAndCorrelation.h.

const int Correlations::CS = 1 [static]

Correlation type JR, CS.

Definition at line 347 of file VolatilityAndCorrelation.h.

The documentation for this class was generated from the following file:
Generated on Mon Sep 22 02:16:32 2003 for Libor-Library by doxygen1.3-rc3