#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 | |
const bool | useQuote () const |
Date calculations | |
virtual Date | valueDate (const Date &fixingDate) const |
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_ |
virtual Real | forecastFixing (const Time &fixingTime) const override |
It can be overridden to implement particular conventions. | |
virtual Real | forecastFixing (const Date &fixingDate) const |
Real | pastFixing (const Date &fixingDate) const override |
returns a past fixing at the given date More... | |
boost::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 | |
FX Index.
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
|
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.