Re: ChangingSettings::instance().evaluationDate() and impact on Instruments.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: ChangingSettings::instance().evaluationDate() and impact on Instruments.

Lluis Pujol Bajador

Thanks Luigi your suggestions works perfect.

Lluis


On Wed 24/11/10 15:58 , Luigi Ballabio <[hidden email]> wrote:

On Wed, 2010-11-24 at 14:35 +0100, Lluis Pujol Bajador wrote:
> I need to estimate the value of a portfolio of existing swaps
> in future dates. For example the value in 1 YR, 2YR, .....20YR time.
> At this moment I don't care about the implied curve for 1YR, 2YR,
> etc... I am happy to use existing curve and just change the evaluation
> date.
>
> I though that If I setup the current portfolio of Swaps I would only
> need to change Settings::instance().evaluationDate() and get the new
> PV for each swap. But I findout that I still get the PV of cash flows
> that have already matured. (¿?).

Your problem is the creation of the discount curve:

> I've previously created a deposwapcurve with depoSwapCurve =
> PiecewiseLogLinearDiscount( ValueDate, helpers, ActualActual())

If you create it with an explicit ValueDate, that date will remain the
date to which the cash flows are discounted. If you create the curve
with a number of business days (probably 0) and a calendar instead, the
reference date of the discount curve will move with the evaluation date
and the cashflows will be filtered accordingly.

See chapter 3 at <http://sites.google.com/site/luigiballabio/qlbook> for
more details.

Luigi



--

An ideal world is left as an exercise to the reader.
-- Paul Graham




------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users