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

scalable coupon More...

#include <qle/cashflows/scaledcoupon.hpp>

+ Inheritance diagram for ScaledCoupon:
+ Collaboration diagram for ScaledCoupon:

Public Member Functions

 ScaledCoupon (Real multiplier, QuantLib::ext::shared_ptr< Coupon > underlyingCoupon)
 
Observer interface
void update () override
 
Cashflow interface
Rate amount () const override
 

Inspectors

Real multiplier_
 
QuantLib::ext::shared_ptr< CouponunderlyingCoupon_
 
Real accruedAmount (const Date &d) const override
 
Rate nominal () const override
 
Rate rate () const override
 
DayCounter dayCounter () const override
 
const Real multiplier () const
 
const QuantLib::ext::shared_ptr< CouponunderlyingCoupon () const
 

Detailed Description

scalable coupon

Coupon that returns the scaled results for an underlying coupon

Definition at line 55 of file scaledcoupon.hpp.

Constructor & Destructor Documentation

◆ ScaledCoupon()

ScaledCoupon ( Real  multiplier,
QuantLib::ext::shared_ptr< Coupon underlyingCoupon 
)

Definition at line 57 of file scaledcoupon.hpp.

58 : Coupon(underlyingCoupon->date(), underlyingCoupon->nominal(), underlyingCoupon->accrualStartDate(),
59 underlyingCoupon->accrualEndDate()),
61 registerWith(underlyingCoupon_);
62 };
const QuantLib::ext::shared_ptr< Coupon > underlyingCoupon() const
const Real multiplier() const
QuantLib::ext::shared_ptr< Coupon > underlyingCoupon_

Member Function Documentation

◆ update()

void update ( )
override

Definition at line 64 of file scaledcoupon.hpp.

64{ notifyObservers(); }

◆ amount()

Rate amount ( ) const
override

Definition at line 66 of file scaledcoupon.hpp.

66{ return multiplier_ * underlyingCoupon_->amount(); }

◆ accruedAmount()

Real accruedAmount ( const Date &  d) const
override

Definition at line 69 of file scaledcoupon.hpp.

69{ return multiplier_ * underlyingCoupon_->accruedAmount(d); }

◆ nominal()

Rate nominal ( ) const
override

Definition at line 70 of file scaledcoupon.hpp.

70{ return multiplier_ * underlyingCoupon_->nominal(); }

◆ rate()

Rate rate ( ) const
override

Definition at line 71 of file scaledcoupon.hpp.

71{ return underlyingCoupon_->rate(); }

◆ dayCounter()

DayCounter dayCounter ( ) const
override

Definition at line 72 of file scaledcoupon.hpp.

72{ return underlyingCoupon_->dayCounter(); }

◆ multiplier()

const Real multiplier ( ) const

Definition at line 74 of file scaledcoupon.hpp.

74{ return multiplier_; }

◆ underlyingCoupon()

const QuantLib::ext::shared_ptr< Coupon > underlyingCoupon ( ) const

Definition at line 75 of file scaledcoupon.hpp.

75{ return underlyingCoupon_; }

Member Data Documentation

◆ multiplier_

Real multiplier_
private

Definition at line 78 of file scaledcoupon.hpp.

◆ underlyingCoupon_

QuantLib::ext::shared_ptr<Coupon> underlyingCoupon_
private

Definition at line 79 of file scaledcoupon.hpp.