Specific dates result in forward swap calculation failures

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

Specific dates result in forward swap calculation failures

K.LAMINE

Hi,

Our program always crashes when attempting to perform forward starting swaps calculations on specific dates. We use a Simple Swap object and define a discount curve via PieceWiseFlatForward. Our program is thus almost identical to the sample program which comes along with QuantLib (QuantLib/examples/swap/swapvaluation.cpp), except that we use a US calendar (NewYork);
We could not determine the cause of these failures ; we once supposed that they came from a bad combination of dates settings, such as todaysdate, settlementdate, settlementdays, fixingdays, which seems similar to the problem that Enrico mentionned (cf indexedcoupons and parcashflows).
We get three types of error messages : "Actual360() : history not loaded", "Invalid reference period", ".. swap mispriced". We have no clue about what triggers which message.

We tried to list the tricky dates using a looping program from 2000 to 2005 : there seems to be a recurrent pattern.

In 2000 :     [todaysdate / settlementdate]

-->April 20 / April 25
-->April 28 / May 2
-->December 22 / December 27

In 2001 :

--> April 12 / April 17
-->April 30 / May 2
-->December 24 / December 27

In 2002 :

-->March 28 / April 2
-->April 30 / May 2
-->December 24 / December 27


In 2003 :

--> April 17/ April 22
-->April 30 / May 2
-->December 24 / December 29

In 2004 :

-->April 8 / April 13

In 2005 :

-->March 24 / March 29


Any idea about this ? Might there be a possible bug, or have I just missed something ?

Thanks,

Karim [hidden email]