QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Standard discretized option helper class. More...
#include <discretizeddoublebarrieroption.hpp>
Public Member Functions | |
DiscretizedDoubleBarrierOption (const DoubleBarrierOption::arguments &, const StochasticProcess &process, const TimeGrid &grid=TimeGrid()) | |
void | reset (Size size) override |
const Array & | vanilla () const |
const DoubleBarrierOption::arguments & | arguments () const |
std::vector< Time > | mandatoryTimes () const override |
void | checkBarrier (Array &optvalues, const Array &grid) const |
Public Member Functions inherited from DiscretizedAsset | |
DiscretizedAsset () | |
virtual | ~DiscretizedAsset ()=default |
Time | time () const |
Time & | time () |
const Array & | values () const |
Array & | values () |
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 Attributes | |
DoubleBarrierOption::arguments | arguments_ |
std::vector< Time > | stoppingTimes_ |
DiscretizedVanillaOption | vanilla_ |
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_ |
Standard discretized option helper class.
This class is used with the BinomialDoubleBarrierEngine to implement a standard binomial algorithm for double barrier options
Definition at line 39 of file discretizeddoublebarrieroption.hpp.
DiscretizedDoubleBarrierOption | ( | const DoubleBarrierOption::arguments & | args, |
const StochasticProcess & | process, | ||
const TimeGrid & | grid = TimeGrid() |
||
) |
Definition at line 25 of file discretizeddoublebarrieroption.cpp.
|
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 43 of file discretizeddoublebarrieroption.cpp.
const Array & vanilla | ( | ) | const |
Definition at line 47 of file discretizeddoublebarrieroption.hpp.
const DoubleBarrierOption::arguments & arguments | ( | ) | const |
Definition at line 51 of file discretizeddoublebarrieroption.hpp.
|
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.
Implements DiscretizedAsset.
Definition at line 55 of file discretizeddoublebarrieroption.hpp.
Definition at line 57 of file discretizeddoublebarrieroption.cpp.
|
overrideprotectedvirtual |
This method performs the actual post-adjustment
Reimplemented from DiscretizedAsset.
Definition at line 49 of file discretizeddoublebarrieroption.cpp.
|
private |
Definition at line 62 of file discretizeddoublebarrieroption.hpp.
|
private |
Definition at line 63 of file discretizeddoublebarrieroption.hpp.
|
private |
Definition at line 64 of file discretizeddoublebarrieroption.hpp.