OneFactorStudentCopula Class Reference

One-factor Double Student t-Copula. More...

#include <ql/experimental/credit/onefactorstudentcopula.hpp>

Inheritance diagram for OneFactorStudentCopula:

Public Member Functions

 OneFactorStudentCopula (const Handle< Quote > &correlation, int nz, int nm, Real maximum=10, Size integrationSteps=200)
 
Real density (Real m) const
 Density function of M.
 
Real cumulativeZ (Real z) const
 Cumulative distribution of Z.
 
- Public Member Functions inherited from OneFactorCopula
 OneFactorCopula (const Handle< Quote > &correlation, Real maximum=5.0, Size integrationSteps=50, Real minimum=-5.0)
 
virtual Real cumulativeY (Real y) const
 Cumulative distribution of Y.
 
virtual Real inverseCumulativeY (Real p) const
 Inverse cumulative distribution of Y.
 
Real correlation () const
 Single correlation parameter.
 
Real conditionalProbability (Real prob, Real m) const
 Conditional probability.
 
std::vector< RealconditionalProbability (const std::vector< Real > &prob, Real m) const
 Vector of conditional probabilities.
 
Real integral (Real p) const
 
template<class F >
Real integral (const F &f, std::vector< Real > &probabilities) const
 
template<class F >
Distribution integral (const F &f, const std::vector< Real > &nominals, const std::vector< Real > &probabilities) const
 
int checkMoments (Real tolerance) const
 
- Public Member Functions inherited from LazyObject
void update ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
std::pair< std::set
< boost::shared_ptr
< Observable > >::iterator,
bool > 
registerWith (const boost::shared_ptr< Observable > &)
 
Size unregisterWith (const boost::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 

Additional Inherited Members

- Protected Member Functions inherited from OneFactorCopula
Size steps () const
 
Real dm (Size i) const
 
Real m (Size i) const
 
Real densitydm (Size i) const
 
- Protected Attributes inherited from OneFactorCopula
Handle< Quotecorrelation_
 
Real max_
 
Size steps_
 
Real min_
 
std::vector< Realy_
 
std::vector< RealcumulativeY_
 

Detailed Description

One-factor Double Student t-Copula.

The copula model

\[ Y_i = a_i\,M+\sqrt{1-a_i^2}\:Z_i \]

  is specified here by setting the probability density functions
  for \form#120 ( \form#121) and \form#122 ( \form#123) to
  Student t-distributions with \form#124 and \form#125
  degrees of freedom, respectively.

  The variance of the Student t-distribution with \form#126
  degrees of freedom is \form#127. Since the
  copula approach requires zero mean and unit variance
  distributions, variables \form#128 and \form#122 are scaled by

$ \sqrt{(N_z - 2) / N_z} $ and $ \sqrt{(N_m - 2) / N_m}, $ respectively.

Possible enhancements:
Improve performance/accuracy of the calculation of inverse cumulative Y. Tabulate and store it for selected correlations?

Member Function Documentation

Real density ( Real  m) const
virtual

Density function of M.

Derived classes must override this method and ensure zero mean and unit variance.

Implements OneFactorCopula.

Real cumulativeZ ( Real  z) const
virtual

Cumulative distribution of Z.

Derived classes must override this method and ensure zero mean and unit variance.

Implements OneFactorCopula.