Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::Lattice< Impl > Class Template Reference

#include <lattice.hpp>

Inheritance diagram for QuantLib::Lattice< Impl >:

QuantLib::NumericalMethod QuantLib::CuriouslyRecurringTemplate< Impl > QuantLib::Lattice1D< Impl > QuantLib::Lattice2D< Impl, T > QuantLib::BlackScholesLattice< T > QuantLib::OneFactorModel::ShortRateTree QuantLib::TwoFactorModel::ShortRateTree QuantLib::TsiveriotisFernandesLattice< T >

List of all members.


Detailed Description

template<class Impl>
class QuantLib::Lattice< Impl >

Lattice-method base class.

This class defines a lattice method that is able to rollback (with discount) a discretized asset object. It will usually be based on one or more trees.

Derived classes must implement the following interface:

        public:
          DiscountFactor discount(Size i, Size index) const;
          Size descendant(Size i, Size index, Size branch) const;
          Real probability(Size i, Size index, Size branch) const;
and may implement the following:
        public:
          void stepback(Size i,
                        const Array& values,
                        Array& newValues) const;

Definition at line 57 of file lattice.hpp.


Public Member Functions

virtual Disposable< Arraygrid (Time) const =0
 Lattice (const TimeGrid &timeGrid, Size n)
const ArraystatePrices (Size i) const
void stepback (Size i, const Array &values, Array &newValues) const
NumericalMethod interface
void initialize (DiscretizedAsset &, Time t) const
 initialize an asset at the given time.
void partialRollback (DiscretizedAsset &, Time to) const
Real presentValue (DiscretizedAsset &) const
 Computes the present value of an asset using Arrow-Debrew prices.
void rollback (DiscretizedAsset &, Time to) const
Inspectors
const TimeGridtimeGrid () const

Protected Member Functions

void computeStatePrices (Size until) const
const Impl & impl () const
Impl & impl ()

Protected Attributes

std::vector< ArraystatePrices_
TimeGrid t_

Private Attributes

Size n_
Size statePricesLimit_

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index