38#ifndef quantext_fxindex_hpp
39#define quantext_fxindex_hpp
41#include <ql/currency.hpp>
42#include <ql/exchangerate.hpp>
43#include <ql/handle.hpp>
44#include <ql/termstructures/yieldtermstructure.hpp>
45#include <ql/time/calendar.hpp>
54 FxRateQuote(Handle<Quote> spotQuote,
const Handle<YieldTermStructure>& sourceYts,
55 const Handle<YieldTermStructure>& targetYts, Natural fixingDays,
const Calendar& fixingCalendar);
58 Real
value()
const override;
74 FxSpotQuote(Handle<Quote> todaysQuote,
const Handle<YieldTermStructure>& sourceYts,
75 const Handle<YieldTermStructure>& targetYts, Natural fixingDays,
const Calendar& fixingCalendar);
78 Real
value()
const override;
104 const Calendar&
fixingCalendar,
const Handle<YieldTermStructure>& sourceYts = Handle<YieldTermStructure>(),
105 const Handle<YieldTermStructure>& targetYts = Handle<YieldTermStructure>(),
106 bool fixingTriangulation =
false);
109 const Handle<YieldTermStructure>& sourceYts = Handle<YieldTermStructure>(),
110 const Handle<YieldTermStructure>& targetYts = Handle<YieldTermStructure>(),
111 bool fixingTriangulation =
true);
114 std::string
name()
const override;
117 Real
fixing(
const Date&
fixingDate,
bool forecastTodaysFixing =
false)
const override;
135 const Handle<Quote>
fxQuote(
bool withSettlementLag =
false)
const;
143 virtual Real
forecastFixing(
const Time& fixingTime)
const override;
149 QuantLib::ext::shared_ptr<FxIndex>
clone(
const Handle<Quote>
fxQuote = Handle<Quote>(),
150 const Handle<YieldTermStructure>& sourceYts = Handle<YieldTermStructure>(),
151 const Handle<YieldTermStructure>& targetYts = Handle<YieldTermStructure>(),
152 const std::string&
familyName = std::string());
const Handle< Quote > fxQuote(bool withSettlementLag=false) const
fxQuote returns instantaneous Quote by default, otherwise settlement after fixingDays
const bool useQuote() const
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
virtual Real forecastFixing(const Time &fixingTime) const override
It can be overridden to implement particular conventions.
Natural fixingDays() const
const Currency & sourceCurrency() const
Calendar fixingCalendar() const override
const Handle< Quote > fxSpot_
const Handle< YieldTermStructure > & sourceCurve() const
bool fixingTriangulation_
const Handle< YieldTermStructure > & targetCurve() const
std::string oreName() const
const Handle< YieldTermStructure > targetYts_
std::string name() const override
virtual Date valueDate(const Date &fixingDate) const
bool isValidFixingDate(const Date &fixingDate) const override
const Currency & targetCurrency() const
const Handle< YieldTermStructure > sourceYts_
Real pastFixing(const Date &fixingDate) const override
returns a past fixing at the given date
Date fixingDate(const Date &valueDate) const
std::string familyName() const
Real fixing(const Date &fixingDate, bool forecastTodaysFixing=false) const override
const Handle< Quote > spotQuote_
const Handle< YieldTermStructure > targetYts_
const Handle< YieldTermStructure > sourceYts_
Real value() const override
bool isValid() const override
const Handle< YieldTermStructure > targetYts_
const Handle< Quote > todaysQuote_
const Handle< YieldTermStructure > sourceYts_
Real value() const override
bool isValid() const override
A common base class for the FX and Equity Indices. Provides a forecast fixing method for time so the ...