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

#include <ored/portfolio/legbuilders.hpp>

+ Inheritance diagram for CMBLegBuilder:
+ Collaboration diagram for CMBLegBuilder:

Public Member Functions

 CMBLegBuilder ()
 
Leg buildLeg (const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const override
 
- Public Member Functions inherited from LegBuilder
 LegBuilder (const string &legType)
 
virtual ~LegBuilder ()
 
virtual Leg buildLeg (const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &, RequiredFixings &requiredFixings, const string &configuration, const QuantLib::Date &openEndDateReplacement=Null< Date >(), const bool useXbsCurves=false) const =0
 
const string & legType () const
 

Detailed Description

Definition at line 97 of file legbuilders.hpp.

Constructor & Destructor Documentation

◆ CMBLegBuilder()

Definition at line 99 of file legbuilders.hpp.

99: LegBuilder("CMB") {}
LegBuilder(const string &legType)

Member Function Documentation

◆ buildLeg()

Leg buildLeg ( const LegData data,
const QuantLib::ext::shared_ptr< EngineFactory > &  engineFactory,
RequiredFixings requiredFixings,
const string &  configuration,
const QuantLib::Date &  openEndDateReplacement = Null<Date>(),
const bool  useXbsCurves = false 
) const
overridevirtual

Implements LegBuilder.

Definition at line 207 of file legbuilders.cpp.

209 {
210 auto cmbData = QuantLib::ext::dynamic_pointer_cast<CMBLegData>(data.concreteLegData());
211 QL_REQUIRE(cmbData, "Wrong LegType, expected CMB");
212 string indexName = cmbData->genericBond();
213 auto index = parseConstantMaturityBondIndex(indexName);
214 Leg result = makeCMBLeg(data, engineFactory, true, openEndDateReplacement);
215 applyIndexing(result, data, engineFactory, requiredFixings, openEndDateReplacement, useXbsCurves);
216 addToRequiredFixings(result, QuantLib::ext::make_shared<FixingDateGetter>(requiredFixings));
217 return result;
218}
QuantLib::ext::shared_ptr< ConstantMaturityBondIndex > parseConstantMaturityBondIndex(const string &name)
Convert std::string to QuantExt::ConstantMaturityBondIndex.
@ data
Definition: log.hpp:77
void applyIndexing(Leg &leg, const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, RequiredFixings &requiredFixings, const QuantLib::Date &openEndDateReplacement, const bool useXbsCurves)
Definition: legdata.cpp:2633
void addToRequiredFixings(const QuantLib::Leg &leg, const QuantLib::ext::shared_ptr< FixingDateGetter > &fixingDateGetter)
Leg makeCMBLeg(const LegData &data, const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const bool attachPricer, const QuantLib::Date &openEndDateReplacement)
Definition: legdata.cpp:1984
+ Here is the call graph for this function: