QuantLib: DiscretizedDoubleBarrierOption Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.6

- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
DiscretizedDoubleBarrierOption Class Reference

Standard discretized option helper class. More...

`#include <ql/experimental/barrieroption/discretizeddoublebarrieroption.hpp>`

Inheritance diagram for DiscretizedDoubleBarrierOption:
[legend]

## Public Member Functions
| DiscretizedDoubleBarrierOption (const DoubleBarrierOption::arguments &, const StochasticProcess &process, const TimeGrid &grid=TimeGrid())
void | reset (Size size)
const Array & | vanilla () const
const DoubleBarrierOption::arguments & | arguments () const
virtual std::vector< Time > | mandatoryTimes () const
void | checkBarrier (Array &optvalues, const Array &grid) const
Public Member Functions inherited from DiscretizedAsset
Time | time () const
Time & | time ()
const Array & | values () const
Array & | values ()
const boost::shared_ptr< Lattice > & | method () const
void | initialize (const boost::shared_ptr< Lattice > &, Time t)
void | rollback (Time to)
void | partialRollback (Time to)
Real | presentValue ()
void | preAdjustValues ()
void | postAdjustValues ()
void | adjustValues ()

## Protected Member Functions
void | postAdjustValuesImpl ()
Protected Member Functions inherited from DiscretizedAsset
bool | isOnTime (Time t) const
virtual void | preAdjustValuesImpl ()

## Additional Inherited Members
Protected Attributes inherited from DiscretizedAsset
Time | time_
Time | latestPreAdjustment_
Time | latestPostAdjustment_
Array | values_

## Detailed Description

Standard discretized option helper class.

This class is used with the BinomialDoubleBarrierEngine to implement a standard binomial algorithm for double barrier options

## Member Function Documentation

void reset | ( | Size | size | ) |
| virtual

This method should initialize the asset values to an Array of the given size and with values depending on the particular asset.

Implements DiscretizedAsset.

virtual std::vector<Time> mandatoryTimes | ( |  | ) | const
| virtual

This method returns the times at which the numerical method should stop while rolling back the asset. Typical examples include payment times, exercise times and such.

Note
  The returned values are not guaranteed to be sorted.

Implements DiscretizedAsset.

void postAdjustValuesImpl | ( |  | ) |
| protectedvirtual

This method performs the actual post-adjustment

Reimplemented from DiscretizedAsset.