QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MakeCapFloor Class Reference

helper class More...

#include <makecapfloor.hpp>

+ Collaboration diagram for MakeCapFloor:

Public Member Functions

 MakeCapFloor (CapFloor::Type capFloorType, const Period &capFloorTenor, const ext::shared_ptr< IborIndex > &iborIndex, Rate strike=Null< Rate >(), const Period &forwardStart=0 *Days)
 
 operator CapFloor () const
 
 operator ext::shared_ptr< CapFloor > () const
 
MakeCapFloor & withNominal (Real n)
 
MakeCapFloor & withEffectiveDate (const Date &effectiveDate, bool firstCapletExcluded)
 
MakeCapFloor & withTenor (const Period &t)
 
MakeCapFloor & withCalendar (const Calendar &cal)
 
MakeCapFloor & withConvention (BusinessDayConvention bdc)
 
MakeCapFloor & withTerminationDateConvention (BusinessDayConvention bdc)
 
MakeCapFloor & withRule (DateGeneration::Rule r)
 
MakeCapFloor & withEndOfMonth (bool flag=true)
 
MakeCapFloor & withFirstDate (const Date &d)
 
MakeCapFloor & withNextToLastDate (const Date &d)
 
MakeCapFloor & withDayCount (const DayCounter &dc)
 
MakeCapFloor & asOptionlet (bool b=true)
 only get last coupon More...
 
MakeCapFloor & withPricingEngine (const ext::shared_ptr< PricingEngine > &engine)
 

Private Attributes

CapFloor::Type capFloorType_
 
Rate strike_
 
bool firstCapletExcluded_
 
bool asOptionlet_ = false
 
MakeVanillaSwap makeVanillaSwap_
 
ext::shared_ptr< PricingEngine > engine_
 

Detailed Description

helper class

This class provides a more comfortable way to instantiate standard market cap and floor.

Definition at line 37 of file makecapfloor.hpp.

Constructor & Destructor Documentation

◆ MakeCapFloor()

MakeCapFloor ( CapFloor::Type  capFloorType,
const Period &  capFloorTenor,
const ext::shared_ptr< IborIndex > &  iborIndex,
Rate  strike = Null<Rate>(),
const Period &  forwardStart = 0*Days 
)

Definition at line 27 of file makecapfloor.cpp.

Member Function Documentation

◆ operator CapFloor()

operator CapFloor ( ) const

Definition at line 40 of file makecapfloor.cpp.

◆ operator ext::shared_ptr< CapFloor >()

operator ext::shared_ptr< CapFloor > ( ) const

Definition at line 45 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withNominal()

MakeCapFloor & withNominal ( Real  n)

Definition at line 81 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withEffectiveDate()

MakeCapFloor & withEffectiveDate ( const Date &  effectiveDate,
bool  firstCapletExcluded 
)

Definition at line 86 of file makecapfloor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withTenor()

MakeCapFloor & withTenor ( const Period &  t)

Definition at line 93 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withCalendar()

MakeCapFloor & withCalendar ( const Calendar &  cal)

Definition at line 99 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withConvention()

MakeCapFloor & withConvention ( BusinessDayConvention  bdc)

Definition at line 105 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withTerminationDateConvention()

MakeCapFloor & withTerminationDateConvention ( BusinessDayConvention  bdc)

Definition at line 112 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withRule()

Definition at line 118 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withEndOfMonth()

MakeCapFloor & withEndOfMonth ( bool  flag = true)

Definition at line 123 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withFirstDate()

MakeCapFloor & withFirstDate ( const Date &  d)

Definition at line 129 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withNextToLastDate()

MakeCapFloor & withNextToLastDate ( const Date &  d)

Definition at line 134 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ withDayCount()

MakeCapFloor & withDayCount ( const DayCounter &  dc)

Definition at line 139 of file makecapfloor.cpp.

+ Here is the call graph for this function:

◆ asOptionlet()

MakeCapFloor & asOptionlet ( bool  b = true)

only get last coupon

Definition at line 144 of file makecapfloor.cpp.

◆ withPricingEngine()

MakeCapFloor & withPricingEngine ( const ext::shared_ptr< PricingEngine > &  engine)

Definition at line 149 of file makecapfloor.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ capFloorType_

CapFloor::Type capFloorType_
private

Definition at line 67 of file makecapfloor.hpp.

◆ strike_

Rate strike_
private

Definition at line 68 of file makecapfloor.hpp.

◆ firstCapletExcluded_

bool firstCapletExcluded_
private

Definition at line 69 of file makecapfloor.hpp.

◆ asOptionlet_

bool asOptionlet_ = false
private

Definition at line 69 of file makecapfloor.hpp.

◆ makeVanillaSwap_

MakeVanillaSwap makeVanillaSwap_
private

Definition at line 71 of file makecapfloor.hpp.

◆ engine_

ext::shared_ptr<PricingEngine> engine_
private

Definition at line 73 of file makecapfloor.hpp.