QuantLib_Settings man page

Settings — global repository for run-time library settings  


#include <ql/settings.hpp>

Inherits Singleton< Settings >.

Public Member Functions

DateProxy & evaluationDate ()
the date at which pricing is to be performed.
const DateProxy & evaluationDate () const
void anchorEvaluationDate ()
void resetEvaluationDate ()
bool & includeReferenceDateEvents ()
bool includeReferenceDateEvents () const
boost::optional< bool > & includeTodaysCashFlows ()
boost::optional< bool > includeTodaysCashFlows () const
bool & enforcesTodaysHistoricFixings ()
bool enforcesTodaysHistoricFixings () const


class Singleton< Settings >
std::ostream & operator<< (std::ostream &, const DateProxy &)

Additional Inherited Members

Detailed Description

global repository for run-time library settings

Member Function Documentation

Settings::DateProxy & evaluationDate ()

the date at which pricing is to be performed. Client code can inspect the evaluation date, as in:

Date d = Settings::instance().evaluationDate();

where today's date is returned if the evaluation date is set to the null date (its default value;) can set it to a new value, as in:

Settings::instance().evaluationDate() = d;

and can register with it, as in:


to be notified when it is set to a new value.


a notification is not sent when the evaluation date changes for natural causes---i.e., a date was not explicitly set (which results in today's date being used for pricing) and the current date changes as the clock strikes midnight.

Examples: BermudanSwaption.cpp, Bonds.cpp, ConvertibleBonds.cpp, EquityOption.cpp, Replication.cpp, and swapvaluation.cpp.

void anchorEvaluationDate ()

Call this to prevent the evaluation date to change at midnight (and, incidentally, to gain quite a bit of performance.) If no evaluation date was previously set, it is equivalent to setting the evaluation date to Date::todaysDate(); if an evaluation date other than Date() was already set, it has no effect.

void resetEvaluationDate ()

Call this to reset the evaluation date to Date::todaysDate() and allow it to change at midnight. It is equivalent to setting the evaluation date to Date(). This comes at the price of losing some performance, since the evaluation date is re-evaluated each time it is read.

bool & includeReferenceDateEvents ()

This flag specifies whether or not Events occurring on the reference date should, by default, be taken into account as not happened yet. It can be overridden locally when calling the Event::hasOccurred method.

boost::optional< bool > & includeTodaysCashFlows ()

If set, this flag specifies whether or not CashFlows occurring on today's date should enter the NPV. When the NPV date (i.e., the date at which the cash flows are discounted) equals today's date, this flag overrides the behavior chosen for includeReferenceDate. It cannot be overridden locally when calling the CashFlow::hasOccurred method.


Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

The man pages anchorEvaluationDate(3), enforcesTodaysHistoricFixings(3), evaluationDate(3), includeReferenceDateEvents(3), includeTodaysCashFlows(3) and resetEvaluationDate(3) are aliases of QuantLib_Settings(3).

Mon Apr 30 2018 Version 1.12.1 QuantLib