Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
List of all members
CmsSpreadOptionConvention Class Reference

Container for storing CMS Spread Option conventions. More...

#include <ored/configuration/conventions.hpp>

+ Inheritance diagram for CmsSpreadOptionConvention:
+ Collaboration diagram for CmsSpreadOptionConvention:

Public Member Functions

Constructors
 CmsSpreadOptionConvention ()
 Default constructor. More...
 
 CmsSpreadOptionConvention (const string &id, const string &strForwardStart, const string &strSpotDays, const string &strSwapTenor, const string &strFixingDays, const string &strCalendar, const string &strDayCounter, const string &strConvention)
 Detailed constructor. More...
 
Inspectors
const Period & forwardStart () const
 
const Period spotDays () const
 
const Period & swapTenor ()
 
Natural fixingDays () const
 
const Calendar & calendar () const
 
const DayCounter & dayCounter () const
 
BusinessDayConvention rollConvention () const
 
- Public Member Functions inherited from Convention
virtual ~Convention ()
 Default destructor. More...
 
const string & id () const
 
Type type () const
 
- Public Member Functions inherited from XMLSerializable
virtual ~XMLSerializable ()
 
virtual void fromXML (XMLNode *node)=0
 
virtual XMLNodetoXML (XMLDocument &doc) const =0
 
void fromFile (const std::string &filename)
 
void toFile (const std::string &filename) const
 
void fromXMLString (const std::string &xml)
 Parse from XML string. More...
 
std::string toXMLString () const
 Parse from XML string. More...
 

Serialisation

Period forwardStart_
 
Period spotDays_
 
Period swapTenor_
 
Natural fixingDays_
 
Calendar calendar_
 
DayCounter dayCounter_
 
BusinessDayConvention rollConvention_
 
string strForwardStart_
 
string strSpotDays_
 
string strSwapTenor_
 
string strFixingDays_
 
string strCalendar_
 
string strDayCounter_
 
string strRollConvention_
 
virtual void fromXML (XMLNode *node) override
 
virtual XMLNodetoXML (XMLDocument &doc) const override
 
virtual void build () override
 

Additional Inherited Members

- Public Types inherited from Convention
enum class  Type {
  Zero , Deposit , Future , FRA ,
  OIS , Swap , AverageOIS , TenorBasisSwap ,
  TenorBasisTwoSwap , BMABasisSwap , FX , CrossCcyBasis ,
  CrossCcyFixFloat , CDS , IborIndex , OvernightIndex ,
  SwapIndex , ZeroInflationIndex , InflationSwap , SecuritySpread ,
  CMSSpreadOption , CommodityForward , CommodityFuture , FxOption ,
  BondYield
}
 Supported convention types. More...
 
- Protected Member Functions inherited from Convention
 Convention ()
 
 Convention (const string &id, Type type)
 
- Protected Attributes inherited from Convention
Type type_
 
string id_
 

Detailed Description

Container for storing CMS Spread Option conventions.

Definition at line 1217 of file conventions.hpp.

Constructor & Destructor Documentation

◆ CmsSpreadOptionConvention() [1/2]

Default constructor.

Definition at line 1222 of file conventions.hpp.

1222{}

◆ CmsSpreadOptionConvention() [2/2]

CmsSpreadOptionConvention ( const string &  id,
const string &  strForwardStart,
const string &  strSpotDays,
const string &  strSwapTenor,
const string &  strFixingDays,
const string &  strCalendar,
const string &  strDayCounter,
const string &  strConvention 
)

Detailed constructor.

Definition at line 1414 of file conventions.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ forwardStart()

const Period & forwardStart ( ) const

Definition at line 1231 of file conventions.hpp.

◆ spotDays()

const Period spotDays ( ) const

Definition at line 1232 of file conventions.hpp.

◆ swapTenor()

const Period & swapTenor ( )

Definition at line 1233 of file conventions.hpp.

◆ fixingDays()

Natural fixingDays ( ) const

Definition at line 1234 of file conventions.hpp.

◆ calendar()

const Calendar & calendar ( ) const

Definition at line 1235 of file conventions.hpp.

◆ dayCounter()

const DayCounter & dayCounter ( ) const

Definition at line 1236 of file conventions.hpp.

◆ rollConvention()

BusinessDayConvention rollConvention ( ) const

Definition at line 1237 of file conventions.hpp.

1237{ return rollConvention_; }
BusinessDayConvention rollConvention_

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 1424 of file conventions.cpp.

1424 {
1425
1426 XMLUtils::checkNode(node, "CmsSpreadOption");
1428 id_ = XMLUtils::getChildValue(node, "Id", true);
1429 strForwardStart_ = XMLUtils::getChildValue(node, "ForwardStart", true);
1430 strSpotDays_ = XMLUtils::getChildValue(node, "SpotDays", true);
1431 strSwapTenor_ = XMLUtils::getChildValue(node, "SwapTenor", true);
1432 strFixingDays_ = XMLUtils::getChildValue(node, "FixingDays", true);
1433 strCalendar_ = XMLUtils::getChildValue(node, "Calendar", true);
1434 strDayCounter_ = XMLUtils::getChildValue(node, "DayCounter", true);
1435 strRollConvention_ = XMLUtils::getChildValue(node, "RollConvention", true);
1436
1437 build();
1438}
static void checkNode(XMLNode *n, const string &expectedName)
Definition: xmlutils.cpp:175
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 1451 of file conventions.cpp.

1451 {
1452
1453 XMLNode* node = doc.allocNode("CmsSpreadOption");
1454 XMLUtils::addChild(doc, node, "Id", id_);
1455 XMLUtils::addChild(doc, node, "ForwardStart", strForwardStart_);
1456 XMLUtils::addChild(doc, node, "SpotDays", strSpotDays_);
1457 XMLUtils::addChild(doc, node, "SwapTenor", strSwapTenor_);
1458 XMLUtils::addChild(doc, node, "FixingDays", strFixingDays_);
1459 XMLUtils::addChild(doc, node, "Calendar", strCalendar_);
1460 XMLUtils::addChild(doc, node, "DayCounter", strDayCounter_);
1461 XMLUtils::addChild(doc, node, "RollConvention", strRollConvention_);
1462
1463 return node;
1464}
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:

◆ build()

void build ( )
overridevirtual

Implements Convention.

Definition at line 1440 of file conventions.cpp.

1440 {
1441
1445 fixingDays_ = lexical_cast<Natural>(strFixingDays_);
1449}
Calendar parseCalendar(const string &s)
Convert text to QuantLib::Calendar.
Definition: parsers.cpp:157
BusinessDayConvention parseBusinessDayConvention(const string &s)
Convert text to QuantLib::BusinessDayConvention.
Definition: parsers.cpp:173
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
Definition: parsers.cpp:171
DayCounter parseDayCounter(const string &s)
Convert text to QuantLib::DayCounter.
Definition: parsers.cpp:209
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ forwardStart_

Period forwardStart_
private

Definition at line 1247 of file conventions.hpp.

◆ spotDays_

Period spotDays_
private

Definition at line 1248 of file conventions.hpp.

◆ swapTenor_

Period swapTenor_
private

Definition at line 1249 of file conventions.hpp.

◆ fixingDays_

Natural fixingDays_
private

Definition at line 1250 of file conventions.hpp.

◆ calendar_

Calendar calendar_
private

Definition at line 1251 of file conventions.hpp.

◆ dayCounter_

DayCounter dayCounter_
private

Definition at line 1252 of file conventions.hpp.

◆ rollConvention_

BusinessDayConvention rollConvention_
private

Definition at line 1253 of file conventions.hpp.

◆ strForwardStart_

string strForwardStart_
private

Definition at line 1256 of file conventions.hpp.

◆ strSpotDays_

string strSpotDays_
private

Definition at line 1257 of file conventions.hpp.

◆ strSwapTenor_

string strSwapTenor_
private

Definition at line 1258 of file conventions.hpp.

◆ strFixingDays_

string strFixingDays_
private

Definition at line 1259 of file conventions.hpp.

◆ strCalendar_

string strCalendar_
private

Definition at line 1260 of file conventions.hpp.

◆ strDayCounter_

string strDayCounter_
private

Definition at line 1261 of file conventions.hpp.

◆ strRollConvention_

string strRollConvention_
private

Definition at line 1262 of file conventions.hpp.