QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <discretizedswap.hpp>
Public Member Functions | |
DiscretizedSwap (const VanillaSwap::arguments &args, const Date &referenceDate, const DayCounter &dayCounter) | |
DiscretizedSwap (const VanillaSwap::arguments &args, const Date &referenceDate, const DayCounter &dayCounter, std::vector< CouponAdjustment > fixedCouponAdjustments, std::vector< CouponAdjustment > floatingCouponAdjustments) | |
void | reset (Size size) override |
std::vector< Time > | mandatoryTimes () const override |
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 | preAdjustValuesImpl () override |
void | postAdjustValuesImpl () override |
Protected Member Functions inherited from DiscretizedAsset | |
bool | isOnTime (Time t) const |
Private Member Functions | |
void | addFixedCoupon (Size i) |
void | addFloatingCoupon (Size i) |
Private Attributes | |
VanillaSwap::arguments | arguments_ |
std::vector< Time > | fixedResetTimes_ |
std::vector< Time > | fixedPayTimes_ |
std::vector< CouponAdjustment > | fixedCouponAdjustments_ |
std::vector< bool > | fixedResetTimeIsInPast_ |
std::vector< Time > | floatingResetTimes_ |
std::vector< Time > | floatingPayTimes_ |
std::vector< CouponAdjustment > | floatingCouponAdjustments_ |
std::vector< bool > | floatingResetTimeIsInPast_ |
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_ |
Definition at line 34 of file discretizedswap.hpp.
DiscretizedSwap | ( | const VanillaSwap::arguments & | args, |
const Date & | referenceDate, | ||
const DayCounter & | dayCounter | ||
) |
Definition at line 36 of file discretizedswap.cpp.
DiscretizedSwap | ( | const VanillaSwap::arguments & | args, |
const Date & | referenceDate, | ||
const DayCounter & | dayCounter, | ||
std::vector< CouponAdjustment > | fixedCouponAdjustments, | ||
std::vector< CouponAdjustment > | floatingCouponAdjustments | ||
) |
|
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 97 of file discretizedswap.cpp.
|
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 102 of file discretizedswap.cpp.
|
overrideprotectedvirtual |
This method performs the actual pre-adjustment
Reimplemented from DiscretizedAsset.
Definition at line 123 of file discretizedswap.cpp.
|
overrideprotectedvirtual |
This method performs the actual post-adjustment
Reimplemented from DiscretizedAsset.
Definition at line 140 of file discretizedswap.cpp.
|
private |
Definition at line 184 of file discretizedswap.cpp.
|
private |
Definition at line 199 of file discretizedswap.cpp.
|
private |
Definition at line 53 of file discretizedswap.hpp.
|
private |
Definition at line 54 of file discretizedswap.hpp.
|
private |
Definition at line 55 of file discretizedswap.hpp.
|
private |
Definition at line 56 of file discretizedswap.hpp.
|
private |
Definition at line 57 of file discretizedswap.hpp.
|
private |
Definition at line 58 of file discretizedswap.hpp.
|
private |
Definition at line 59 of file discretizedswap.hpp.
|
private |
Definition at line 60 of file discretizedswap.hpp.
|
private |
Definition at line 61 of file discretizedswap.hpp.