#include <ored/configuration/conventions.hpp>
|
| enum class | PublicationRoll { None
, OnPublicationDate
, AfterPublicationDate
} |
| | Rule for determining when inflation swaps roll to observing latest inflation index release. More...
|
| |
| 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...
|
| |
|
| | InflationSwapConvention () |
| |
| | InflationSwapConvention (const string &id, const string &strFixCalendar, const string &strFixConvention, const string &strDayCounter, const string &strIndex, const string &strInterpolated, const string &strObservationLag, const string &strAdjustInfObsDates, const string &strInfCalendar, const string &strInfConvention, PublicationRoll publicationRoll=PublicationRoll::None, const QuantLib::ext::shared_ptr< ScheduleData > &publicationScheduleData=nullptr) |
| |
| const Calendar & | fixCalendar () const |
| |
| BusinessDayConvention | fixConvention () const |
| |
| const DayCounter & | dayCounter () const |
| |
| QuantLib::ext::shared_ptr< ZeroInflationIndex > | index () const |
| |
| const string & | indexName () const |
| |
| bool | interpolated () const |
| |
| Period | observationLag () const |
| |
| bool | adjustInfObsDates () const |
| |
| const Calendar & | infCalendar () const |
| |
| BusinessDayConvention | infConvention () const |
| |
| PublicationRoll | publicationRoll () const |
| |
| const Schedule & | publicationSchedule () const |
| |
| virtual void | fromXML (XMLNode *node) override |
| |
| virtual XMLNode * | toXML (XMLDocument &doc) const override |
| |
| virtual void | build () override |
| |
| virtual | ~Convention () |
| | Default destructor. More...
|
| |
| const string & | id () const |
| |
| Type | type () const |
| |
| virtual | ~XMLSerializable () |
| |
| virtual void | fromXML (XMLNode *node)=0 |
| |
| virtual XMLNode * | toXML (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...
|
| |
Definition at line 1083 of file conventions.hpp.
◆ PublicationRoll
Rule for determining when inflation swaps roll to observing latest inflation index release.
| Enumerator |
|---|
| None | |
| OnPublicationDate | |
| AfterPublicationDate | |
Definition at line 1086 of file conventions.hpp.
◆ InflationSwapConvention() [1/2]
Definition at line 1235 of file conventions.cpp.
BusinessDayConvention infConvention_
PublicationRoll publicationRoll_
BusinessDayConvention fixConvention_
◆ InflationSwapConvention() [2/2]
| InflationSwapConvention |
( |
const string & |
id, |
|
|
const string & |
strFixCalendar, |
|
|
const string & |
strFixConvention, |
|
|
const string & |
strDayCounter, |
|
|
const string & |
strIndex, |
|
|
const string & |
strInterpolated, |
|
|
const string & |
strObservationLag, |
|
|
const string & |
strAdjustInfObsDates, |
|
|
const string & |
strInfCalendar, |
|
|
const string & |
strInfConvention, |
|
|
PublicationRoll |
publicationRoll = PublicationRoll::None, |
|
|
const QuantLib::ext::shared_ptr< ScheduleData > & |
publicationScheduleData = nullptr |
|
) |
| |
Definition at line 1239 of file conventions.cpp.
1252}
QuantLib::ext::shared_ptr< ScheduleData > publicationScheduleData_
string strAdjustInfObsDates_
PublicationRoll publicationRoll() const
string strObservationLag_
virtual void build() override
◆ fixCalendar()
| const Calendar & fixCalendar |
( |
| ) |
const |
◆ fixConvention()
| BusinessDayConvention fixConvention |
( |
| ) |
const |
◆ dayCounter()
| const DayCounter & dayCounter |
( |
| ) |
const |
◆ index()
Definition at line 1333 of file conventions.cpp.
1333 {
1335}
QuantLib::ext::shared_ptr< ZeroInflationIndex > parseZeroInflationIndex(const string &s, const Handle< ZeroInflationTermStructure > &h)
Convert std::string to QuantLib::ZeroInflationIndex.
◆ indexName()
| const string & indexName |
( |
| ) |
const |
◆ interpolated()
| bool interpolated |
( |
| ) |
const |
◆ observationLag()
| Period observationLag |
( |
| ) |
const |
◆ adjustInfObsDates()
| bool adjustInfObsDates |
( |
| ) |
const |
◆ infCalendar()
| const Calendar & infCalendar |
( |
| ) |
const |
◆ infConvention()
| BusinessDayConvention infConvention |
( |
| ) |
const |
◆ publicationRoll()
◆ publicationSchedule()
| const Schedule & publicationSchedule |
( |
| ) |
const |
◆ fromXML()
Implements XMLSerializable.
Definition at line 1272 of file conventions.cpp.
1272 {
1273
1277
1278
1288
1292 }
1293
1296 QL_REQUIRE(n,
"PublicationRoll is " <<
publicationRoll_ <<
" for " <<
id() <<
1297 " so expect non-empty PublicationSchedule.");
1300 }
1301
1303}
static void checkNode(XMLNode *n, const string &expectedName)
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
static XMLNode * getChildNode(XMLNode *n, const string &name="")
static string getNodeValue(XMLNode *node)
Get a node's value.
rapidxml::xml_node< char > XMLNode
InflationSwapConvention::PublicationRoll parseInflationSwapPublicationRoll(const string &s)
Convert text to InflationSwapConvention::PublicationRoll.
◆ toXML()
Implements XMLSerializable.
Definition at line 1305 of file conventions.cpp.
1305 {
1306
1307 XMLNode* node = doc.allocNode(
"InflationSwap");
1318
1322 << id() << " so expect PublicationSchedule.");
1323
1324
1328 }
1329
1330 return node;
1331}
static void setNodeName(XMLDocument &doc, XMLNode *node, const string &name)
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
static void appendNode(XMLNode *parent, XMLNode *child)
std::string to_string(const LocationInfo &l)
◆ build()
Implements Convention.
Definition at line 1254 of file conventions.cpp.
1254 {
1267 " so expect non-null publication schedule data.");
1269 }
1270}
QuantLib::ext::shared_ptr< ZeroInflationIndex > index_
Calendar parseCalendar(const string &s)
Convert text to QuantLib::Calendar.
BusinessDayConvention parseBusinessDayConvention(const string &s)
Convert text to QuantLib::BusinessDayConvention.
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
bool parseBool(const string &s)
Convert text to bool.
DayCounter parseDayCounter(const string &s)
Convert text to QuantLib::DayCounter.
Schedule makeSchedule(const ScheduleDates &data)
◆ fixCalendar_
◆ fixConvention_
| BusinessDayConvention fixConvention_ |
|
private |
◆ dayCounter_
◆ index_
◆ interpolated_
◆ observationLag_
◆ adjustInfObsDates_
◆ infCalendar_
◆ infConvention_
| BusinessDayConvention infConvention_ |
|
private |
◆ publicationSchedule_
| Schedule publicationSchedule_ |
|
private |
◆ strFixCalendar_
◆ strFixConvention_
◆ strDayCounter_
◆ strIndex_
◆ strInterpolated_
◆ strObservationLag_
| string strObservationLag_ |
|
private |
◆ strAdjustInfObsDates_
| string strAdjustInfObsDates_ |
|
private |
◆ strInfCalendar_
◆ strInfConvention_
◆ publicationRoll_
◆ publicationScheduleData_
| QuantLib::ext::shared_ptr<ScheduleData> publicationScheduleData_ |
|
private |