QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
#include <custom.hpp>
Public Member Functions | |
CustomIborIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency ¤cy, const Calendar &fixingCalendar, const Calendar &valueCalendar, const Calendar &maturityCalendar, BusinessDayConvention convention, bool endOfMonth, const DayCounter &dayCounter, const Handle< YieldTermStructure > &h={}) | |
InterestRateIndex interface | |
Date | fixingDate (const Date &valueDate) const override |
Date | valueDate (const Date &fixingDate) const override |
Date | maturityDate (const Date &valueDate) const override |
IborIndex interface | |
ext::shared_ptr< IborIndex > | clone (const Handle< YieldTermStructure > &h) const override |
returns a copy of itself linked to a different forwarding curve More... | |
![]() | |
IborIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency ¤cy, const Calendar &fixingCalendar, BusinessDayConvention convention, bool endOfMonth, const DayCounter &dayCounter, Handle< YieldTermStructure > h={}) | |
Date | maturityDate (const Date &valueDate) const override |
Rate | forecastFixing (const Date &fixingDate) const override |
It can be overridden to implement particular conventions. More... | |
BusinessDayConvention | businessDayConvention () const |
bool | endOfMonth () const |
Handle< YieldTermStructure > | forwardingTermStructure () const |
the curve used to forecast fixings More... | |
![]() | |
InterestRateIndex (std::string familyName, const Period &tenor, Natural settlementDays, Currency currency, Calendar fixingCalendar, DayCounter dayCounter) | |
std::string | name () const override |
Returns the name of the index. More... | |
Calendar | fixingCalendar () const override |
returns the calendar defining valid fixing dates More... | |
bool | isValidFixingDate (const Date &fixingDate) const override |
returns TRUE if the fixing date is a valid one More... | |
Rate | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const override |
returns the fixing at the given date More... | |
std::string | familyName () const |
Period | tenor () const |
Natural | fixingDays () const |
const Currency & | currency () const |
const DayCounter & | dayCounter () const |
![]() | |
~Index () override=default | |
virtual std::string | name () const =0 |
Returns the name of the index. More... | |
virtual Calendar | fixingCalendar () const =0 |
returns the calendar defining valid fixing dates More... | |
virtual bool | isValidFixingDate (const Date &fixingDate) const =0 |
returns TRUE if the fixing date is a valid one More... | |
bool | hasHistoricalFixing (const Date &fixingDate) const |
returns whether a historical fixing was stored for the given date More... | |
virtual Real | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const =0 |
returns the fixing at the given date More... | |
virtual Real | pastFixing (const Date &fixingDate) const |
returns a past fixing at the given date More... | |
const TimeSeries< Real > & | timeSeries () const |
returns the fixing TimeSeries More... | |
virtual bool | allowsNativeFixings () |
check if index allows for native fixings. More... | |
void | update () override |
virtual void | addFixing (const Date &fixingDate, Real fixing, bool forceOverwrite=false) |
void | addFixings (const TimeSeries< Real > &t, bool forceOverwrite=false) |
stores historical fixings from a TimeSeries More... | |
template<class DateIterator , class ValueIterator > | |
void | addFixings (DateIterator dBegin, DateIterator dEnd, ValueIterator vBegin, bool forceOverwrite=false) |
stores historical fixings at the given dates More... | |
void | clearFixings () |
clears all stored historical fixings More... | |
![]() | |
Observable ()=default | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
![]() | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | update ()=0 |
virtual void | deepUpdate () |
Other inspectors | |
Calendar | valueCalendar_ |
Calendar | maturityCalendar_ |
Calendar | valueCalendar () const |
Calendar | maturityCalendar () const |
Additional Inherited Members | |
![]() | |
typedef set_type::iterator | iterator |
![]() | |
ext::shared_ptr< Observable > | notifier () const |
![]() | |
BusinessDayConvention | convention_ |
Handle< YieldTermStructure > | termStructure_ |
bool | endOfMonth_ |
![]() | |
std::string | familyName_ |
Period | tenor_ |
Natural | fixingDays_ |
Currency | currency_ |
DayCounter | dayCounter_ |
std::string | name_ |
LIBOR-like index that allows specifying custom calendars for value and maturity dates calculations:
valueDate() advances on the valueCalendar and adjusts on the maturityCalendar.
maturityDate() advances on the maturityCalendar.
fixingDate() goes back on the valueCalendar.
Typical LIBOR indexes use:
fixingCalendar = valueCalendar = UK, maturityCalendar = JoinHolidays(UK, CurrencyCalendar) for non-EUR currencies.
fixingCalendar = JoinHolidays(UK, TARGET), valueCalendar = maturityCalendar = TARGET for EUR.
Definition at line 28 of file custom.hpp.
CustomIborIndex | ( | const std::string & | familyName, |
const Period & | tenor, | ||
Natural | settlementDays, | ||
const Currency & | currency, | ||
const Calendar & | fixingCalendar, | ||
const Calendar & | valueCalendar, | ||
const Calendar & | maturityCalendar, | ||
BusinessDayConvention | convention, | ||
bool | endOfMonth, | ||
const DayCounter & | dayCounter, | ||
const Handle< YieldTermStructure > & | h = {} |
||
) |
Definition at line 7 of file custom.cpp.
Reimplemented from InterestRateIndex.
Definition at line 22 of file custom.cpp.
Reimplemented from InterestRateIndex.
Definition at line 28 of file custom.cpp.
Implements InterestRateIndex.
Definition at line 37 of file custom.cpp.
|
overridevirtual |
returns a copy of itself linked to a different forwarding curve
Reimplemented from IborIndex.
Definition at line 42 of file custom.cpp.
Calendar valueCalendar | ( | ) | const |
Definition at line 53 of file custom.hpp.
Calendar maturityCalendar | ( | ) | const |
Definition at line 54 of file custom.hpp.
|
private |
Definition at line 57 of file custom.hpp.
|
private |
Definition at line 58 of file custom.hpp.