Posted by
Toyin Akin on
URL: http://quantlib.414.s1.nabble.com/ObjectHandler-and-evaluationDate-tp3963p3965.html
Hi,
Thus if you have 2 YieldCurve objects (or more) within an Excel spreadsheet
with 2 different referenceDate (assuming the referenceDates controls the
evaluation date and not the dates in which the stripping tenors will
reference themselves from), you don't actually know what date is actually
set last. You don't really know what is the true global evaluationDate()
You could fix this by F2-ing every cell yourself leading from the YieldCurve
call upto your function call, instead of a sheet recalculation, but that is
pretty tedious.
Thus the final evaluation date will all be dependant on Excel's calculation
order, which may be different based on how you construct your
spreadsheet...!!!
I wouldn't like to quote a 10 million notional swap price from such a system
mate!!
In your opinion, is the reference date passed in to the YieldCurve functions
the new evaluation date
or the date that the YieldCurve instruments reference themselves from?
I think the latter, which would mean you don't need the call the
setEvaluationDate() function, but them again, I haven't looked too closely
at the implementation.
Thanks for the reply, but it looks like you can only build, in any one Excel
session, no matter how many spreadsheets you open, or construct, you can
only have ONE yieldCurve object floating around to ensure that the eval date
is valid (and that you know is valid).
Best Regards,
Toy out.
>From: Plamen Neykov <
[hidden email]>
>To:
[hidden email]
>CC: "Toyin Akin" <
[hidden email]>
>Subject: Re: [Quantlib-users] ObjectHandler and evaluationDate()
>Date: Tue, 2 Aug 2005 19:28:45 +0200
>
>Hi Toyin,
>
>the excel wrapper of the YC object calls
>QuantLib::Settings::instance().setEvaluationDate(evaluationDate); before
>constructing the YC object (e.g. it is set globally for the whole
>library ....) Not quite fool-proof (you have to be carefull if you have
>multiple YC objects in your spreadsheet)
>
>hope this helps
>
>cheers,
>Plamen
>
>On Tuesday 02 August 2005 19:11, Toyin Akin wrote:
> > Hi,
> >
> > How does the Excel implementation of QuantLib+ObjectHandler handle
> > constructing YieldCurves with a referenceDate forward from Today?
> >
> > Let's say that the Yieldcurve object is constructed with a
>referenceDate, 3
> > months from today.
> > This date will be stored within the YieldCurve object.
> >
> > If you then construct a swap object and then wish to price this, because
> > the code would access the evaluation date from evaluationDate() and not
>the
> > date passed in to the YieldCurve you would get a mixed fixing error.
> >
> > However the more I think about this the more it seems to me that the
> > reference Date variable passed in to the YieldCurve function is more
>tied
> > to the instrument themselves rather than the date that you want the
>curve
> > stripped at.
> >
> > Thus if you pass in a 3 month forward date into the Yieldcurve's
> > referenceDate function, you are specifying forward rates (ie - the 5Y
>swap
> > rate Tenor actually starts in 3 months time rather than today (or the
>spot
> > date)) and has nothing to do with the date that the YieldCurve is
>actually
> > stripped on.
> >
> > If my previous thought process is actually what is going on, It would be
> > nice to have a curve function that you specified up front as to what the
> > actual calculation date was and not depend on global variables. For
> > example, back testing strategies.
> >
> > Even if my previous analysis is correct, you still have the problem of
> > multiple users wanting to price a particular deal/product under
>difference
> > calculation dates.
> >
> > If the referenceDate parameter is tied to the instruments, what is the
> > ImpliedTermStructure Curve class used for? Does this actually implement
>a
> > different calculation/stripping date without going throught the
> > modifications of the evaluationDate() function?
> > If so, is this curve compatible with the wonderfully new
> > piecewiseYieldCurve Curve class?
> >
> > Sorry for the waffle, too many exciting Toys within the recent QuantLib
> > library...!!
> >
> > Best Regards,
> > Toy out.
> >
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> > from IBM. Find simple to follow Roadmaps, straightforward articles,
> > informative Webcasts and more! Get everything you need to get up to
> > speed, fast.
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click> > _______________________________________________
> > Quantlib-users mailing list
> >
[hidden email]
> >
https://lists.sourceforge.net/lists/listinfo/quantlib-users><< attach3 >>