FX Index. More...
#include <qle/indexes/fxindex.hpp>
Public Member Functions | |
FxIndex (const std::string &familyName, Natural fixingDays, const Currency &source, const Currency &target, const Calendar &fixingCalendar, const Handle< YieldTermStructure > &sourceYts=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &targetYts=Handle< YieldTermStructure >(), bool fixingTriangulation=false) | |
FxIndex (const std::string &familyName, Natural fixingDays, const Currency &source, const Currency &target, const Calendar &fixingCalendar, const Handle< Quote > fxSpot, const Handle< YieldTermStructure > &sourceYts=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &targetYts=Handle< YieldTermStructure >(), bool fixingTriangulation=true) | |
Index interface | |
std::string | name () const override |
Calendar | fixingCalendar () const override |
bool | isValidFixingDate (const Date &fixingDate) const override |
Real | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const override |
Observer interface | |
void | update () override |
Inspectors | |
std::string | familyName () const |
std::string | oreName () const |
Natural | fixingDays () const |
Date | fixingDate (const Date &valueDate) const |
const Currency & | sourceCurrency () const |
const Currency & | targetCurrency () const |
const Handle< YieldTermStructure > & | sourceCurve () const |
const Handle< YieldTermStructure > & | targetCurve () const |
const Handle< Quote > | fxQuote (bool withSettlementLag=false) const |
fxQuote returns instantaneous Quote by default, otherwise settlement after fixingDays More... | |
const bool | useQuote () const |
Date calculations | |
virtual Date | valueDate (const Date &fixingDate) const |
Public Member Functions inherited from EqFxIndexBase | |
virtual | ~EqFxIndexBase () |
virtual Real | forecastFixing (const Time &fixingTime) const =0 |
returns the fixing at the given time More... | |
virtual Real | pastFixing (const Date &fixingDate) const =0 |
returns a past fixing at the given date More... | |
Fixing calculations | |
std::string | familyName_ |
std::string | oreName_ |
Natural | fixingDays_ |
Currency | sourceCurrency_ |
Currency | targetCurrency_ |
const Handle< YieldTermStructure > | sourceYts_ |
const Handle< YieldTermStructure > | targetYts_ |
std::string | name_ |
const Handle< Quote > | fxSpot_ |
Handle< Quote > | fxRate_ |
bool | useQuote_ |
Calendar | fixingCalendar_ |
bool | fixingTriangulation_ |
virtual Real | forecastFixing (const Time &fixingTime) const override |
It can be overridden to implement particular conventions. More... | |
virtual Real | forecastFixing (const Date &fixingDate) const |
Real | pastFixing (const Date &fixingDate) const override |
returns a past fixing at the given date More... | |
QuantLib::ext::shared_ptr< FxIndex > | clone (const Handle< Quote > fxQuote=Handle< Quote >(), const Handle< YieldTermStructure > &sourceYts=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &targetYts=Handle< YieldTermStructure >(), const std::string &familyName=std::string()) |
clone the index, the clone will be linked to the provided handles More... | |
void | initialise () |
FX Index.
Definition at line 94 of file fxindex.hpp.
FxIndex | ( | const std::string & | familyName, |
Natural | fixingDays, | ||
const Currency & | source, | ||
const Currency & | target, | ||
const Calendar & | fixingCalendar, | ||
const Handle< YieldTermStructure > & | sourceYts = Handle<YieldTermStructure>() , |
||
const Handle< YieldTermStructure > & | targetYts = Handle<YieldTermStructure>() , |
||
bool | fixingTriangulation = false |
||
) |
familyName may be e.g. ECB fixingDays determine the spot date of the currency pair source is the asset or foreign currency target is the numeraire or domestic currency fixingCalendar is the calendar defining good days for the pair this class uses the exchange rate manager to retrieve spot values fxSpot is the fx rate settled at today + fixingDays
Definition at line 101 of file fxindex.cpp.
FxIndex | ( | const std::string & | familyName, |
Natural | fixingDays, | ||
const Currency & | source, | ||
const Currency & | target, | ||
const Calendar & | fixingCalendar, | ||
const Handle< Quote > | fxSpot, | ||
const Handle< YieldTermStructure > & | sourceYts = Handle<YieldTermStructure>() , |
||
const Handle< YieldTermStructure > & | targetYts = Handle<YieldTermStructure>() , |
||
bool | fixingTriangulation = true |
||
) |
Definition at line 111 of file fxindex.cpp.
|
override |
|
override |
|
override |
Definition at line 271 of file fxindex.cpp.
|
override |
Definition at line 158 of file fxindex.cpp.
|
override |
Definition at line 273 of file fxindex.cpp.
std::string familyName | ( | ) | const |
std::string oreName | ( | ) | const |
Definition at line 126 of file fxindex.hpp.
Natural fixingDays | ( | ) | const |
Definition at line 127 of file fxindex.hpp.
Date fixingDate | ( | const Date & | valueDate | ) | const |
Definition at line 278 of file fxindex.cpp.
const Currency & sourceCurrency | ( | ) | const |
Definition at line 129 of file fxindex.hpp.
const Currency & targetCurrency | ( | ) | const |
Definition at line 130 of file fxindex.hpp.
const Handle< YieldTermStructure > & sourceCurve | ( | ) | const |
Definition at line 131 of file fxindex.hpp.
const Handle< YieldTermStructure > & targetCurve | ( | ) | const |
Definition at line 132 of file fxindex.hpp.
const Handle< Quote > fxQuote | ( | bool | withSettlementLag = false | ) | const |
fxQuote returns instantaneous Quote by default, otherwise settlement after fixingDays
Definition at line 135 of file fxindex.cpp.
const bool useQuote | ( | ) | const |
Definition at line 136 of file fxindex.hpp.
|
virtual |
Definition at line 283 of file fxindex.cpp.
|
overridevirtual |
It can be overridden to implement particular conventions.
Implements EqFxIndexBase.
Definition at line 190 of file fxindex.cpp.
|
virtual |
Definition at line 224 of file fxindex.cpp.
|
overridevirtual |
returns a past fixing at the given date
the date passed as arguments must be the actual calendar date of the fixing; no settlement days must be used.
Implements EqFxIndexBase.
Definition at line 290 of file fxindex.cpp.
QuantLib::ext::shared_ptr< FxIndex > clone | ( | const Handle< Quote > | fxQuote = Handle<Quote>() , |
const Handle< YieldTermStructure > & | sourceYts = Handle<YieldTermStructure>() , |
||
const Handle< YieldTermStructure > & | targetYts = Handle<YieldTermStructure>() , |
||
const std::string & | familyName = std::string() |
||
) |
clone the index, the clone will be linked to the provided handles
Definition at line 257 of file fxindex.cpp.
|
private |
Definition at line 122 of file fxindex.cpp.
|
protected |
Definition at line 155 of file fxindex.hpp.
|
protected |
Definition at line 155 of file fxindex.hpp.
|
protected |
Definition at line 156 of file fxindex.hpp.
|
protected |
Definition at line 157 of file fxindex.hpp.
|
protected |
Definition at line 157 of file fxindex.hpp.
|
protected |
Definition at line 158 of file fxindex.hpp.
|
protected |
Definition at line 158 of file fxindex.hpp.
|
protected |
Definition at line 159 of file fxindex.hpp.
|
protected |
Definition at line 161 of file fxindex.hpp.
|
mutableprotected |
Definition at line 163 of file fxindex.hpp.
|
protected |
Definition at line 164 of file fxindex.hpp.
|
private |
Definition at line 167 of file fxindex.hpp.
|
private |
Definition at line 168 of file fxindex.hpp.