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

Cross Currency yield curve segment. More...

#include <ored/configuration/yieldcurveconfig.hpp>

+ Inheritance diagram for CrossCcyYieldCurveSegment:
+ Collaboration diagram for CrossCcyYieldCurveSegment:

Public Member Functions

Constructors/Destructors
 CrossCcyYieldCurveSegment ()
 Default constructor. More...
 
 CrossCcyYieldCurveSegment (const string &typeID, const string &conventionsID, const vector< string > &quotes, const string &spotRateID, const string &foreignDiscountCurveID, const string &domesticProjectionCurveID=string(), const string &foreignProjectionCurveID=string())
 Detailed constructor. More...
 
virtual ~CrossCcyYieldCurveSegment ()
 Default destructor. More...
 
Serialisation
virtual void fromXML (XMLNode *node) override
 
virtual XMLNodetoXML (XMLDocument &doc) const override
 
Inspectors
const string & spotRateID () const
 
const string & foreignDiscountCurveID () const
 
const string & domesticProjectionCurveID () const
 
const string & foreignProjectionCurveID () 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 spotRateID_
 
string foreignDiscountCurveID_
 
string domesticProjectionCurveID_
 
string foreignProjectionCurveID_
 
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

Cross Currency yield curve segment.

Cross currency basis spread adjusted discount curves for 'domestic' currency cash flows are built using this segment type which requires cross currency basis spreads quotes, the spot FX quote ID and at least the 'foreign' discount curve ID. Projection curves for both currencies can be provided as well for consistency with tenor basis in each currency.

Definition at line 301 of file yieldcurveconfig.hpp.

Constructor & Destructor Documentation

◆ CrossCcyYieldCurveSegment() [1/2]

Default constructor.

Definition at line 306 of file yieldcurveconfig.hpp.

306{}

◆ CrossCcyYieldCurveSegment() [2/2]

CrossCcyYieldCurveSegment ( const string &  typeID,
const string &  conventionsID,
const vector< string > &  quotes,
const string &  spotRateID,
const string &  foreignDiscountCurveID,
const string &  domesticProjectionCurveID = string(),
const string &  foreignProjectionCurveID = string() 
)

Detailed constructor.

Definition at line 607 of file yieldcurveconfig.cpp.

const string & domesticProjectionCurveID() const
const string & foreignDiscountCurveID() const
const string & foreignProjectionCurveID() const
const vector< pair< string, bool > > & quotes() const
const string & conventionsID() const
YieldCurveSegment()
Default constructor.

◆ ~CrossCcyYieldCurveSegment()

virtual ~CrossCcyYieldCurveSegment ( )
virtual

Default destructor.

Definition at line 313 of file yieldcurveconfig.hpp.

313{}

Member Function Documentation

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Reimplemented from YieldCurveSegment.

Definition at line 616 of file yieldcurveconfig.cpp.

616 {
617 XMLUtils::checkNode(node, "CrossCurrency");
619 foreignDiscountCurveID_ = XMLUtils::getChildValue(node, "DiscountCurve", true);
620 spotRateID_ = XMLUtils::getChildValue(node, "SpotRate", true);
621 domesticProjectionCurveID_ = XMLUtils::getChildValue(node, "ProjectionCurveDomestic", false);
622 foreignProjectionCurveID_ = XMLUtils::getChildValue(node, "ProjectionCurveForeign", false);
623}
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 625 of file yieldcurveconfig.cpp.

625 {
627 XMLUtils::setNodeName(doc, node, "CrossCurrency");
628 XMLUtils::addChild(doc, node, "DiscountCurve", foreignDiscountCurveID_);
629 XMLUtils::addChild(doc, node, "SpotRate", spotRateID_);
630 if (!domesticProjectionCurveID_.empty())
631 XMLUtils::addChild(doc, node, "ProjectionCurveDomestic", domesticProjectionCurveID_);
632 if (!foreignProjectionCurveID_.empty())
633 XMLUtils::addChild(doc, node, "ProjectionCurveForeign", foreignProjectionCurveID_);
634 return node;
635}
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:

◆ spotRateID()

const string & spotRateID ( ) const

Definition at line 324 of file yieldcurveconfig.hpp.

324{ return spotRateID_; }

◆ foreignDiscountCurveID()

const string & foreignDiscountCurveID ( ) const

Definition at line 325 of file yieldcurveconfig.hpp.

325{ return foreignDiscountCurveID_; }

◆ domesticProjectionCurveID()

const string & domesticProjectionCurveID ( ) const

Definition at line 326 of file yieldcurveconfig.hpp.

◆ foreignProjectionCurveID()

const string & foreignProjectionCurveID ( ) const

Definition at line 327 of file yieldcurveconfig.hpp.

◆ accept()

void accept ( AcyclicVisitor &  v)
overridevirtual

Reimplemented from YieldCurveSegment.

Definition at line 637 of file yieldcurveconfig.cpp.

637 {
638 Visitor<CrossCcyYieldCurveSegment>* v1 = dynamic_cast<Visitor<CrossCcyYieldCurveSegment>*>(&v);
639 if (v1 != 0)
640 v1->visit(*this);
641 else
643}
virtual void accept(AcyclicVisitor &)
+ Here is the call graph for this function:

Member Data Documentation

◆ spotRateID_

string spotRateID_
private

Definition at line 336 of file yieldcurveconfig.hpp.

◆ foreignDiscountCurveID_

string foreignDiscountCurveID_
private

Definition at line 337 of file yieldcurveconfig.hpp.

◆ domesticProjectionCurveID_

string domesticProjectionCurveID_
private

Definition at line 338 of file yieldcurveconfig.hpp.

◆ foreignProjectionCurveID_

string foreignProjectionCurveID_
private

Definition at line 339 of file yieldcurveconfig.hpp.