24#ifndef quantext_equityindex_hpp
25#define quantext_equityindex_hpp
27#include <ql/currency.hpp>
28#include <ql/handle.hpp>
29#include <ql/termstructures/yieldtermstructure.hpp>
30#include <ql/time/calendar.hpp>
31#include <ql/currency.hpp>
48 const Handle<Quote> spotQuote = Handle<Quote>(),
49 const Handle<YieldTermStructure>& rate = Handle<YieldTermStructure>(),
50 const Handle<YieldTermStructure>& dividend = Handle<YieldTermStructure>());
53 std::string
name()
const override;
59 Real
fixing(
const Date& fixingDate,
bool forecastTodaysFixing =
false)
const override;
60 Real
fixing(
const Date& fixingDate,
bool forecastTodaysFixing,
bool incDividend)
const;
67 virtual const std::set<Dividend>&
dividendFixings()
const {
return DividendManager::instance().getHistory(
name()); }
84 virtual Real
forecastFixing(
const Time& fixingTime)
const override;
85 virtual Real
forecastFixing(
const Date& fixingDate,
bool incDividend)
const;
86 virtual Real
forecastFixing(
const Time& fixingTime,
bool incDividend)
const;
87 virtual Real
pastFixing(
const Date& fixingDate)
const override;
91 virtual QuantLib::ext::shared_ptr<EquityIndex2>
clone(
const Handle<Quote> spotQuote,
const Handle<YieldTermStructure>& rate,
92 const Handle<YieldTermStructure>& dividend)
const;
116 QL_REQUIRE(
isValidFixingDate(fixingDate), fixingDate <<
" is not a valid fixing date");
117 return timeSeries()[fixingDate];
const Handle< YieldTermStructure > rate_
const Handle< Quote > & equitySpot() const
const Handle< YieldTermStructure > dividend_
virtual const std::set< Dividend > & dividendFixings() const
virtual QuantLib::ext::shared_ptr< EquityIndex2 > clone(const Handle< Quote > spotQuote, const Handle< YieldTermStructure > &rate, const Handle< YieldTermStructure > ÷nd) const
Calendar fixingCalendar() const override
virtual void addDividend(const Dividend &fixing, bool forceOverwrite=false)
stores the historical dividend at the given date
virtual Real forecastFixing(const Date &fixingDate) const
const Handle< Quote > spotQuote_
std::string name() const override
const Handle< YieldTermStructure > & equityDividendCurve() const
bool isValidFixingDate(const Date &fixingDate) const override
Currency currency() const
const Handle< YieldTermStructure > & equityForecastCurve() const
virtual Real pastFixing(const Date &fixingDate) const override
returns a past fixing at the given date
Real dividendsBetweenDates(const Date &startDate, const Date &endDate) const
std::string familyName() const
Real fixing(const Date &fixingDate, bool forecastTodaysFixing=false) const override
A common base class for the FX and Equity Indices. Provides a forecast fixing method for time so the ...