QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
DiscretizedDermanKaniDoubleBarrierOption Class Reference

Derman-Kani-Ergener-Bardhan discretized option helper class. More...

#include <discretizeddoublebarrieroption.hpp>

+ Inheritance diagram for DiscretizedDermanKaniDoubleBarrierOption:
+ Collaboration diagram for DiscretizedDermanKaniDoubleBarrierOption:

Public Member Functions

 DiscretizedDermanKaniDoubleBarrierOption (const DoubleBarrierOption::arguments &, const StochasticProcess &process, const TimeGrid &grid=TimeGrid())
 
void reset (Size size) override
 
std::vector< TimemandatoryTimes () const override
 
- Public Member Functions inherited from DiscretizedAsset
 DiscretizedAsset ()
 
virtual ~DiscretizedAsset ()=default
 
Time time () const
 
Timetime ()
 
const Arrayvalues () const
 
Arrayvalues ()
 
const ext::shared_ptr< Lattice > & method () const
 
void initialize (const ext::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 () override
 
- Protected Member Functions inherited from DiscretizedAsset
bool isOnTime (Time t) const
 
virtual void preAdjustValuesImpl ()
 

Private Member Functions

void adjustBarrier (Array &optvalues, const Array &grid)
 

Private Attributes

DiscretizedDoubleBarrierOption unenhanced_
 

Additional Inherited Members

- Protected Types inherited from DiscretizedAsset
enum class  CouponAdjustment { pre , post }
 
- Protected Attributes inherited from DiscretizedAsset
Time time_
 
Time latestPreAdjustment_
 
Time latestPostAdjustment_
 
Array values_
 

Detailed Description

Derman-Kani-Ergener-Bardhan discretized option helper class.

This class is used with the BinomialDoubleBarrierEngine to implement the enhanced binomial algorithm of E.Derman, I.Kani, D.Ergener, I.Bardhan ("Enhanced Numerical Methods for Options with Barriers", 1995)

Note
This algorithm is only suitable if the payoff can be approximated linearly, e.g. is not usable for cash-or-nothing payoffs.

Definition at line 76 of file discretizeddoublebarrieroption.hpp.

Constructor & Destructor Documentation

◆ DiscretizedDermanKaniDoubleBarrierOption()

Definition at line 156 of file discretizeddoublebarrieroption.cpp.

Member Function Documentation

◆ reset()

void reset ( Size  size)
overridevirtual

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

Implements DiscretizedAsset.

Definition at line 163 of file discretizeddoublebarrieroption.cpp.

+ Here is the call graph for this function:

◆ mandatoryTimes()

std::vector< Time > mandatoryTimes ( ) const
overridevirtual

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.

Definition at line 84 of file discretizeddoublebarrieroption.hpp.

+ Here is the call graph for this function:

◆ postAdjustValuesImpl()

void postAdjustValuesImpl ( )
overrideprotectedvirtual

This method performs the actual post-adjustment

Reimplemented from DiscretizedAsset.

Definition at line 169 of file discretizeddoublebarrieroption.cpp.

+ Here is the call graph for this function:

◆ adjustBarrier()

void adjustBarrier ( Array optvalues,
const Array grid 
)
private

Definition at line 177 of file discretizeddoublebarrieroption.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ unenhanced_

DiscretizedDoubleBarrierOption unenhanced_
private

Definition at line 91 of file discretizeddoublebarrieroption.hpp.