ObjectHandler and evaluationDate()
Posted by Toyin Akin on
URL: http://quantlib.414.s1.nabble.com/ObjectHandler-and-evaluationDate-tp3963.html
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.