swap-rate helper

Posted by marco.tarenghi@libero.it on
URL: http://quantlib.414.s1.nabble.com/swap-rate-helper-tp4506.html

Hi,
    I have a question about the SwapRateHelper and the way it computes the final maturity date for a swap.
In the function

   void SwapRateHelper::setTermStructure(YieldTermStructure* t)

initially the maturity date of the swap (stored in the private variable latestDate_) is computed as

   latestDate_ = swap_->maturity();

where the maturity of the swap is found in the usual way, i.e. by shifting the first fixing date by 2 working days and then shifting it again using the swap tenor. For me this is the correct way.
But then, if QL_USE_INDEXED_COUPON is defined, the maturity date is found using the indexed coupon framework.

Practical example: a 5y-swap with respect to the 20 Feb 2006 as fixing date. The start date is 22 Feb 06 which should lead to 22 Feb 11. If QL_USE_INDEXED_COUPON is defined, the swap maturity returned is 23 Feb 11.

What do you think about it?
Thanks,
Marco