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

#include <qle/cashflows/floatingratefxlinkednotionalcoupon.hpp>

+ Inheritance diagram for FloatingRateFXLinkedNotionalCoupon:
+ Collaboration diagram for FloatingRateFXLinkedNotionalCoupon:

Public Member Functions

 FloatingRateFXLinkedNotionalCoupon (const Date &fxFixingDate, Real foreignAmount, QuantLib::ext::shared_ptr< FxIndex > fxIndex, const QuantLib::ext::shared_ptr< FloatingRateCoupon > &underlying)
 FloatingRateFXLinkedNotionalCoupon. More...
 
FXLinked interface
QuantLib::ext::shared_ptr< FXLinkedclone (QuantLib::ext::shared_ptr< FxIndex > fxIndex) override
 
Obverver interface
void deepUpdate () override
 
LazyObject interface
void performCalculations () const override
 
void alwaysForwardNotifications () override
 
Coupon interface
Rate nominal () const override
 
FloatingRateCoupon interface
Rate indexFixing () const override
 
void setPricer (const ext::shared_ptr< FloatingRateCouponPricer > &p) 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< FloatingRateCouponunderlying_
 
void accept (AcyclicVisitor &) override
 
QuantLib::ext::shared_ptr< FloatingRateCouponunderlying () 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 36 of file floatingratefxlinkednotionalcoupon.hpp.

Constructor & Destructor Documentation

◆ FloatingRateFXLinkedNotionalCoupon()

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

FloatingRateFXLinkedNotionalCoupon.

Definition at line 39 of file floatingratefxlinkednotionalcoupon.hpp.

41 : FloatingRateCoupon(underlying->date(), Null<Real>(), underlying->accrualStartDate(),
42 underlying->accrualEndDate(), underlying->fixingDate(), underlying->index(),
43 underlying->gearing(), underlying->spread(), underlying->referencePeriodStart(),
44 underlying->referencePeriodEnd(), underlying->dayCounter(), underlying->isInArrears()),
46 fixingDays_ = underlying->fixingDays() == Null<Natural>()
47 ? (underlying->index() ? underlying->index()->fixingDays() : 0)
48 : underlying->fixingDays();
49 registerWith(FXLinked::fxIndex());
50 registerWith(underlying_);
51 }
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< FloatingRateCoupon > underlying() const
more inspectors
const QuantLib::ext::shared_ptr< FloatingRateCoupon > 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 106 of file floatingratefxlinkednotionalcoupon.hpp.

106 {
107 return QuantLib::ext::make_shared<FloatingRateFXLinkedNotionalCoupon>(fxFixingDate(), foreignAmount(), fxIndex,
108 underlying());
109}
+ Here is the call graph for this function:

◆ deepUpdate()

void deepUpdate ( )
override

Definition at line 60 of file floatingratefxlinkednotionalcoupon.hpp.

60 {
61 update();
62 underlying_->deepUpdate();
63 }

◆ performCalculations()

void performCalculations ( ) const
override

Definition at line 68 of file floatingratefxlinkednotionalcoupon.hpp.

68{ rate_ = underlying_->rate(); }

◆ alwaysForwardNotifications()

void alwaysForwardNotifications ( )
override

Definition at line 69 of file floatingratefxlinkednotionalcoupon.hpp.

69 {
70 LazyObject::alwaysForwardNotifications();
71 underlying_->alwaysForwardNotifications();
72 }

◆ nominal()

Rate nominal ( ) const
override

Definition at line 76 of file floatingratefxlinkednotionalcoupon.hpp.

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

◆ indexFixing()

Rate indexFixing ( ) const
override

Definition at line 81 of file floatingratefxlinkednotionalcoupon.hpp.

81{ return underlying_->indexFixing(); } // might be overwritten in underlying

◆ setPricer()

void setPricer ( const ext::shared_ptr< FloatingRateCouponPricer > &  p)
override

Definition at line 82 of file floatingratefxlinkednotionalcoupon.hpp.

82{ underlying_->setPricer(p); }

◆ accept()

void accept ( AcyclicVisitor &  v)
override

Definition at line 98 of file floatingratefxlinkednotionalcoupon.hpp.

98 {
99 Visitor<FloatingRateFXLinkedNotionalCoupon>* v1 = dynamic_cast<Visitor<FloatingRateFXLinkedNotionalCoupon>*>(&v);
100 if (v1 != 0)
101 v1->visit(*this);
102 else
103 FloatingRateCoupon::accept(v);
104}

◆ underlying()

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

more inspectors

Definition at line 91 of file floatingratefxlinkednotionalcoupon.hpp.

91{ return underlying_; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ underlying_

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

Definition at line 94 of file floatingratefxlinkednotionalcoupon.hpp.