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

Container for storing Average OIS conventions. More...

#include <ored/configuration/conventions.hpp>

+ Inheritance diagram for AverageOisConvention:
+ Collaboration diagram for AverageOisConvention:

Public Member Functions

Constructors
 AverageOisConvention ()
 Default constructor. More...
 
 AverageOisConvention (const string &id, const string &spotLag, const string &fixedTenor, const string &fixedDayCounter, const string &fixedCalendar, const string &fixedConvention, const string &fixedPaymentConvention, const string &fixedFrequency, const string &index, const string &onTenor, const string &rateCutoff)
 Detailed constructor. More...
 
Inspectors
Natural spotLag () const
 
const Period & fixedTenor () const
 
const DayCounter & fixedDayCounter () const
 
const Calendar & fixedCalendar () const
 
BusinessDayConvention fixedConvention () const
 
BusinessDayConvention fixedPaymentConvention () const
 
Frequency fixedFrequency () const
 
const string & indexName () const
 
QuantLib::ext::shared_ptr< OvernightIndexindex () const
 
const Period & onTenor () const
 
Natural rateCutoff () 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

Natural spotLag_
 
Period fixedTenor_
 
DayCounter fixedDayCounter_
 
Calendar fixedCalendar_
 
BusinessDayConvention fixedConvention_
 
BusinessDayConvention fixedPaymentConvention_
 
Frequency fixedFrequency_
 
Period onTenor_
 
Natural rateCutoff_
 
string strSpotLag_
 
string strFixedTenor_
 
string strFixedDayCounter_
 
string strFixedCalendar_
 
string strFixedConvention_
 
string strFixedPaymentConvention_
 
string strFixedFrequency_
 
string strIndex_
 
string strOnTenor_
 
string strRateCutoff_
 
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 Average OIS conventions.

Definition at line 572 of file conventions.hpp.

Constructor & Destructor Documentation

◆ AverageOisConvention() [1/2]

Default constructor.

Definition at line 577 of file conventions.hpp.

577{}

◆ AverageOisConvention() [2/2]

AverageOisConvention ( const string &  id,
const string &  spotLag,
const string &  fixedTenor,
const string &  fixedDayCounter,
const string &  fixedCalendar,
const string &  fixedConvention,
const string &  fixedPaymentConvention,
const string &  fixedFrequency,
const string &  index,
const string &  onTenor,
const string &  rateCutoff 
)

Detailed constructor.

Definition at line 540 of file conventions.cpp.

549 build();
550}
BusinessDayConvention fixedPaymentConvention() const
const Period & fixedTenor() const
virtual void build() override
const DayCounter & fixedDayCounter() const
BusinessDayConvention fixedConvention() const
const Calendar & fixedCalendar() const
const Period & onTenor() const
QuantLib::ext::shared_ptr< OvernightIndex > index() const
+ Here is the call graph for this function:

Member Function Documentation

◆ spotLag()

Natural spotLag ( ) const

Definition at line 587 of file conventions.hpp.

587{ return spotLag_; }

◆ fixedTenor()

const Period & fixedTenor ( ) const

Definition at line 588 of file conventions.hpp.

◆ fixedDayCounter()

const DayCounter & fixedDayCounter ( ) const

Definition at line 589 of file conventions.hpp.

589{ return fixedDayCounter_; }

◆ fixedCalendar()

const Calendar & fixedCalendar ( ) const

Definition at line 590 of file conventions.hpp.

◆ fixedConvention()

BusinessDayConvention fixedConvention ( ) const

Definition at line 591 of file conventions.hpp.

591{ return fixedConvention_; }
BusinessDayConvention fixedConvention_

◆ fixedPaymentConvention()

BusinessDayConvention fixedPaymentConvention ( ) const

Definition at line 592 of file conventions.hpp.

592{ return fixedPaymentConvention_; }
BusinessDayConvention fixedPaymentConvention_

◆ fixedFrequency()

Frequency fixedFrequency ( ) const

Definition at line 593 of file conventions.hpp.

593{ return fixedFrequency_; }

◆ indexName()

const string & indexName ( ) const

Definition at line 594 of file conventions.hpp.

594{ return strIndex_; }

◆ index()

QuantLib::ext::shared_ptr< OvernightIndex > index ( ) const

Definition at line 605 of file conventions.cpp.

605 {
606 auto tmp = QuantLib::ext::dynamic_pointer_cast<OvernightIndex>(parseIborIndex(strIndex_));
607 QL_REQUIRE(tmp, "The index string '" << strIndex_ << "' does not represent an overnight index.");
608 return tmp;
609}
QuantLib::ext::shared_ptr< IborIndex > parseIborIndex(const string &s, const Handle< YieldTermStructure > &h)
Convert std::string to QuantLib::IborIndex.
+ Here is the call graph for this function:

◆ onTenor()

const Period & onTenor ( ) const

Definition at line 596 of file conventions.hpp.

◆ rateCutoff()

Natural rateCutoff ( ) const

Definition at line 597 of file conventions.hpp.

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 565 of file conventions.cpp.

565 {
566
567 XMLUtils::checkNode(node, "AverageOIS");
569 id_ = XMLUtils::getChildValue(node, "Id", true);
570
571 // Get string values from xml
572 strSpotLag_ = XMLUtils::getChildValue(node, "SpotLag", true);
573 strFixedTenor_ = XMLUtils::getChildValue(node, "FixedTenor", true);
574 strFixedDayCounter_ = XMLUtils::getChildValue(node, "FixedDayCounter", true);
575 strFixedCalendar_ = XMLUtils::getChildValue(node, "FixedCalendar", true);
576 strFixedConvention_ = XMLUtils::getChildValue(node, "FixedConvention", true);
577 strFixedPaymentConvention_ = XMLUtils::getChildValue(node, "FixedPaymentConvention", true);
578 strFixedFrequency_ = XMLUtils::getChildValue(node, "FixedFrequency", false);
579 strIndex_ = XMLUtils::getChildValue(node, "Index", true);
580 strOnTenor_ = XMLUtils::getChildValue(node, "OnTenor", true);
581 strRateCutoff_ = XMLUtils::getChildValue(node, "RateCutoff", true);
582
583 build();
584}
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 586 of file conventions.cpp.

586 {
587
588 XMLNode* node = doc.allocNode("AverageOIS");
589 XMLUtils::addChild(doc, node, "Id", id_);
590 XMLUtils::addChild(doc, node, "SpotLag", strSpotLag_);
591 XMLUtils::addChild(doc, node, "FixedTenor", strFixedTenor_);
592 XMLUtils::addChild(doc, node, "FixedDayCounter", strFixedDayCounter_);
593 XMLUtils::addChild(doc, node, "FixedCalendar", strFixedCalendar_);
594 XMLUtils::addChild(doc, node, "FixedConvention", strFixedConvention_);
595 XMLUtils::addChild(doc, node, "FixedPaymentConvention", strFixedPaymentConvention_);
596 if (!strFixedFrequency_.empty())
597 XMLUtils::addChild(doc, node, "FixedFrequency", strFixedFrequency_);
598 XMLUtils::addChild(doc, node, "Index", strIndex_);
599 XMLUtils::addChild(doc, node, "OnTenor", strOnTenor_);
600 XMLUtils::addChild(doc, node, "RateCutoff", strRateCutoff_);
601
602 return node;
603}
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 552 of file conventions.cpp.

552 {
554 spotLag_ = lexical_cast<Natural>(strSpotLag_);
562 rateCutoff_ = lexical_cast<Natural>(strRateCutoff_);
563}
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
Frequency parseFrequency(const string &s)
Convert text to QuantLib::Frequency.
Definition: parsers.cpp:348
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

◆ spotLag_

Natural spotLag_
private

Definition at line 607 of file conventions.hpp.

◆ fixedTenor_

Period fixedTenor_
private

Definition at line 608 of file conventions.hpp.

◆ fixedDayCounter_

DayCounter fixedDayCounter_
private

Definition at line 609 of file conventions.hpp.

◆ fixedCalendar_

Calendar fixedCalendar_
private

Definition at line 610 of file conventions.hpp.

◆ fixedConvention_

BusinessDayConvention fixedConvention_
private

Definition at line 611 of file conventions.hpp.

◆ fixedPaymentConvention_

BusinessDayConvention fixedPaymentConvention_
private

Definition at line 612 of file conventions.hpp.

◆ fixedFrequency_

Frequency fixedFrequency_
private

Definition at line 613 of file conventions.hpp.

◆ onTenor_

Period onTenor_
private

Definition at line 614 of file conventions.hpp.

◆ rateCutoff_

Natural rateCutoff_
private

Definition at line 615 of file conventions.hpp.

◆ strSpotLag_

string strSpotLag_
private

Definition at line 618 of file conventions.hpp.

◆ strFixedTenor_

string strFixedTenor_
private

Definition at line 619 of file conventions.hpp.

◆ strFixedDayCounter_

string strFixedDayCounter_
private

Definition at line 620 of file conventions.hpp.

◆ strFixedCalendar_

string strFixedCalendar_
private

Definition at line 621 of file conventions.hpp.

◆ strFixedConvention_

string strFixedConvention_
private

Definition at line 622 of file conventions.hpp.

◆ strFixedPaymentConvention_

string strFixedPaymentConvention_
private

Definition at line 623 of file conventions.hpp.

◆ strFixedFrequency_

string strFixedFrequency_
private

Definition at line 624 of file conventions.hpp.

◆ strIndex_

string strIndex_
private

Definition at line 625 of file conventions.hpp.

◆ strOnTenor_

string strOnTenor_
private

Definition at line 626 of file conventions.hpp.

◆ strRateCutoff_

string strRateCutoff_
private

Definition at line 627 of file conventions.hpp.