QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MakeVanillaSwap Class Reference

helper class More...

#include <ql/instruments/makevanillaswap.hpp>

+ Collaboration diagram for MakeVanillaSwap:

Public Member Functions

 MakeVanillaSwap (const Period &swapTenor, const ext::shared_ptr< IborIndex > &iborIndex, Rate fixedRate=Null< Rate >(), const Period &forwardStart=0 *Days)
 
 operator VanillaSwap () const
 
 operator ext::shared_ptr< VanillaSwap > () const
 
MakeVanillaSwapreceiveFixed (bool flag=true)
 
MakeVanillaSwapwithType (Swap::Type type)
 
MakeVanillaSwapwithNominal (Real n)
 
MakeVanillaSwapwithSettlementDays (Natural settlementDays)
 
MakeVanillaSwapwithEffectiveDate (const Date &)
 
MakeVanillaSwapwithTerminationDate (const Date &)
 
MakeVanillaSwapwithRule (DateGeneration::Rule r)
 
MakeVanillaSwapwithFixedLegTenor (const Period &t)
 
MakeVanillaSwapwithFixedLegCalendar (const Calendar &cal)
 
MakeVanillaSwapwithFixedLegConvention (BusinessDayConvention bdc)
 
MakeVanillaSwapwithFixedLegTerminationDateConvention (BusinessDayConvention bdc)
 
MakeVanillaSwapwithFixedLegRule (DateGeneration::Rule r)
 
MakeVanillaSwapwithFixedLegEndOfMonth (bool flag=true)
 
MakeVanillaSwapwithFixedLegFirstDate (const Date &d)
 
MakeVanillaSwapwithFixedLegNextToLastDate (const Date &d)
 
MakeVanillaSwapwithFixedLegDayCount (const DayCounter &dc)
 
MakeVanillaSwapwithFloatingLegTenor (const Period &t)
 
MakeVanillaSwapwithFloatingLegCalendar (const Calendar &cal)
 
MakeVanillaSwapwithFloatingLegConvention (BusinessDayConvention bdc)
 
MakeVanillaSwapwithFloatingLegTerminationDateConvention (BusinessDayConvention bdc)
 
MakeVanillaSwapwithFloatingLegRule (DateGeneration::Rule r)
 
MakeVanillaSwapwithFloatingLegEndOfMonth (bool flag=true)
 
MakeVanillaSwapwithFloatingLegFirstDate (const Date &d)
 
MakeVanillaSwapwithFloatingLegNextToLastDate (const Date &d)
 
MakeVanillaSwapwithFloatingLegDayCount (const DayCounter &dc)
 
MakeVanillaSwapwithFloatingLegSpread (Spread sp)
 
MakeVanillaSwapwithDiscountingTermStructure (const Handle< YieldTermStructure > &discountCurve)
 
MakeVanillaSwapwithPricingEngine (const ext::shared_ptr< PricingEngine > &engine)
 
MakeVanillaSwapwithIndexedCoupons (const ext::optional< bool > &b=true)
 
MakeVanillaSwapwithAtParCoupons (bool b=true)
 

Private Attributes

Period swapTenor_
 
ext::shared_ptr< IborIndexiborIndex_
 
Rate fixedRate_
 
Period forwardStart_
 
Natural settlementDays_
 
Date effectiveDate_
 
Date terminationDate_
 
Calendar fixedCalendar_
 
Calendar floatCalendar_
 
Swap::Type type_ = Swap::Payer
 
Real nominal_ = 1.0
 
Period fixedTenor_
 
Period floatTenor_
 
BusinessDayConvention fixedConvention_ = ModifiedFollowing
 
BusinessDayConvention fixedTerminationDateConvention_ = ModifiedFollowing
 
BusinessDayConvention floatConvention_
 
BusinessDayConvention floatTerminationDateConvention_
 
DateGeneration::Rule fixedRule_ = DateGeneration::Backward
 
DateGeneration::Rule floatRule_ = DateGeneration::Backward
 
bool fixedEndOfMonth_ = false
 
bool floatEndOfMonth_ = false
 
Date fixedFirstDate_
 
Date fixedNextToLastDate_
 
Date floatFirstDate_
 
Date floatNextToLastDate_
 
Spread floatSpread_ = 0.0
 
DayCounter fixedDayCount_
 
DayCounter floatDayCount_
 
ext::optional< booluseIndexedCoupons_
 
ext::shared_ptr< PricingEngineengine_
 

Detailed Description

helper class

This class provides a more comfortable way to instantiate standard market swap.

Examples
CVAIRS.cpp.

Definition at line 39 of file makevanillaswap.hpp.

Constructor & Destructor Documentation

◆ MakeVanillaSwap()

MakeVanillaSwap ( const Period swapTenor,
const ext::shared_ptr< IborIndex > &  iborIndex,
Rate  fixedRate = Null<Rate>(),
const Period forwardStart = 0*Days 
)

Definition at line 40 of file makevanillaswap.cpp.

Member Function Documentation

◆ operator VanillaSwap()

operator VanillaSwap ( ) const

Definition at line 55 of file makevanillaswap.cpp.

+ Here is the call graph for this function:

◆ operator ext::shared_ptr< VanillaSwap >()

operator ext::shared_ptr< VanillaSwap > ( ) const

Definition at line 60 of file makevanillaswap.cpp.

+ Here is the call graph for this function:

◆ receiveFixed()

MakeVanillaSwap & receiveFixed ( bool  flag = true)

Definition at line 190 of file makevanillaswap.cpp.

◆ withType()

MakeVanillaSwap & withType ( Swap::Type  type)
Examples
CVAIRS.cpp.

Definition at line 195 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withNominal()

MakeVanillaSwap & withNominal ( Real  n)
Examples
CVAIRS.cpp.

Definition at line 200 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withSettlementDays()

MakeVanillaSwap & withSettlementDays ( Natural  settlementDays)
Examples
CVAIRS.cpp.

Definition at line 205 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withEffectiveDate()

MakeVanillaSwap & withEffectiveDate ( const Date effectiveDate)

Definition at line 212 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withTerminationDate()

MakeVanillaSwap & withTerminationDate ( const Date terminationDate)

Definition at line 218 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withRule()

Definition at line 224 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFixedLegTenor()

MakeVanillaSwap & withFixedLegTenor ( const Period t)
Examples
CVAIRS.cpp.

Definition at line 244 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFixedLegCalendar()

MakeVanillaSwap & withFixedLegCalendar ( const Calendar cal)
Examples
CVAIRS.cpp.

Definition at line 250 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFixedLegConvention()

MakeVanillaSwap & withFixedLegConvention ( BusinessDayConvention  bdc)
Examples
CVAIRS.cpp.

Definition at line 256 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFixedLegTerminationDateConvention()

MakeVanillaSwap & withFixedLegTerminationDateConvention ( BusinessDayConvention  bdc)
Examples
CVAIRS.cpp.

Definition at line 262 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFixedLegRule()

MakeVanillaSwap & withFixedLegRule ( DateGeneration::Rule  r)

Definition at line 267 of file makevanillaswap.cpp.

◆ withFixedLegEndOfMonth()

MakeVanillaSwap & withFixedLegEndOfMonth ( bool  flag = true)

Definition at line 272 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFixedLegFirstDate()

MakeVanillaSwap & withFixedLegFirstDate ( const Date d)

Definition at line 277 of file makevanillaswap.cpp.

◆ withFixedLegNextToLastDate()

MakeVanillaSwap & withFixedLegNextToLastDate ( const Date d)

Definition at line 283 of file makevanillaswap.cpp.

◆ withFixedLegDayCount()

MakeVanillaSwap & withFixedLegDayCount ( const DayCounter dc)
Examples
CVAIRS.cpp.

Definition at line 289 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegTenor()

MakeVanillaSwap & withFloatingLegTenor ( const Period t)

Definition at line 294 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegCalendar()

MakeVanillaSwap & withFloatingLegCalendar ( const Calendar cal)
Examples
CVAIRS.cpp.

Definition at line 300 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegConvention()

MakeVanillaSwap & withFloatingLegConvention ( BusinessDayConvention  bdc)

Definition at line 306 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegTerminationDateConvention()

MakeVanillaSwap & withFloatingLegTerminationDateConvention ( BusinessDayConvention  bdc)

Definition at line 312 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegRule()

MakeVanillaSwap & withFloatingLegRule ( DateGeneration::Rule  r)

Definition at line 317 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegEndOfMonth()

MakeVanillaSwap & withFloatingLegEndOfMonth ( bool  flag = true)

Definition at line 322 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegFirstDate()

MakeVanillaSwap & withFloatingLegFirstDate ( const Date d)

Definition at line 328 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegNextToLastDate()

MakeVanillaSwap & withFloatingLegNextToLastDate ( const Date d)

Definition at line 334 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegDayCount()

MakeVanillaSwap & withFloatingLegDayCount ( const DayCounter dc)

Definition at line 340 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withFloatingLegSpread()

MakeVanillaSwap & withFloatingLegSpread ( Spread  sp)

Definition at line 345 of file makevanillaswap.cpp.

◆ withDiscountingTermStructure()

MakeVanillaSwap & withDiscountingTermStructure ( const Handle< YieldTermStructure > &  discountCurve)

Definition at line 230 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withPricingEngine()

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

Definition at line 238 of file makevanillaswap.cpp.

◆ withIndexedCoupons()

MakeVanillaSwap & withIndexedCoupons ( const ext::optional< bool > &  b = true)

Definition at line 350 of file makevanillaswap.cpp.

+ Here is the caller graph for this function:

◆ withAtParCoupons()

MakeVanillaSwap & withAtParCoupons ( bool  b = true)

Definition at line 355 of file makevanillaswap.cpp.

Member Data Documentation

◆ swapTenor_

Period swapTenor_
private

Definition at line 88 of file makevanillaswap.hpp.

◆ iborIndex_

ext::shared_ptr<IborIndex> iborIndex_
private

Definition at line 89 of file makevanillaswap.hpp.

◆ fixedRate_

Rate fixedRate_
private

Definition at line 90 of file makevanillaswap.hpp.

◆ forwardStart_

Period forwardStart_
private

Definition at line 91 of file makevanillaswap.hpp.

◆ settlementDays_

Natural settlementDays_
private

Definition at line 93 of file makevanillaswap.hpp.

◆ effectiveDate_

Date effectiveDate_
private

Definition at line 94 of file makevanillaswap.hpp.

◆ terminationDate_

Date terminationDate_
private

Definition at line 94 of file makevanillaswap.hpp.

◆ fixedCalendar_

Calendar fixedCalendar_
private

Definition at line 95 of file makevanillaswap.hpp.

◆ floatCalendar_

Calendar floatCalendar_
private

Definition at line 95 of file makevanillaswap.hpp.

◆ type_

Swap::Type type_ = Swap::Payer
private

Definition at line 97 of file makevanillaswap.hpp.

◆ nominal_

Real nominal_ = 1.0
private

Definition at line 98 of file makevanillaswap.hpp.

◆ fixedTenor_

Period fixedTenor_
private

Definition at line 99 of file makevanillaswap.hpp.

◆ floatTenor_

Period floatTenor_
private

Definition at line 99 of file makevanillaswap.hpp.

◆ fixedConvention_

BusinessDayConvention fixedConvention_ = ModifiedFollowing
private

Definition at line 100 of file makevanillaswap.hpp.

◆ fixedTerminationDateConvention_

BusinessDayConvention fixedTerminationDateConvention_ = ModifiedFollowing
private

Definition at line 101 of file makevanillaswap.hpp.

◆ floatConvention_

BusinessDayConvention floatConvention_
private

Definition at line 102 of file makevanillaswap.hpp.

◆ floatTerminationDateConvention_

BusinessDayConvention floatTerminationDateConvention_
private

Definition at line 102 of file makevanillaswap.hpp.

◆ fixedRule_

Definition at line 103 of file makevanillaswap.hpp.

◆ floatRule_

Definition at line 104 of file makevanillaswap.hpp.

◆ fixedEndOfMonth_

bool fixedEndOfMonth_ = false
private

Definition at line 105 of file makevanillaswap.hpp.

◆ floatEndOfMonth_

bool floatEndOfMonth_ = false
private

Definition at line 105 of file makevanillaswap.hpp.

◆ fixedFirstDate_

Date fixedFirstDate_
private

Definition at line 106 of file makevanillaswap.hpp.

◆ fixedNextToLastDate_

Date fixedNextToLastDate_
private

Definition at line 106 of file makevanillaswap.hpp.

◆ floatFirstDate_

Date floatFirstDate_
private

Definition at line 107 of file makevanillaswap.hpp.

◆ floatNextToLastDate_

Date floatNextToLastDate_
private

Definition at line 107 of file makevanillaswap.hpp.

◆ floatSpread_

Spread floatSpread_ = 0.0
private

Definition at line 108 of file makevanillaswap.hpp.

◆ fixedDayCount_

DayCounter fixedDayCount_
private

Definition at line 109 of file makevanillaswap.hpp.

◆ floatDayCount_

DayCounter floatDayCount_
private

Definition at line 109 of file makevanillaswap.hpp.

◆ useIndexedCoupons_

ext::optional<bool> useIndexedCoupons_
private

Definition at line 110 of file makevanillaswap.hpp.

◆ engine_

ext::shared_ptr<PricingEngine> engine_
private

Definition at line 112 of file makevanillaswap.hpp.