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

ControlledRandomVariable Class Reference

#include <ControlledRandomVariable.h>

Inheritance diagram for ControlledRandomVariable:

RandomObject< RealVector > StandardNormalVariable List of all members.

Detailed Description

Class improving the convergence of expectations of the underlying random variable X by the use of control variates.

Michael J. Meyer

Definition at line 52 of file ControlledRandomVariable.h.

Public Member Functions

Real getBeta () const
void setBeta ()
 ControlledRandomVariable ()
virtual RealVector nextValue ()=0
virtual Real getControlVariateMean ()=0
RandomVariablecontrolled ()
Real expectation (int N)
Real expectation (int N, string message)
void controlVariateMeanTest (int N)
Real betaCoefficient ()
Real correlationWithControlVariate (int N)

Constructor & Destructor Documentation


beta must be initialized from each concrete subclass by calling setBeta().

Member Function Documentation

Real ControlledRandomVariable::getBeta   const [inline]

Definition at line 63 of file ControlledRandomVariable.h.

References Real.

void ControlledRandomVariable::setBeta   [inline]

This function MUST be called from the concrete subclass defining nextValue(). The beta coefficient cannot be initialized by the current constructor since in a constructor the virtual function call nextValue() resolves to the local (here: pure virtual) version.

Definition at line 71 of file ControlledRandomVariable.h.

References betaCoefficient().

Referenced by StandardNormalVariable::StandardNormalVariable().

virtual RealVector ControlledRandomVariable::nextValue   [pure virtual]

random deviate - control variate pair from base class RandomVector so a derived class can define this.

Implements RandomObject< RealVector >.

Implemented in StandardNormalVariable.

virtual Real ControlledRandomVariable::getControlVariateMean   [pure virtual]

The mean of the control variate. It is either known or derived from a simulation which is significantly faster than the simulation of X (this).

Implemented in StandardNormalVariable.

RandomVariable* ControlledRandomVariable::controlled  

The random variable , where Y is the control variate of X and is the beta coefficient.

Real ControlledRandomVariable::expectation int    N

Expectation of X computed from a sample of size N. It's simply the ordinary Monte Carlo expectation of the controlled version controlled() of X.

N sample size.

Reimplemented from RandomObject< RealVector >.

Real ControlledRandomVariable::expectation int    N,
string    message

Same as expectation(int) but with computational progress reported as count down.

N Sample size.
message string descriptive of computation.

Reimplemented from RandomObject< RealVector >.

void ControlledRandomVariable::controlVariateMeanTest int    N

Tests if the method for computing the mean of the control variate at time zero is correct by comparing the returned value against a Monte Carlo mean of the control variate.

N sample size for the Monte Carlo control variate mean

Real ControlledRandomVariable::betaCoefficient  

Computes the coefficient beta=Cov(X,Y)/Var(X), where Y is the control variate of X (this); nBeta=2000 samples are generated to estimate this quantity.

Referenced by setBeta().

Real ControlledRandomVariable::correlationWithControlVariate int    N

The correlation of the control variate with random variable X (this) computed from a sample of size N.

This routine is only called to test the quality of a prospective control variate. Thus we forgo efficiency and simply reduce this to variance, covariance computations.

N Sample size.

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