Logo
Reference manual - version qle_version
Public Member Functions | List of all members
EquityIndex2 Class Reference

Equity Index. More...

#include <qle/indexes/equityindex.hpp>

+ Inheritance diagram for EquityIndex2:

Public Member Functions

 EquityIndex2 (const std::string &familyName, const Calendar &fixingCalendar, const Currency &currency, const Handle< Quote > spotQuote=Handle< Quote >(), const Handle< YieldTermStructure > &rate=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &dividend=Handle< YieldTermStructure >())
 
Index interface
std::string name () const override
 
Currency currency () const
 
Calendar fixingCalendar () const override
 
bool isValidFixingDate (const Date &fixingDate) const override
 
Real fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const override
 
Real fixing (const Date &fixingDate, bool forecastTodaysFixing, bool incDividend) const
 
virtual void addDividend (const Dividend &fixing, bool forceOverwrite=false)
 stores the historical dividend at the given date More...
 
virtual const std::set< Dividend > & dividendFixings () const
 
Real dividendsBetweenDates (const Date &startDate, const Date &endDate) const
 
Observer interface
void update () override
 
Inspectors
std::string familyName () const
 
const Handle< Quote > & equitySpot () const
 
const Handle< YieldTermStructure > & equityForecastCurve () const
 
const Handle< YieldTermStructure > & equityDividendCurve () const
 
Fixing calculations
virtual Real forecastFixing (const Date &fixingDate) const
 
virtual Real forecastFixing (const Time &fixingTime) const override
 returns the fixing at the given time
 
virtual Real forecastFixing (const Date &fixingDate, bool incDividend) const
 
virtual Real forecastFixing (const Time &fixingTime, bool incDividend) const
 
virtual Real pastFixing (const Date &fixingDate) const override
 returns a past fixing at the given date More...
 

Additional methods

std::string familyName_
 
Currency currency_
 
const Handle< YieldTermStructure > rate_
 
const Handle< YieldTermStructure > dividend_
 
std::string name_
 
const Handle< Quote > spotQuote_
 
virtual boost::shared_ptr< EquityIndex2clone (const Handle< Quote > spotQuote, const Handle< YieldTermStructure > &rate, const Handle< YieldTermStructure > &dividend) const
 

Detailed Description

Equity Index.

Renamed to EquityIndex2, because Quantlib has introduced an EquityIndex class in v1.30 which causes name conflicts in the compilation of the joint SWIG wrapper across QuantLib and QuantExt.

Constructor & Destructor Documentation

◆ EquityIndex2()

EquityIndex2 ( const std::string &  familyName,
const Calendar &  fixingCalendar,
const Currency &  currency,
const Handle< Quote >  spotQuote = Handle< Quote >(),
const Handle< YieldTermStructure > &  rate = Handle< YieldTermStructure >(),
const Handle< YieldTermStructure > &  dividend = Handle< YieldTermStructure >() 
)

spot quote is interpreted as of today

Member Function Documentation

◆ addDividend()

virtual void addDividend ( const Dividend fixing,
bool  forceOverwrite = false 
)
virtual

stores the historical dividend at the given date

the date passed as arguments must be the actual calendar date of the dividend.

Reimplemented in CompoEquityIndex.

◆ pastFixing()

Real pastFixing ( const Date &  fixingDate) const
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.

Reimplemented in CompoEquityIndex.