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

Zero Spreaded yield curve segment. More...

#include <ored/configuration/yieldcurveconfig.hpp>

+ Inheritance diagram for ZeroSpreadedYieldCurveSegment:
+ Collaboration diagram for ZeroSpreadedYieldCurveSegment:

Public Member Functions

Constructors/Destructors
 ZeroSpreadedYieldCurveSegment ()
 Default constructor. More...
 
 ZeroSpreadedYieldCurveSegment (const string &typeID, const string &conventionsID, const vector< string > &quotes, const string &referenceCurveID)
 Detailed constructor. More...
 
virtual ~ZeroSpreadedYieldCurveSegment ()
 Default destructor. More...
 
Serialisation
virtual void fromXML (XMLNode *node) override
 
virtual XMLNodetoXML (XMLDocument &doc) const override
 
Inspectors
const string & referenceCurveID () const
 
- Public Member Functions inherited from YieldCurveSegment
virtual ~YieldCurveSegment ()
 Default destructor. More...
 
Type type () const
 
const string & typeID () const
 
const string & conventionsID () const
 
const QuantLib::Pillar::Choice pillarChoice () const
 
Size priority () const
 
Size minDistance () const
 
const vector< pair< string, bool > > & quotes () 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...
 

Visitability

string referenceCurveID_
 
virtual void accept (AcyclicVisitor &) override
 

Additional Inherited Members

- Public Types inherited from YieldCurveSegment
enum class  Type {
  Zero , ZeroSpread , Discount , Deposit ,
  FRA , Future , OIS , Swap ,
  AverageOIS , TenorBasis , TenorBasisTwo , BMABasis ,
  FXForward , CrossCcyBasis , CrossCcyFixFloat , DiscountRatio ,
  FittedBond , WeightedAverage , YieldPlusDefault , IborFallback ,
  BondYieldShifted
}
 supported segment types More...
 
- Protected Member Functions inherited from YieldCurveSegment
 YieldCurveSegment ()
 Default constructor. More...
 
 YieldCurveSegment (const string &typeID, const string &conventionsID, const vector< string > &quotes)
 Detailed constructor - assumes all quotes are mandatory. More...
 
pair< string, boolquote (const string &name, bool opt=false)
 Utility to build a quote, optional flag defaults to false. More...
 
- Protected Attributes inherited from YieldCurveSegment
vector< pair< string, bool > > quotes_
 Quote and optional flag pair. More...
 

Detailed Description

Zero Spreaded yield curve segment.

A zero spreaded segment is used to build a yield curve from zero spread quotes and a reference yield curve.

Definition at line 349 of file yieldcurveconfig.hpp.

Constructor & Destructor Documentation

◆ ZeroSpreadedYieldCurveSegment() [1/2]

Default constructor.

Definition at line 354 of file yieldcurveconfig.hpp.

354{}

◆ ZeroSpreadedYieldCurveSegment() [2/2]

ZeroSpreadedYieldCurveSegment ( const string &  typeID,
const string &  conventionsID,
const vector< string > &  quotes,
const string &  referenceCurveID 
)

Detailed constructor.

Definition at line 645 of file yieldcurveconfig.cpp.

◆ ~ZeroSpreadedYieldCurveSegment()

virtual ~ZeroSpreadedYieldCurveSegment ( )
virtual

Default destructor.

Definition at line 359 of file yieldcurveconfig.hpp.

359{}

Member Function Documentation

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Reimplemented from YieldCurveSegment.

Definition at line 650 of file yieldcurveconfig.cpp.

650 {
651 XMLUtils::checkNode(node, "ZeroSpread");
653 referenceCurveID_ = XMLUtils::getChildValue(node, "ReferenceCurve", false);
654}
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
virtual void fromXML(XMLNode *node) override
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Reimplemented from YieldCurveSegment.

Definition at line 656 of file yieldcurveconfig.cpp.

656 {
658 XMLUtils::setNodeName(doc, node, "ZeroSpread");
659 XMLUtils::addChild(doc, node, "ReferenceCurve", referenceCurveID_);
660 return node;
661}
static void setNodeName(XMLDocument &doc, XMLNode *node, const string &name)
Definition: xmlutils.cpp:478
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
virtual XMLNode * toXML(XMLDocument &doc) const override
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:

◆ referenceCurveID()

const string & referenceCurveID ( ) const

Definition at line 370 of file yieldcurveconfig.hpp.

370{ return referenceCurveID_; }

◆ accept()

void accept ( AcyclicVisitor &  v)
overridevirtual

Reimplemented from YieldCurveSegment.

Definition at line 663 of file yieldcurveconfig.cpp.

663 {
664 Visitor<ZeroSpreadedYieldCurveSegment>* v1 = dynamic_cast<Visitor<ZeroSpreadedYieldCurveSegment>*>(&v);
665 if (v1 != 0)
666 v1->visit(*this);
667 else
669}
virtual void accept(AcyclicVisitor &)
+ Here is the call graph for this function:

Member Data Documentation

◆ referenceCurveID_

string referenceCurveID_
private

Definition at line 379 of file yieldcurveconfig.hpp.