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

Base pricer for vanilla CMB coupons. More...

#include <qle/cashflows/cmbcoupon.hpp>

+ Inheritance diagram for CmbCouponPricer:
+ Collaboration diagram for CmbCouponPricer:

Public Member Functions

 CmbCouponPricer ()
 
void initialize (const FloatingRateCoupon &coupon) override
 
Real swapletPrice () const override
 
Rate swapletRate () const override
 
Real capletPrice (Rate effectiveCap) const override
 
Rate capletRate (Rate effectiveCap) const override
 
Real floorletPrice (Rate effectiveFloor) const override
 
Rate floorletRate (Rate effectiveFloor) const override
 

Private Attributes

const CmbCouponcoupon_
 
ext::shared_ptr< ConstantMaturityBondIndexindex_
 
Real gearing_
 
Real spread_
 
Date fixingDate_
 

Detailed Description

Base pricer for vanilla CMB coupons.

Definition at line 68 of file cmbcoupon.hpp.

Constructor & Destructor Documentation

◆ CmbCouponPricer()

CmbCouponPricer ( )
explicit

Definition at line 70 of file cmbcoupon.hpp.

70{}

Member Function Documentation

◆ initialize()

void initialize ( const FloatingRateCoupon coupon)
override

Definition at line 55 of file cmbcoupon.cpp.

55 {
56 coupon_ = dynamic_cast<const CmbCoupon *>(&coupon);
57 QL_REQUIRE(coupon_, "CmbCouponPricer: expected CmbCoupon");
59 gearing_ = coupon_->gearing();
60 spread_ = coupon_->spread();
61 fixingDate_ = coupon_->fixingDate();
62}
const ext::shared_ptr< ConstantMaturityBondIndex > & bondIndex() const
Definition: cmbcoupon.hpp:55
ext::shared_ptr< ConstantMaturityBondIndex > index_
Definition: cmbcoupon.hpp:80
const CmbCoupon * coupon_
Definition: cmbcoupon.hpp:79
+ Here is the call graph for this function:

◆ swapletPrice()

Real swapletPrice ( ) const
override

Definition at line 64 of file cmbcoupon.cpp.

64 {
65 return 0.0;
66}

◆ swapletRate()

Rate swapletRate ( ) const
override

Definition at line 68 of file cmbcoupon.cpp.

68 {
69 return gearing_ * (index_->fixing(fixingDate_) + spread_);
70}

◆ capletPrice()

Real capletPrice ( Rate  effectiveCap) const
override

Definition at line 72 of file cmbcoupon.cpp.

72 {
73 return 0.0;
74};

◆ capletRate()

Rate capletRate ( Rate  effectiveCap) const
override

Definition at line 76 of file cmbcoupon.cpp.

76 {
77 return 0.0;
78};

◆ floorletPrice()

Real floorletPrice ( Rate  effectiveFloor) const
override

Definition at line 80 of file cmbcoupon.cpp.

80 {
81 return 0.0;
82};

◆ floorletRate()

Rate floorletRate ( Rate  effectiveFloor) const
override

Definition at line 84 of file cmbcoupon.cpp.

84 {
85 return 0.0;
86};

Member Data Documentation

◆ coupon_

const CmbCoupon* coupon_
private

Definition at line 79 of file cmbcoupon.hpp.

◆ index_

ext::shared_ptr<ConstantMaturityBondIndex> index_
private

Definition at line 80 of file cmbcoupon.hpp.

◆ gearing_

Real gearing_
private

Definition at line 81 of file cmbcoupon.hpp.

◆ spread_

Real spread_
private

Definition at line 82 of file cmbcoupon.hpp.

◆ fixingDate_

Date fixingDate_
private

Definition at line 83 of file cmbcoupon.hpp.