Posted by
Jens Thiel on
Jan 10, 2003; 9:39am
URL: http://quantlib.414.s1.nabble.com/Some-issues-tp10189p10201.html
> Go ahead. You're way too large to be a padawan anyway :)
a what...?
> You're right. Let me think aloud a moment, what happens is that:
> - today is Sunday;
> - the start date of the deposits is two business days ahead,
> i.e., Tuesday;
> - the deposit looks up the fixing for Tuesday minus two business
> days, which
> goes all the way back to Friday, which is before Sunday;
> - the index doesn't find the fixing and throws (which, I must
> add, serves you
> right for working on holidays...)
>
> The question now is, what do we do in this case? On the one hand,
> replacing
> if (fixingDate < today)
> with
> if (calendar.roll(fixingDate) < calendar.roll(today))
> would "fix" the test, i.e., the code will forecast the fixing.
> But on the other hand, if we're really on Sunday, is the above the real
> practice? Or do traders do something different?
>
In C#, I fixed at least the test with
DateTime todaysDate = calendar.Roll(DateTime.Today);
The "problem" is that the test assumes that it has a current deposit quote
even on sundays, while on the other hand the library behaves more
intelligently and rolls back to friday.
This would at least justify the above fix, since this "missing knowledge of
market behaviour on holidays" does not change the usefullness of the test
case itself. On the long run, the test may roll back to a business day to
build the curve on it's hardcoded data.
Or am I missing something?
Jens.