#include <ored/portfolio/fixingdates.hpp>
Classes | |
class | FixingDates |
struct | FixingEntry |
struct | InflationFixingEntry |
struct | ZeroInflationFixingEntry |
Public Member Functions | |
std::map< std::string, FixingDates > | fixingDatesIndices (const QuantLib::Date &settlementDate=QuantLib::Date()) const |
void | addFixingDate (const QuantLib::Date &fixingDate, const std::string &indexName, const QuantLib::Date &payDate=Date::maxDate(), const bool alwaysAddIfPaysOnSettlement=false, const bool mandatoryFixing=true) |
void | addFixingDate (const FixingEntry &fixingEntry) |
void | addFixingDates (const std::vector< std::pair< QuantLib::Date, bool > > &fixingDates, const std::string &indexName, const QuantLib::Date &payDate=Date::maxDate(), const bool alwaysAddIfPaysOnSettlement=false) |
void | addFixingDates (const std::vector< QuantLib::Date > &fixingDates, const std::string &indexName, const QuantLib::Date &payDate=Date::maxDate(), const bool alwaysAddIfPaysOnSettlement=false, const bool mandatory=true) |
void | addZeroInflationFixingDate (const QuantLib::Date &fixingDate, const std::string &indexName, const bool indexInterpolated, const Frequency indexFrequency, const Period &indexAvailabilityLag, const CPI::InterpolationType coupopnInterpolation, const Frequency couponFrequency, const QuantLib::Date &payDate=Date::maxDate(), const bool alwaysAddIfPaysOnSettlement=false, const bool mandatoryFixing=true) |
void | addZeroInflationFixingDate (const ZeroInflationFixingEntry &fixingEntry) |
void | addYoYInflationFixingDate (const QuantLib::Date &fixingDate, const std::string &indexName, const bool indexInterpolated, const Frequency indexFrequency, const Period &indexAvailabilityLag, const QuantLib::Date &payDate=Date::maxDate(), const bool alwaysAddIfPaysOnSettlement=false, const bool mandatoryFixing=true) |
void | addYoYInflationFixingDate (const InflationFixingEntry &fixingEntry) |
void | clear () |
void | addData (const RequiredFixings &requiredFixings) |
void | unsetPayDates () |
RequiredFixings | makeCopyWithMandatoryOverride (bool mandatory) |
RequiredFixings | filteredFixingDates (const QuantLib::Date &settlementDate=QuantLib::Date()) |
Private Attributes | |
std::set< FixingEntry > | fixingDates_ |
std::set< ZeroInflationFixingEntry > | zeroInflationFixingDates_ |
std::set< InflationFixingEntry > | yoyInflationFixingDates_ |
Friends | |
std::ostream & | operator<< (std::ostream &, const RequiredFixings &) |
Class holding the information on the fixings required to price a trade (or a portfolio of trades).
Definition at line 81 of file fixingdates.hpp.
std::map< std::string, RequiredFixings::FixingDates > fixingDatesIndices | ( | const QuantLib::Date & | settlementDate = QuantLib::Date() | ) | const |
Gives back the dates for which fixings will be required to price the trade assuming a given settlementDate
. If the settlementDate
is not provided or is set equal to QuantLib::Date()
, the settlement date in the implementation is assumed to be the Settings::instance()
.evaluationDate().
If a cashflow payment is deemed to have already occurred relative to the settlement date, then no fixing is needed. The determination of whether a cashflow has or has not occurred will in general rely on a call to CashFlow::hasOccurred
which is important in cases where the cash flow payment date falls on the settlement date.
Another important case is where a cash flow fixing date occurs on the settlement date. In this case, we should always add the fixing date to the set of fixing dates regardless of Settings::instance()
.enforcesTodaysHistoricFixings().
Definition at line 290 of file fixingdates.cpp.
void addFixingDate | ( | const QuantLib::Date & | fixingDate, |
const std::string & | indexName, | ||
const QuantLib::Date & | payDate = Date::maxDate() , |
||
const bool | alwaysAddIfPaysOnSettlement = false , |
||
const bool | mandatoryFixing = true |
||
) |
Adds a single fixing date fixingDate
for an index given by its ORE index name indexName
arising from a coupon with payment date payDate
. If alwaysAddIfPaysOnSettlement
is true the fixing date will be added if the coupon pays on the settlement date even if the cashflow returns hasOccured(settlementDate) as true. This is conservative and necessary in some cases since some pricing engines in QL (e.g. CapFloor) do not respect hasOccured() and ask for the fixing regardless. If the payDate is not given, it defaults to Date::maxDate() meaning that the added fixing is relevant unconditional on a pay date
Definition at line 364 of file fixingdates.cpp.
void addFixingDate | ( | const FixingEntry & | fixingEntry | ) |
Definition at line 371 of file fixingdates.cpp.
void addFixingDates | ( | const std::vector< std::pair< QuantLib::Date, bool > > & | fixingDates, |
const std::string & | indexName, | ||
const QuantLib::Date & | payDate = Date::maxDate() , |
||
const bool | alwaysAddIfPaysOnSettlement = false |
||
) |
adds a vector of fixings dates fixingDates
and mandatory flags for an index given by is ORE index name indexName
arising from a coupon with payment date payDate
Definition at line 373 of file fixingdates.cpp.
void addFixingDates | ( | const std::vector< QuantLib::Date > & | fixingDates, |
const std::string & | indexName, | ||
const QuantLib::Date & | payDate = Date::maxDate() , |
||
const bool | alwaysAddIfPaysOnSettlement = false , |
||
const bool | mandatory = true |
||
) |
adds a vector of fixings dates fixingDates
for an index given by is ORE index name indexName
arising from a coupon with payment date payDate
Definition at line 381 of file fixingdates.cpp.
void addZeroInflationFixingDate | ( | const QuantLib::Date & | fixingDate, |
const std::string & | indexName, | ||
const bool | indexInterpolated, | ||
const Frequency | indexFrequency, | ||
const Period & | indexAvailabilityLag, | ||
const CPI::InterpolationType | coupopnInterpolation, | ||
const Frequency | couponFrequency, | ||
const QuantLib::Date & | payDate = Date::maxDate() , |
||
const bool | alwaysAddIfPaysOnSettlement = false , |
||
const bool | mandatoryFixing = true |
||
) |
add a single fixing date fixingDate
for a coupon based on a zero inflation index given by its ORE index name indexName
with payment date payDate
Definition at line 389 of file fixingdates.cpp.
void addZeroInflationFixingDate | ( | const ZeroInflationFixingEntry & | fixingEntry | ) |
Definition at line 409 of file fixingdates.cpp.
void addYoYInflationFixingDate | ( | const QuantLib::Date & | fixingDate, |
const std::string & | indexName, | ||
const bool | indexInterpolated, | ||
const Frequency | indexFrequency, | ||
const Period & | indexAvailabilityLag, | ||
const QuantLib::Date & | payDate = Date::maxDate() , |
||
const bool | alwaysAddIfPaysOnSettlement = false , |
||
const bool | mandatoryFixing = true |
||
) |
add a single fixing date fixingDate
for a coupon based on a yoy inflation index given by its ORE index name indexName
with payment date payDate
Definition at line 413 of file fixingdates.cpp.
void addYoYInflationFixingDate | ( | const InflationFixingEntry & | fixingEntry | ) |
Definition at line 429 of file fixingdates.cpp.
void clear | ( | ) |
clear all data
Definition at line 172 of file fixingdates.cpp.
void addData | ( | const RequiredFixings & | requiredFixings | ) |
add data from another RequiredFixings instance
Definition at line 178 of file fixingdates.cpp.
void unsetPayDates | ( | ) |
Set all pay dates to Date::maxDate(), fixingDatesIndices() will then not filter the required fixings by the given settlement date any more. Needed by total return swaps on bonds for example, where a cashflow in a bond with past payment date can still be relevant for the payment of the current return period.
Definition at line 186 of file fixingdates.cpp.
RequiredFixings makeCopyWithMandatoryOverride | ( | bool | mandatory | ) |
Create a copy and set mandatory flag to mandatory for all fixing entries
Definition at line 211 of file fixingdates.cpp.
RequiredFixings filteredFixingDates | ( | const QuantLib::Date & | settlementDate = QuantLib::Date() | ) |
Definition at line 235 of file fixingdates.cpp.
|
friend |
allow output of required fixings data via streams
Definition at line 467 of file fixingdates.cpp.
|
private |
Definition at line 241 of file fixingdates.hpp.
|
private |
Definition at line 243 of file fixingdates.hpp.
|
private |
Definition at line 245 of file fixingdates.hpp.