Login  Register

Re: AW: AW: Some issues

Posted by Luigi Ballabio-2 on Jan 10, 2003; 9:14am
URL: http://quantlib.414.s1.nabble.com/Some-issues-tp10189p10200.html

At 05:55 PM 1/10/03 +0100, Jens Thiel wrote:

> > >Another thing: The PieceWiseFlatForward test (or better: the
> > equivalent .NET
> > >test) fails on holidays (because it will lookup the fixing
> > history for the
> > >preceding business day); I guess the same will be true for the
> > SWIG tests.
> >
> > No, the SWIG tests pass just fine.
>
>
>No Luigi, they do not (I dare to contradict the master...):

Go ahead. You're way too large to be a padawan anyway :)

>I changed my machines date to Sunday, and got the following results

Ouch, I guess I missed the "on holidays" bit.
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?

Ideas?

Later,
         Luigi