Re: Evaluation date

Posted by Ferdinando M. Ametrano-3 on
URL: http://quantlib.414.s1.nabble.com/Evaluation-date-tp3284p3285.html

Hi Luigi

>I'd create some kind of singleton Settings class through which
>the global evaluation date can be set and retrieved, as in
>
>Settings::instance().evaluationDate() = Date(30,August,2004);
>Date d = Settings::instance().evaluationDate()
>
>The stored date would be used whenever one needs to know what day it's
>supposed to be, and the actual today's date would be returned if none
>was set.
I agree.

>  (As a side effect, todaysDate() would eventually disappear
>from TermStructure.)
this side effect alone could force me to agree :)

I wonder about different approaches used by good derivatives
system/library. Does anyone want to share their experience?

ciao -- Nando