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

Option Class Reference

#include <Option.h>

Inheritance diagram for Option:

LiborDerivative BermudanSwaption BondCall Caplet Swaption List of all members.

Detailed Description

General Bermudan option. Exercise can be allowed at an arbitrary sequence of times. European and American options are special cases (exercise only at expiry respectively at each time step). Terminology uses forward prices at the horizon (as is usual for Libor derivatives) not discounted prices (as is more common for most other derivatives). This works in all cases. The horizon is usually the date of option expiry. In the case of Libor derivatives the horizon is the end of the last Libor accrual period regardless of the date of option expiry.

Definition at line 80 of file Option.h.

Public Member Functions

Real getExpiration ()
 Option (Real T, bool an, bool lt, bool mc, bool cv)
virtual bool isExercisable (Real t)
virtual Real nextForwardPayoff ()
virtual Real controlVariateMean ()
virtual const RealArray1D nextControlledForwardPayoff ()
template<typename LatticeType, int t> Real forwardPayoff (typename LatticeType::NodeType *node, LatticeType *theLattice, int t)
virtual Real analyticForwardPrice () const
Real monteCarloForwardPrice (int N)
Real controlledMonteCarloForwardPrice (int nPaths)
Real correlationWithControlVariate (int N)
virtual Real latticeForwardPrice ()
virtual std::ostream & printSelf (std::ostream &os) const

Protected Attributes

Real T_
bool hasAnalytic_
bool hasLattice_
bool hasMonteCarlo_
bool hasControlVariate_


Constructor & Destructor Documentation

Option::Option Real    T,
bool    an,
bool    lt,
bool    mc,
bool    cv
[inline]
 

Parameters:
T time to expiry in years.
an analytic pricing formula is implemented.
lt lattice pricing is implemented.
mc Monte Carlo pricing is implemented.
cv control variate is implemented.

Definition at line 102 of file Option.h.


Member Function Documentation

Real Option::getExpiration   [inline]
 

Number of time steps to expiration.

Definition at line 94 of file Option.h.

References Real.

virtual bool Option::isExercisable Real    t [inline, virtual]
 

Wether the option can be exercised at continuous time t < expiration. Returns false defaulting to European exercise. Override as appropriate.

Reimplemented in BermudanSwaption.

Definition at line 112 of file Option.h.

virtual Real Option::nextForwardPayoff   [inline, virtual]
 

The next forward payoff random sample.

Reimplemented in BermudanSwaption, Caplet, Swaption, and BondCall.

Definition at line 115 of file Option.h.

References Real.

virtual Real Option::controlVariateMean   [inline, virtual]
 

Returns default 0.0. Override.

Reimplemented in Caplet, Swaption, and BondCall.

Definition at line 118 of file Option.h.

References Real.

virtual const RealArray1D Option::nextControlledForwardPayoff   [virtual]
 

Vector Z with Z[0] the next forward payoff random sample and Z[1] the corresponding control variate. Default returns (-1.0,0.0). Return by value since it is so small.

Reimplemented in Caplet, Swaption, and BondCall.

template<typename LatticeType, int t>
Real Option::forwardPayoff typename LatticeType::NodeType *    node,
LatticeType *    theLattice,
int    t
[inline]
 

Forward compounded payoff of the option if exercised at node node living at time step t in lattice theLattice. Returns -1.0. To be overriddden by appropriate specializations.

Definition at line 132 of file Option.h.

virtual Real Option::analyticForwardPrice   const [virtual]
 

Error message that nothing is implemented in this generality. Returns -1.

Reimplemented in Caplet, Swaption, and BondCall.

Real Option::monteCarloForwardPrice int    N
 

Forward price computed from N sample payoffs of the option.

Real Option::controlledMonteCarloForwardPrice int    nPaths
 

Forward price computed from from N sample payoffs of the option using the control variate implemented with the option.

Real Option::correlationWithControlVariate int    N
 

The correlation of the forward payoff with its control variate computed from N sample payoff - controlVariate pairs of the option.

virtual Real Option::latticeForwardPrice   [virtual]
 

Forward price computed in the default lattice. Error message that nothing is implemented in this generality. Returns -1.

Reimplemented in LiborDerivative.

virtual std::ostream& Option::printSelf std::ostream &    os const [virtual]
 

Message descriptive of derivative.

Reimplemented in BermudanSwaption, LiborDerivative, Caplet, Swaption, and BondCall.


Member Data Documentation

Real Option::T_ [protected]
 

Definition at line 84 of file Option.h.

bool Option::hasAnalytic_ [protected]
 

Definition at line 85 of file Option.h.

bool Option::hasLattice_ [protected]
 

Definition at line 85 of file Option.h.

bool Option::hasMonteCarlo_ [protected]
 

Definition at line 85 of file Option.h.

bool Option::hasControlVariate_ [protected]
 

Definition at line 85 of file Option.h.


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