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

#include <discretizedswaption.hpp>

+ Inheritance diagram for DiscretizedSwaption:
+ Collaboration diagram for DiscretizedSwaption:

Public Member Functions

 DiscretizedSwaption (const Swaption::arguments &, const Date &referenceDate, const DayCounter &dayCounter)
 
void reset (Size size) override
 
- Public Member Functions inherited from DiscretizedOption
 DiscretizedOption (ext::shared_ptr< DiscretizedAsset > underlying, Exercise::Type exerciseType, std::vector< Time > exerciseTimes)
 
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 ()
 

Static Private Member Functions

static void prepareSwaptionWithSnappedDates (const Swaption::arguments &args, const Date &referenceDate, const DayCounter &dayCounter, PricingEngine::arguments &snappedArgs, std::vector< CouponAdjustment > &fixedCouponAdjustments, std::vector< CouponAdjustment > &floatingCouponAdjustments)
 

Private Attributes

Swaption::arguments arguments_
 
Time lastPayment_
 

Additional Inherited Members

- Protected Types inherited from DiscretizedAsset
enum class  CouponAdjustment { pre , post }
 
- Protected Member Functions inherited from DiscretizedOption
void postAdjustValuesImpl () override
 
void applyExerciseCondition ()
 
- Protected Member Functions inherited from DiscretizedAsset
bool isOnTime (Time t) const
 
virtual void preAdjustValuesImpl ()
 
- Protected Attributes inherited from DiscretizedOption
ext::shared_ptr< DiscretizedAssetunderlying_
 
Exercise::Type exerciseType_
 
std::vector< TimeexerciseTimes_
 
- Protected Attributes inherited from DiscretizedAsset
Time time_
 
Time latestPreAdjustment_
 
Time latestPostAdjustment_
 
Array values_
 

Detailed Description

Definition at line 34 of file discretizedswaption.hpp.

Constructor & Destructor Documentation

◆ DiscretizedSwaption()

DiscretizedSwaption ( const Swaption::arguments args,
const Date referenceDate,
const DayCounter dayCounter 
)

Definition at line 39 of file discretizedswaption.cpp.

+ Here is the call graph for this function:

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.

Reimplemented from DiscretizedOption.

Definition at line 72 of file discretizedswaption.cpp.

+ Here is the call graph for this function:

◆ prepareSwaptionWithSnappedDates()

void prepareSwaptionWithSnappedDates ( const Swaption::arguments args,
const Date referenceDate,
const DayCounter dayCounter,
PricingEngine::arguments snappedArgs,
std::vector< CouponAdjustment > &  fixedCouponAdjustments,
std::vector< CouponAdjustment > &  floatingCouponAdjustments 
)
staticprivate

Definition at line 77 of file discretizedswaption.cpp.

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

Member Data Documentation

◆ arguments_

Swaption::arguments arguments_
private

Definition at line 42 of file discretizedswaption.hpp.

◆ lastPayment_

Time lastPayment_
private

Definition at line 43 of file discretizedswaption.hpp.