Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BondTRSCashFlow Class Reference

bond trs cashflow More...

#include <qle/cashflows/bondtrscashflow.hpp>

+ Inheritance diagram for BondTRSCashFlow:
+ Collaboration diagram for BondTRSCashFlow:

Public Member Functions

 BondTRSCashFlow (const Date &paymentDate, const Date &fixingStartDate, const Date &fixingEndDate, const Real bondNotional, const QuantLib::ext::shared_ptr< BondIndex > &bondIndex, const Real initialPrice=Null< Real >(), const QuantLib::ext::shared_ptr< FxIndex > &fxIndex=nullptr)
 
const Real notional (Date date) const override
 
const Real notional () const override
 
void setFixingStartDate (QuantLib::Date fixingDate)
 
- Public Member Functions inherited from TRSCashFlow
 TRSCashFlow (const Date &paymentDate, const Date &fixingStartDate, const Date &fixingEndDate, const Real notional, const QuantLib::ext::shared_ptr< Index > &Index, const Real initialPrice=Null< Real >(), const QuantLib::ext::shared_ptr< FxIndex > &fxIndex=nullptr)
 
Real amount () const override
 
Date date () const override
 
const Date & fixingStartDate () const
 
const Date & fixingEndDate () const
 
const QuantLib::ext::shared_ptr< Index > & index () const
 
const Real initialPrice () const
 
const QuantLib::ext::shared_ptr< FxIndex > & fxIndex () const
 
Real fxStart () const
 
Real fxEnd () const
 
Real assetStart () const
 
Real assetEnd () const
 
void update () override
 
virtual void accept (AcyclicVisitor &) override
 

Additional Inherited Members

- Protected Attributes inherited from TRSCashFlow
Date paymentDate_
 
Date fixingStartDate_
 
Date fixingEndDate_
 
Real notional_
 
QuantLib::ext::shared_ptr< Index > index_
 
Real initialPrice_ = QuantLib::Null<Real>()
 
QuantLib::ext::shared_ptr< FxIndexfxIndex_
 

Detailed Description

bond trs cashflow

Definition at line 39 of file bondtrscashflow.hpp.

Constructor & Destructor Documentation

◆ BondTRSCashFlow()

BondTRSCashFlow ( const Date &  paymentDate,
const Date &  fixingStartDate,
const Date &  fixingEndDate,
const Real  bondNotional,
const QuantLib::ext::shared_ptr< BondIndex > &  bondIndex,
const Real  initialPrice = Null<Real>(),
const QuantLib::ext::shared_ptr< FxIndex > &  fxIndex = nullptr 
)

Definition at line 23 of file bondtrscashflow.cpp.

26 : TRSCashFlow(paymentDate, fixingStartDate, fixingEndDate, bondNotional, bondIndex, initialPrice, fxIndex) {}
const QuantLib::ext::shared_ptr< FxIndex > & fxIndex() const
Definition: trscashflow.hpp:58
TRSCashFlow(const Date &paymentDate, const Date &fixingStartDate, const Date &fixingEndDate, const Real notional, const QuantLib::ext::shared_ptr< Index > &Index, const Real initialPrice=Null< Real >(), const QuantLib::ext::shared_ptr< FxIndex > &fxIndex=nullptr)
Definition: trscashflow.cpp:23
const Real initialPrice() const
Definition: trscashflow.hpp:57
const Date & fixingEndDate() const
Definition: trscashflow.hpp:53
const Date & fixingStartDate() const
Definition: trscashflow.hpp:52

Member Function Documentation

◆ notional() [1/2]

const Real notional ( Date  date) const
overridevirtual

Reimplemented from TRSCashFlow.

Definition at line 28 of file bondtrscashflow.cpp.

28 {
29 auto bondIndex = ext::dynamic_pointer_cast<BondIndex>(index_);
30 QL_REQUIRE(bondIndex, "BondTRSCashFlow::notional index must be a BondIndex");
31 return bondIndex->bond()->notional(fixingStartDate_);
32}
QuantLib::ext::shared_ptr< Index > index_
Definition: trscashflow.hpp:78

◆ notional() [2/2]

const Real notional ( ) const
overridevirtual

Reimplemented from TRSCashFlow.

Definition at line 46 of file bondtrscashflow.hpp.

46{ return TRSCashFlow::notional(); };
virtual const Real notional() const
Definition: trscashflow.hpp:54
+ Here is the call graph for this function:

◆ setFixingStartDate()

void setFixingStartDate ( QuantLib::Date  fixingDate)

Definition at line 34 of file bondtrscashflow.cpp.

34 {
35 QL_REQUIRE(fixingDate < fixingEndDate_, "BondTRSCashFlow fixingStartDate must be before fixingEndDate");
37}
QuantLib::Date fixingDate(const QuantLib::Date &d, const QuantLib::Period obsLag, const QuantLib::Frequency freq, bool interpolated)
Definition: inflation.cpp:183