Login  Register

Re: Date

Posted by Luigi Ballabio-4 on Feb 08, 2002; 3:48am
URL: http://quantlib.414.s1.nabble.com/Date-tp1865p1866.html

Hi Ben and everybody,

At 10:46 AM 2/8/02 +0000, Ben wrote:
>Im currently working on a bond class, which I'll mail to this list when
>completed.  I was wondering what is the best way to deal with dates.  At
>any given time, the current date matters (for instance with regards to
>calculating NPV.)

Great!
If I get your meaning, the current date (i.e., the one the "present" in NPV
refer to) is available from the discount curve as
TermStructure::todaysDate(). You can have a look at
QuantLib::Instruments::Swap to see how the discounting is done.

>Im also working on a seperate 'engine' for DV01 hedging, mainly as an
>educational exercise, but i was wondering if this was something which
>could perhaps be included?

Nando?

Bye,
         Luigi