There are three ways in which a term structure can keep
track of its reference date. The first is that such date
is fixed; the second is that it is determined by advancing
the current date of a given number of business days; and
the third is that it is based on the reference date of
some other structure.
In the first case, the constructor taking a date is to be
used; the default implementation of referenceDate() will
then return such date. In the second case, the constructor
taking a number of days and a calendar is to be used;
referenceDate() will return a date calculated based on the
current evaluation date, and the term structure and its
observers will be notified when the evaluation date
changes. In the last case, the referenceDate() method must
be overridden in derived classes so that it fetches and
return the appropriate date.
Basic term-structure functionality
There are three ways in which a term structure can keep track of its reference date. The first is that such date is fixed; the second is that it is determined by advancing the current date of a given number of business days; and the third is that it is based on the reference date of some other structure.
In the first case, the constructor taking a date is to be used; the default implementation of
referenceDate()
will then return such date. In the second case, the constructor taking a number of days and a calendar is to be used;referenceDate()
will return a date calculated based on the current evaluation date, and the term structure and its observers will be notified when the evaluation date changes. In the last case, the referenceDate() method must be overridden in derived classes so that it fetches and return the appropriate date.