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

#include <qle/cashflows/fixedratefxlinkednotionalcoupon.hpp>

+ Inheritance diagram for FixedRateFXLinkedNotionalCoupon:
+ Collaboration diagram for FixedRateFXLinkedNotionalCoupon:

Public Member Functions

 FixedRateFXLinkedNotionalCoupon (const QuantLib::Date &fxFixingDate, QuantLib::Real foreignAmount, QuantLib::ext::shared_ptr< FxIndex > fxIndex, const QuantLib::ext::shared_ptr< FixedRateCoupon > &underlying)
 FloatingRateFXLinkedNotionalCoupon. More...
 
FXLinked interface
QuantLib::ext::shared_ptr< FXLinkedclone (QuantLib::ext::shared_ptr< FxIndex > fxIndex) override
 
Coupon interface
QuantLib::Rate nominal () const override
 
QuantLib::Rate rate () const override
 
Observer interface
void update () override
 
- Public Member Functions inherited from FXLinked
 FXLinked (const Date &fixingDate, Real foreignAmount, QuantLib::ext::shared_ptr< FxIndex > fxIndex)
 
virtual ~FXLinked ()
 
Date fxFixingDate () const
 
Real foreignAmount () const
 
const QuantLib::ext::shared_ptr< FxIndex > & fxIndex () const
 
Real fxRate () const
 
virtual QuantLib::ext::shared_ptr< FXLinkedclone (QuantLib::ext::shared_ptr< FxIndex > fxIndex)=0
 

Visitability

const QuantLib::ext::shared_ptr< FixedRateCoupon > underlying_
 
void accept (QuantLib::AcyclicVisitor &) override
 
QuantLib::ext::shared_ptr< FixedRateCoupon > underlying () const
 more inspectors More...
 

Additional Inherited Members

- Protected Attributes inherited from FXLinked
Date fxFixingDate_
 
Real foreignAmount_
 
QuantLib::ext::shared_ptr< FxIndexfxIndex_
 

Detailed Description

Coupon paying a Libor-type index on an fx-linked nominal

Definition at line 35 of file fixedratefxlinkednotionalcoupon.hpp.

Constructor & Destructor Documentation

◆ FixedRateFXLinkedNotionalCoupon()

FixedRateFXLinkedNotionalCoupon ( const QuantLib::Date &  fxFixingDate,
QuantLib::Real  foreignAmount,
QuantLib::ext::shared_ptr< FxIndex fxIndex,
const QuantLib::ext::shared_ptr< FixedRateCoupon > &  underlying 
)

FloatingRateFXLinkedNotionalCoupon.

Definition at line 25 of file fixedratefxlinkednotionalcoupon.cpp.

29 : FixedRateCoupon(underlying->date(), foreignAmount, underlying->rate(),
30 underlying->dayCounter(), underlying->accrualStartDate(),
31 underlying->accrualEndDate(), underlying->referencePeriodStart(),
32 underlying->referencePeriodEnd()),
34 registerWith(FXLinked::fxIndex());
35 registerWith(underlying_);
36}
const QuantLib::ext::shared_ptr< FxIndex > & fxIndex() const
FXLinked(const Date &fixingDate, Real foreignAmount, QuantLib::ext::shared_ptr< FxIndex > fxIndex)
Real foreignAmount() const
Date fxFixingDate() const
QuantLib::ext::shared_ptr< FixedRateCoupon > underlying() const
more inspectors
const QuantLib::ext::shared_ptr< FixedRateCoupon > underlying_
+ Here is the call graph for this function:

Member Function Documentation

◆ clone()

QuantLib::ext::shared_ptr< FXLinked > clone ( QuantLib::ext::shared_ptr< FxIndex fxIndex)
overridevirtual

Implements FXLinked.

Definition at line 62 of file fixedratefxlinkednotionalcoupon.cpp.

62 {
63 return QuantLib::ext::make_shared<FixedRateFXLinkedNotionalCoupon>(fxFixingDate(), foreignAmount(), fxIndex,
64 underlying());
65}
+ Here is the call graph for this function:

◆ nominal()

Rate nominal ( ) const
override

Definition at line 38 of file fixedratefxlinkednotionalcoupon.cpp.

38 {
39 return foreignAmount() * fxRate();
40}
+ Here is the call graph for this function:

◆ rate()

Rate rate ( ) const
override

Definition at line 42 of file fixedratefxlinkednotionalcoupon.cpp.

42 {
43 return underlying_->rate();
44}

◆ update()

void update ( )
override

Definition at line 50 of file fixedratefxlinkednotionalcoupon.cpp.

50 {
51 notifyObservers();
52}

◆ accept()

void accept ( QuantLib::AcyclicVisitor &  )
override

Definition at line 54 of file fixedratefxlinkednotionalcoupon.cpp.

54 {
55 Visitor<FixedRateFXLinkedNotionalCoupon>* v1 = dynamic_cast<Visitor<FixedRateFXLinkedNotionalCoupon>*>(&v);
56 if (v1 != 0)
57 v1->visit(*this);
58 else
59 FixedRateCoupon::accept(v);
60}

◆ underlying()

QuantLib::ext::shared_ptr< FixedRateCoupon > underlying ( ) const

more inspectors

Definition at line 46 of file fixedratefxlinkednotionalcoupon.cpp.

46 {
47 return underlying_;
48}
+ Here is the caller graph for this function:

Member Data Documentation

◆ underlying_

const QuantLib::ext::shared_ptr<FixedRateCoupon> underlying_
private

Definition at line 66 of file fixedratefxlinkednotionalcoupon.hpp.