Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LegData Class Reference

Serializable object holding leg data. More...

#include <ored/portfolio/legdata.hpp>

+ Inheritance diagram for LegData:
+ Collaboration diagram for LegData:

Public Member Functions

 LegData ()
 Default constructor. More...
 
 LegData (const QuantLib::ext::shared_ptr< LegAdditionalData > &innerLegData, bool isPayer, const string &currency, const ScheduleData &scheduleData=ScheduleData(), const string &dayCounter="", const std::vector< double > &notionals=std::vector< double >(), const std::vector< string > &notionalDates=std::vector< string >(), const string &paymentConvention="F", const bool notionalInitialExchange=false, const bool notionalFinalExchange=false, const bool notionalAmortizingExchange=false, const bool isNotResetXCCY=true, const string &foreignCurrency="", const double foreignAmount=0, const string &fxIndex="", const std::vector< AmortizationData > &amortizationData=std::vector< AmortizationData >(), const string &paymentLag="", const string &notionalPaymentLag="", const std::string &paymentCalendar="", const std::vector< std::string > &paymentDates=std::vector< std::string >(), const std::vector< Indexing > &indexing={}, const bool indexingFromAssetLeg=false, const string &lastPeriodDayCounter="")
 Constructor with concrete leg data. More...
 
Serialisation
virtual void fromXML (XMLNode *node) override
 
virtual XMLNodetoXML (XMLDocument &doc) const override
 
Inspectors
bool isPayer () const
 
const string & currency () const
 
const ScheduleDataschedule () const
 
const vector< double > & notionals () const
 
const vector< string > & notionalDates () const
 
const string & dayCounter () const
 
const string & paymentConvention () const
 
bool notionalInitialExchange () const
 
bool notionalFinalExchange () const
 
bool notionalAmortizingExchange () const
 
bool isNotResetXCCY () const
 
const string & foreignCurrency () const
 
double foreignAmount () const
 
const string & fxIndex () const
 
const string & paymentLag () const
 
const string & notionalPaymentLag () const
 
const std::vector< AmortizationData > & amortizationData () const
 
const std::string & paymentCalendar () const
 
const string & legType () const
 
QuantLib::ext::shared_ptr< LegAdditionalDataconcreteLegData () const
 
const std::set< std::string > & indices () const
 
const std::vector< std::string > & paymentDates () const
 
const std::vector< Indexing > & indexing () const
 
const bool indexingFromAssetLeg () const
 
const string & lastPeriodDayCounter () const
 
const ScheduleDatapaymentSchedule () const
 
bool strictNotionalDates () 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...
 

modifiers

std::set< std::string > indices_
 
QuantLib::ext::shared_ptr< LegAdditionalDataconcreteLegData_
 
bool isPayer_ = true
 
string currency_
 
string legType_
 
ScheduleData schedule_
 
string dayCounter_
 
vector< double > notionals_
 
vector< string > notionalDates_
 
string paymentConvention_
 
bool notionalInitialExchange_ = false
 
bool notionalFinalExchange_ = false
 
bool notionalAmortizingExchange_ =false
 
bool isNotResetXCCY_ = true
 
string foreignCurrency_
 
double foreignAmount_ = 0.0
 
string fxIndex_
 
std::vector< AmortizationDataamortizationData_
 
string paymentLag_
 
string notionalPaymentLag_
 
std::string paymentCalendar_
 
std::vector< std::string > paymentDates_
 
std::vector< Indexingindexing_
 
bool indexingFromAssetLeg_ = false
 
string lastPeriodDayCounter_
 
ScheduleData paymentSchedule_
 
bool strictNotionalDates_ = false
 
vector< double > & notionals ()
 
ScheduleDataschedule ()
 
vector< string > & notionalDates ()
 
string & dayCounter ()
 
boolisPayer ()
 
QuantLib::ext::shared_ptr< LegAdditionalData > & concreteLegData ()
 
std::vector< Indexing > & indexing ()
 
boolindexingFromAssetLeg ()
 
string & paymentConvention ()
 
std::vector< std::string > & paymentDates ()
 
string & lastPeriodDayCounter ()
 
boolstrictNotionalDates ()
 
virtual QuantLib::ext::shared_ptr< LegAdditionalDatainitialiseConcreteLegData (const string &)
 

Detailed Description

Serializable object holding leg data.

Definition at line 844 of file legdata.hpp.

Constructor & Destructor Documentation

◆ LegData() [1/2]

LegData ( )

Default constructor.

Definition at line 847 of file legdata.hpp.

847{}

◆ LegData() [2/2]

LegData ( const QuantLib::ext::shared_ptr< LegAdditionalData > &  innerLegData,
bool  isPayer,
const string &  currency,
const ScheduleData scheduleData = ScheduleData(),
const string &  dayCounter = "",
const std::vector< double > &  notionals = std::vector<double>(),
const std::vector< string > &  notionalDates = std::vector<string>(),
const string &  paymentConvention = "F",
const bool  notionalInitialExchange = false,
const bool  notionalFinalExchange = false,
const bool  notionalAmortizingExchange = false,
const bool  isNotResetXCCY = true,
const string &  foreignCurrency = "",
const double  foreignAmount = 0,
const string &  fxIndex = "",
const std::vector< AmortizationData > &  amortizationData = std::vector<AmortizationData>(),
const string &  paymentLag = "",
const string &  notionalPaymentLag = "",
const std::string &  paymentCalendar = "",
const std::vector< std::string > &  paymentDates = std::vector<std::string>(),
const std::vector< Indexing > &  indexing = {},
const bool  indexingFromAssetLeg = false,
const string &  lastPeriodDayCounter = "" 
)

Constructor with concrete leg data.

Definition at line 730 of file legdata.cpp.

748
749 indices_ = concreteLegData_->indices();
750
751 if (!fxIndex_.empty())
752 indices_.insert(fxIndex_);
753
754 for (auto const& i : indexing)
755 if (i.hasData())
756 indices_.insert(i.index());
757}
const std::vector< AmortizationData > & amortizationData() const
Definition: legdata.hpp:888
const string & paymentConvention() const
Definition: legdata.hpp:878
std::set< std::string > indices_
Definition: legdata.hpp:926
const string & currency() const
Definition: legdata.hpp:873
bool notionalFinalExchange() const
Definition: legdata.hpp:880
const std::vector< std::string > & paymentDates() const
Definition: legdata.hpp:893
double foreignAmount() const
Definition: legdata.hpp:884
string notionalPaymentLag_
Definition: legdata.hpp:946
bool notionalFinalExchange_
Definition: legdata.hpp:939
vector< double > notionals_
Definition: legdata.hpp:935
const string & foreignCurrency() const
Definition: legdata.hpp:883
bool indexingFromAssetLeg_
Definition: legdata.hpp:950
bool notionalInitialExchange_
Definition: legdata.hpp:938
bool isPayer() const
Definition: legdata.hpp:872
bool notionalAmortizingExchange() const
Definition: legdata.hpp:881
const std::vector< Indexing > & indexing() const
Definition: legdata.hpp:894
std::vector< std::string > paymentDates_
Definition: legdata.hpp:948
ScheduleData schedule_
Definition: legdata.hpp:933
QuantLib::ext::shared_ptr< LegAdditionalData > concreteLegData_
Definition: legdata.hpp:929
double foreignAmount_
Definition: legdata.hpp:943
const std::string & paymentCalendar() const
Definition: legdata.hpp:889
std::vector< Indexing > indexing_
Definition: legdata.hpp:949
const bool indexingFromAssetLeg() const
Definition: legdata.hpp:895
std::string paymentCalendar_
Definition: legdata.hpp:947
vector< string > notionalDates_
Definition: legdata.hpp:936
const string & fxIndex() const
Definition: legdata.hpp:885
const string & dayCounter() const
Definition: legdata.hpp:877
bool isNotResetXCCY() const
Definition: legdata.hpp:882
const vector< string > & notionalDates() const
Definition: legdata.hpp:876
const string & paymentLag() const
Definition: legdata.hpp:886
string lastPeriodDayCounter_
Definition: legdata.hpp:951
const string & lastPeriodDayCounter() const
Definition: legdata.hpp:896
bool notionalInitialExchange() const
Definition: legdata.hpp:879
string paymentConvention_
Definition: legdata.hpp:937
std::vector< AmortizationData > amortizationData_
Definition: legdata.hpp:945
QuantLib::ext::shared_ptr< LegAdditionalData > concreteLegData() const
Definition: legdata.hpp:891
const vector< double > & notionals() const
Definition: legdata.hpp:875
bool notionalAmortizingExchange_
Definition: legdata.hpp:940
const string & notionalPaymentLag() const
Definition: legdata.hpp:887
string foreignCurrency_
Definition: legdata.hpp:942
+ Here is the call graph for this function:

Member Function Documentation

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 759 of file legdata.cpp.

759 {
760 XMLUtils::checkNode(node, "LegData");
761 string legType = XMLUtils::getChildValue(node, "LegType", true);
763 currency_ = XMLUtils::getChildValue(node, "Currency", false);
764 dayCounter_ = XMLUtils::getChildValue(node, "DayCounter"); // optional
765 paymentConvention_ = XMLUtils::getChildValue(node, "PaymentConvention");
766 paymentLag_ = XMLUtils::getChildValue(node, "PaymentLag");
767 notionalPaymentLag_ = XMLUtils::getChildValue(node, "NotionalPaymentLag");
768 paymentCalendar_ = XMLUtils::getChildValue(node, "PaymentCalendar", false);
769 // if not given, default of getChildValueAsBool is true, which fits our needs here
770 notionals_ = XMLUtils::getChildrenValuesWithAttributes<Real>(node, "Notionals", "Notional", "startDate",
771 notionalDates_, &parseReal);
772 isNotResetXCCY_ = true;
776 if (auto tmp = XMLUtils::getChildNode(node, "Notionals")) {
777 XMLNode* fxResetNode = XMLUtils::getChildNode(tmp, "FXReset");
778 if (fxResetNode) {
779 isNotResetXCCY_ = false;
780 foreignCurrency_ = XMLUtils::getChildValue(fxResetNode, "ForeignCurrency", true);
781 foreignAmount_ = XMLUtils::getChildValueAsDouble(fxResetNode, "ForeignAmount", true);
782 fxIndex_ = XMLUtils::getChildValue(fxResetNode, "FXIndex", true);
783 indices_.insert(fxIndex_);
784 if (XMLUtils::getChildNode(node, "FixingDays")) {
785 WLOG("LegData::fromXML, node FixingDays has been deprecated, fixing days are "
786 "taken from conventions.");
787 }
788 if (XMLUtils::getChildNode(node, "FixingCalendar")) {
789 WLOG("LegData::fromXML, node FixingCalendar has been deprecated, fixing calendar is "
790 "taken from conventions.");
791 }
792 // TODO add schedule
793 }
794 XMLNode* exchangeNode = XMLUtils::getChildNode(tmp, "Exchanges");
795 if (exchangeNode) {
796
797 notionalInitialExchange_ = XMLUtils::getChildValueAsBool(exchangeNode, "NotionalInitialExchange");
798 notionalFinalExchange_ = XMLUtils::getChildValueAsBool(exchangeNode, "NotionalFinalExchange");
799 if (XMLUtils::getChildNode(exchangeNode, "NotionalAmortizingExchange"))
800 notionalAmortizingExchange_ = XMLUtils::getChildValueAsBool(exchangeNode, "NotionalAmortizingExchange");
801 }
802 }
803
804 XMLNode* amortizationParentNode = XMLUtils::getChildNode(node, "Amortizations");
805 if (amortizationParentNode) {
806 auto adNodes = XMLUtils::getChildrenNodes(amortizationParentNode, "AmortizationData");
807 for (auto const& a : adNodes) {
808 amortizationData_.push_back(AmortizationData());
809 amortizationData_.back().fromXML(a);
810 }
811 }
812
813 if (auto tmp = XMLUtils::getChildNode(node, "ScheduleData"))
814 schedule_.fromXML(tmp);
815
816 paymentDates_ = XMLUtils::getChildrenValues(node, "PaymentDates", "PaymentDate", false);
817 if (!paymentDates_.empty()) {
818 WLOG("Usage of PaymentDates is deprecated, use PaymentSchedule instead.");
819 }
820
821 strictNotionalDates_ = XMLUtils::getChildValueAsBool(node, "StrictNotionalDates", false, false);
822
823 if (auto tmp = XMLUtils::getChildNode(node, "PaymentSchedule")) {
825 QL_REQUIRE(paymentDates_.empty(), "Both PaymentDates and PaymentSchedule is given. Remove one of them. "
826 "PaymentDates is deprecated, so preferably use PaymentSchedule.");
827 }
828
829 if (auto tmp = XMLUtils::getChildNode(node, "Indexings")) {
830 if (auto n = XMLUtils::getChildNode(tmp, "FromAssetLeg")) {
832 } else {
833 indexingFromAssetLeg_ = false;
834 }
835 auto indexings = XMLUtils::getChildrenNodes(tmp, "Indexing");
836 for (auto const& i : indexings) {
837 indexing_.push_back(Indexing());
838 indexing_.back().fromXML(i);
839 }
840 }
841
842 lastPeriodDayCounter_ = XMLUtils::getChildValue(node, "LastPeriodDayCounter", false);
843
845 concreteLegData_->fromXML(XMLUtils::getChildNode(node, concreteLegData_->legNodeName()));
846
847 indices_.insert(concreteLegData_->indices().begin(), concreteLegData_->indices().end());
848}
virtual QuantLib::ext::shared_ptr< LegAdditionalData > initialiseConcreteLegData(const string &)
Definition: legdata.cpp:850
ScheduleData paymentSchedule_
Definition: legdata.hpp:952
const string & legType() const
Definition: legdata.hpp:890
bool strictNotionalDates_
Definition: legdata.hpp:953
virtual void fromXML(XMLNode *node) override
Definition: schedule.cpp:179
static void checkNode(XMLNode *n, const string &expectedName)
Definition: xmlutils.cpp:175
static vector< XMLNode * > getChildrenNodes(XMLNode *node, const string &name)
Returns all the children with a given name.
Definition: xmlutils.cpp:428
static Real getChildValueAsDouble(XMLNode *node, const string &name, bool mandatory=false, double defaultValue=0.0)
Definition: xmlutils.cpp:286
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
static bool getChildValueAsBool(XMLNode *node, const string &name, bool mandatory=false, bool defaultValue=true)
Definition: xmlutils.cpp:296
static XMLNode * getChildNode(XMLNode *n, const string &name="")
Definition: xmlutils.cpp:387
static string getNodeValue(XMLNode *node)
Get a node's value.
Definition: xmlutils.cpp:489
static vector< string > getChildrenValues(XMLNode *node, const string &names, const string &name, bool mandatory=false)
Definition: xmlutils.cpp:306
bool parseBool(const string &s)
Convert text to bool.
Definition: parsers.cpp:144
#define WLOG(text)
Logging Macro (Level = Warning)
Definition: log.hpp:550
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 856 of file legdata.cpp.

856 {
857 XMLNode* node = doc.allocNode("LegData");
858 QL_REQUIRE(node, "Failed to create LegData node");
859 XMLUtils::addChild(doc, node, "LegType", legType());
860 XMLUtils::addChild(doc, node, "Payer", isPayer_);
861 XMLUtils::addChild(doc, node, "Currency", currency_);
862 if (paymentConvention_ != "")
863 XMLUtils::addChild(doc, node, "PaymentConvention", paymentConvention_);
864 if (!paymentLag_.empty())
865 XMLUtils::addChild(doc, node, "PaymentLag", paymentLag_);
866 if (!notionalPaymentLag_.empty())
867 XMLUtils::addChild(doc, node, "NotionalPaymentLag", notionalPaymentLag_);
868 if (!paymentCalendar_.empty())
869 XMLUtils::addChild(doc, node, "PaymentCalendar", paymentCalendar_);
870 if (dayCounter_ != "")
871 XMLUtils::addChild(doc, node, "DayCounter", dayCounter_);
872 XMLUtils::addChildrenWithOptionalAttributes(doc, node, "Notionals", "Notional", notionals_, "startDate",
874 XMLNode* notionalsNodePtr = XMLUtils::getChildNode(node, "Notionals");
875
876 if (!isNotResetXCCY_) {
877 XMLNode* resetNode = doc.allocNode("FXReset");
878 XMLUtils::addChild(doc, resetNode, "ForeignCurrency", foreignCurrency_);
879 XMLUtils::addChild(doc, resetNode, "ForeignAmount", foreignAmount_);
880 XMLUtils::addChild(doc, resetNode, "FXIndex", fxIndex_);
881 XMLUtils::appendNode(notionalsNodePtr, resetNode);
882 }
883
884 XMLNode* exchangeNode = doc.allocNode("Exchanges");
885 XMLUtils::addChild(doc, exchangeNode, "NotionalInitialExchange", notionalInitialExchange_);
886 XMLUtils::addChild(doc, exchangeNode, "NotionalFinalExchange", notionalFinalExchange_);
887 XMLUtils::addChild(doc, exchangeNode, "NotionalAmortizingExchange", notionalAmortizingExchange_);
888 XMLUtils::appendNode(notionalsNodePtr, exchangeNode);
889
891
892 if (!paymentDates_.empty())
893 XMLUtils::addChildren(doc, node, "PaymentDates", "PaymentDate", paymentDates_);
894
895 if (!amortizationData_.empty()) {
896 XMLNode* amortisationsParentNode = doc.allocNode("Amortizations");
897 for (auto& amort : amortizationData_) {
898 if (amort.initialized()) {
899 XMLUtils::appendNode(amortisationsParentNode, amort.toXML(doc));
900 }
901 }
902 XMLUtils::appendNode(node, amortisationsParentNode);
903 }
904
906 XMLUtils::addChild(doc, node, "StrictNotionalDates", strictNotionalDates_);
907 }
908
910 auto tmp = paymentSchedule_.toXML(doc);
911 XMLUtils::setNodeName(doc, tmp, "PaymentSchedule");
912 XMLUtils::appendNode(node, tmp);
913 }
914
915 if (!indexing_.empty() || indexingFromAssetLeg_) {
916 XMLNode* indexingsNode = doc.allocNode("Indexings");
918 XMLUtils::addChild(doc, indexingsNode, "FromAssetLeg", indexingFromAssetLeg_);
919 for (auto& i : indexing_) {
920 if (i.hasData())
921 XMLUtils::appendNode(indexingsNode, i.toXML(doc));
922 }
923 XMLUtils::appendNode(node, indexingsNode);
924 }
925
926 if (!lastPeriodDayCounter_.empty())
927 XMLUtils::addChild(doc, node, "LastPeriodDayCounter", lastPeriodDayCounter_);
928
929 XMLUtils::appendNode(node, concreteLegData_->toXML(doc));
930 return node;
931}
bool hasData() const
Check if has any dates/rules/derived schedules.
Definition: schedule.hpp:223
virtual XMLNode * toXML(XMLDocument &doc) const override
Definition: schedule.cpp:198
static void addChildren(XMLDocument &doc, XMLNode *n, const string &names, const string &name, const vector< T > &values)
Definition: xmlutils.cpp:502
static void addChildrenWithOptionalAttributes(XMLDocument &doc, XMLNode *n, const string &names, const string &name, const vector< T > &values, const string &attrName, const vector< string > &attrs)
Definition: xmlutils.cpp:542
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
static void appendNode(XMLNode *parent, XMLNode *child)
Definition: xmlutils.cpp:406
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPayer() [1/2]

bool isPayer ( ) const

Definition at line 872 of file legdata.hpp.

872{ return isPayer_; }
+ Here is the caller graph for this function:

◆ currency()

const string & currency ( ) const

Definition at line 873 of file legdata.hpp.

873{ return currency_; }
+ Here is the caller graph for this function:

◆ schedule() [1/2]

const ScheduleData & schedule ( ) const

Definition at line 874 of file legdata.hpp.

874{ return schedule_; }
+ Here is the caller graph for this function:

◆ notionals() [1/2]

const vector< double > & notionals ( ) const

Definition at line 875 of file legdata.hpp.

875{ return notionals_; }
+ Here is the caller graph for this function:

◆ notionalDates() [1/2]

const vector< string > & notionalDates ( ) const

Definition at line 876 of file legdata.hpp.

876{ return notionalDates_; }
+ Here is the caller graph for this function:

◆ dayCounter() [1/2]

const string & dayCounter ( ) const

Definition at line 877 of file legdata.hpp.

877{ return dayCounter_; }
+ Here is the caller graph for this function:

◆ paymentConvention() [1/2]

const string & paymentConvention ( ) const

Definition at line 878 of file legdata.hpp.

878{ return paymentConvention_; }
+ Here is the caller graph for this function:

◆ notionalInitialExchange()

bool notionalInitialExchange ( ) const

Definition at line 879 of file legdata.hpp.

879{ return notionalInitialExchange_; }

◆ notionalFinalExchange()

bool notionalFinalExchange ( ) const

Definition at line 880 of file legdata.hpp.

880{ return notionalFinalExchange_; }

◆ notionalAmortizingExchange()

bool notionalAmortizingExchange ( ) const

Definition at line 881 of file legdata.hpp.

◆ isNotResetXCCY()

bool isNotResetXCCY ( ) const

Definition at line 882 of file legdata.hpp.

882{ return isNotResetXCCY_; }

◆ foreignCurrency()

const string & foreignCurrency ( ) const

Definition at line 883 of file legdata.hpp.

883{ return foreignCurrency_; }

◆ foreignAmount()

double foreignAmount ( ) const

Definition at line 884 of file legdata.hpp.

884{ return foreignAmount_; }

◆ fxIndex()

const string & fxIndex ( ) const

Definition at line 885 of file legdata.hpp.

885{ return fxIndex_; }

◆ paymentLag()

const string & paymentLag ( ) const

Definition at line 886 of file legdata.hpp.

886{ return paymentLag_; }
+ Here is the caller graph for this function:

◆ notionalPaymentLag()

const string & notionalPaymentLag ( ) const

Definition at line 887 of file legdata.hpp.

887{ return notionalPaymentLag_; }

◆ amortizationData()

const std::vector< AmortizationData > & amortizationData ( ) const

Definition at line 888 of file legdata.hpp.

888{ return amortizationData_; }

◆ paymentCalendar()

const std::string & paymentCalendar ( ) const

Definition at line 889 of file legdata.hpp.

889{ return paymentCalendar_; }
+ Here is the caller graph for this function:

◆ legType()

const string & legType ( ) const

Definition at line 890 of file legdata.hpp.

890{ return concreteLegData_->legType(); }
+ Here is the caller graph for this function:

◆ concreteLegData() [1/2]

QuantLib::ext::shared_ptr< LegAdditionalData > concreteLegData ( ) const

Definition at line 891 of file legdata.hpp.

891{ return concreteLegData_; }
+ Here is the caller graph for this function:

◆ indices()

const std::set< std::string > & indices ( ) const

Definition at line 892 of file legdata.hpp.

892{ return indices_; }
+ Here is the caller graph for this function:

◆ paymentDates() [1/2]

const std::vector< std::string > & paymentDates ( ) const

Definition at line 893 of file legdata.hpp.

893{ return paymentDates_; }

◆ indexing() [1/2]

const std::vector< Indexing > & indexing ( ) const

Definition at line 894 of file legdata.hpp.

894{ return indexing_; }
+ Here is the caller graph for this function:

◆ indexingFromAssetLeg() [1/2]

const bool indexingFromAssetLeg ( ) const

Definition at line 895 of file legdata.hpp.

895{ return indexingFromAssetLeg_; }

◆ lastPeriodDayCounter() [1/2]

const string & lastPeriodDayCounter ( ) const

Definition at line 896 of file legdata.hpp.

896{ return lastPeriodDayCounter_; }

◆ paymentSchedule()

const ScheduleData & paymentSchedule ( ) const

Definition at line 897 of file legdata.hpp.

897{ return paymentSchedule_; }

◆ strictNotionalDates() [1/2]

bool strictNotionalDates ( ) const

Definition at line 898 of file legdata.hpp.

898{ return strictNotionalDates_; }

◆ notionals() [2/2]

vector< double > & notionals ( )

Definition at line 903 of file legdata.hpp.

903{ return notionals_; }

◆ schedule() [2/2]

ScheduleData & schedule ( )

Definition at line 904 of file legdata.hpp.

904{ return schedule_; }

◆ notionalDates() [2/2]

vector< string > & notionalDates ( )

Definition at line 905 of file legdata.hpp.

905{ return notionalDates_; }

◆ dayCounter() [2/2]

string & dayCounter ( )

Definition at line 906 of file legdata.hpp.

906{ return dayCounter_; }

◆ isPayer() [2/2]

bool & isPayer ( )

Definition at line 907 of file legdata.hpp.

907{ return isPayer_; }

◆ concreteLegData() [2/2]

QuantLib::ext::shared_ptr< LegAdditionalData > & concreteLegData ( )

Definition at line 908 of file legdata.hpp.

908{ return concreteLegData_; }

◆ indexing() [2/2]

std::vector< Indexing > & indexing ( )

Definition at line 909 of file legdata.hpp.

909{ return indexing_; }

◆ indexingFromAssetLeg() [2/2]

bool & indexingFromAssetLeg ( )

Definition at line 910 of file legdata.hpp.

910{ return indexingFromAssetLeg_; }

◆ paymentConvention() [2/2]

string & paymentConvention ( )

Definition at line 911 of file legdata.hpp.

911{ return paymentConvention_; }

◆ paymentDates() [2/2]

std::vector< std::string > & paymentDates ( )

Definition at line 912 of file legdata.hpp.

912{ return paymentDates_; }

◆ lastPeriodDayCounter() [2/2]

string & lastPeriodDayCounter ( )

Definition at line 913 of file legdata.hpp.

913{ return lastPeriodDayCounter_; }

◆ strictNotionalDates() [2/2]

bool & strictNotionalDates ( )

Definition at line 914 of file legdata.hpp.

914{ return strictNotionalDates_; }

◆ initialiseConcreteLegData()

QuantLib::ext::shared_ptr< LegAdditionalData > initialiseConcreteLegData ( const string &  legType)
virtual

Definition at line 850 of file legdata.cpp.

850 {
851 auto legData = LegDataFactory::instance().build(legType);
852 QL_REQUIRE(legData, "Leg type " << legType << " has not been registered with the leg data factory.");
853 return legData;
854}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ indices_

std::set<std::string> indices_
protected

Store the set of ORE index names that appear on this leg.

Take the set appearing in LegAdditionalData::indices() and add on any appearing here. Currently, the only possible extra index appearing at LegData level is fxIndex.

Definition at line 926 of file legdata.hpp.

◆ concreteLegData_

QuantLib::ext::shared_ptr<LegAdditionalData> concreteLegData_
private

Definition at line 929 of file legdata.hpp.

◆ isPayer_

bool isPayer_ = true
private

Definition at line 930 of file legdata.hpp.

◆ currency_

string currency_
private

Definition at line 931 of file legdata.hpp.

◆ legType_

string legType_
private

Definition at line 932 of file legdata.hpp.

◆ schedule_

ScheduleData schedule_
private

Definition at line 933 of file legdata.hpp.

◆ dayCounter_

string dayCounter_
private

Definition at line 934 of file legdata.hpp.

◆ notionals_

vector<double> notionals_
private

Definition at line 935 of file legdata.hpp.

◆ notionalDates_

vector<string> notionalDates_
private

Definition at line 936 of file legdata.hpp.

◆ paymentConvention_

string paymentConvention_
private

Definition at line 937 of file legdata.hpp.

◆ notionalInitialExchange_

bool notionalInitialExchange_ = false
private

Definition at line 938 of file legdata.hpp.

◆ notionalFinalExchange_

bool notionalFinalExchange_ = false
private

Definition at line 939 of file legdata.hpp.

◆ notionalAmortizingExchange_

bool notionalAmortizingExchange_ =false
private

Definition at line 940 of file legdata.hpp.

◆ isNotResetXCCY_

bool isNotResetXCCY_ = true
private

Definition at line 941 of file legdata.hpp.

◆ foreignCurrency_

string foreignCurrency_
private

Definition at line 942 of file legdata.hpp.

◆ foreignAmount_

double foreignAmount_ = 0.0
private

Definition at line 943 of file legdata.hpp.

◆ fxIndex_

string fxIndex_
private

Definition at line 944 of file legdata.hpp.

◆ amortizationData_

std::vector<AmortizationData> amortizationData_
private

Definition at line 945 of file legdata.hpp.

◆ paymentLag_

string paymentLag_
private

Definition at line 946 of file legdata.hpp.

◆ notionalPaymentLag_

string notionalPaymentLag_
private

Definition at line 946 of file legdata.hpp.

◆ paymentCalendar_

std::string paymentCalendar_
private

Definition at line 947 of file legdata.hpp.

◆ paymentDates_

std::vector<std::string> paymentDates_
private

Definition at line 948 of file legdata.hpp.

◆ indexing_

std::vector<Indexing> indexing_
private

Definition at line 949 of file legdata.hpp.

◆ indexingFromAssetLeg_

bool indexingFromAssetLeg_ = false
private

Definition at line 950 of file legdata.hpp.

◆ lastPeriodDayCounter_

string lastPeriodDayCounter_
private

Definition at line 951 of file legdata.hpp.

◆ paymentSchedule_

ScheduleData paymentSchedule_
private

Definition at line 952 of file legdata.hpp.

◆ strictNotionalDates_

bool strictNotionalDates_ = false
private

Definition at line 953 of file legdata.hpp.