#include <ored/portfolio/optionpaymentdata.hpp>
Public Types | |
enum class | RelativeTo { Expiry , Exercise } |
When we have payment rules, specifies what date the payment is relative to. More... | |
Public Member Functions | |
OptionPaymentData () | |
Default constructor. More... | |
OptionPaymentData (const std::vector< std::string > &dates) | |
Constructor taking an explicit set of payment dates. More... | |
OptionPaymentData (const std::string &lag, const std::string &calendar, const std::string &convention, const std::string &relativeTo="Expiry") | |
Constructor taking a set of payment rules. More... | |
bool | rulesBased () const |
Inspectors | |
const std::vector< QuantLib::Date > & | dates () const |
QuantLib::Natural | lag () const |
const QuantLib::Calendar & | calendar () const |
QuantLib::BusinessDayConvention | convention () const |
RelativeTo | relativeTo () const |
Public Member Functions inherited from XMLSerializable | |
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... | |
Serialisation | |
std::vector< std::string > | strDates_ |
std::string | strLag_ |
std::string | strCalendar_ |
std::string | strConvention_ |
std::string | strRelativeTo_ |
bool | rulesBased_ |
std::vector< QuantLib::Date > | dates_ |
QuantLib::Natural | lag_ |
QuantLib::Calendar | calendar_ |
QuantLib::BusinessDayConvention | convention_ |
RelativeTo | relativeTo_ |
virtual void | fromXML (XMLNode *node) override |
virtual XMLNode * | toXML (XMLDocument &doc) const override |
void | init () |
Initialisation. More... | |
void | populateRelativeTo () |
Populate the value of relativeTo_ member from string. More... | |
Serializable object holding option payment data for cash settled options.
Definition at line 36 of file optionpaymentdata.hpp.
|
strong |
When we have payment rules, specifies what date the payment is relative to.
Enumerator | |
---|---|
Expiry | |
Exercise |
Definition at line 39 of file optionpaymentdata.hpp.
Default constructor.
Definition at line 31 of file optionpaymentdata.cpp.
OptionPaymentData | ( | const std::vector< std::string > & | dates | ) |
Constructor taking an explicit set of payment dates.
Definition at line 34 of file optionpaymentdata.cpp.
OptionPaymentData | ( | const std::string & | lag, |
const std::string & | calendar, | ||
const std::string & | convention, | ||
const std::string & | relativeTo = "Expiry" |
||
) |
Constructor taking a set of payment rules.
Definition at line 39 of file optionpaymentdata.cpp.
bool rulesBased | ( | ) | const |
Returns true
if the OptionPaymentData was constructed using rules and false
if it was constructed using explicit payment dates.
Definition at line 54 of file optionpaymentdata.hpp.
const std::vector< QuantLib::Date > & dates | ( | ) | const |
Definition at line 58 of file optionpaymentdata.hpp.
QuantLib::Natural lag | ( | ) | const |
const QuantLib::Calendar & calendar | ( | ) | const |
Definition at line 60 of file optionpaymentdata.hpp.
QuantLib::BusinessDayConvention convention | ( | ) | const |
RelativeTo relativeTo | ( | ) | const |
|
overridevirtual |
Implements XMLSerializable.
Definition at line 46 of file optionpaymentdata.cpp.
|
overridevirtual |
Implements XMLSerializable.
Definition at line 65 of file optionpaymentdata.cpp.
|
private |
Initialisation.
Definition at line 82 of file optionpaymentdata.cpp.
|
private |
Populate the value of relativeTo_ member from string.
Definition at line 97 of file optionpaymentdata.cpp.
|
private |
Definition at line 72 of file optionpaymentdata.hpp.
|
private |
Definition at line 73 of file optionpaymentdata.hpp.
|
private |
Definition at line 74 of file optionpaymentdata.hpp.
|
private |
Definition at line 75 of file optionpaymentdata.hpp.
|
private |
Definition at line 76 of file optionpaymentdata.hpp.
|
private |
Definition at line 78 of file optionpaymentdata.hpp.
|
private |
Definition at line 79 of file optionpaymentdata.hpp.
|
private |
Definition at line 80 of file optionpaymentdata.hpp.
|
private |
Definition at line 81 of file optionpaymentdata.hpp.
|
private |
Definition at line 82 of file optionpaymentdata.hpp.
|
private |
Definition at line 83 of file optionpaymentdata.hpp.