Posted by
Li, Peter-2 on
Aug 26, 2008; 5:20pm
URL: http://quantlib.414.s1.nabble.com/indexFixing-tp6526p6528.html
Hi Luigi,
Sorry for the confusion.
I mean in floatingratecoupon.cpp,
Rate FloatingRateCoupon::indexFixing() const {
return index_->fixing(fixingDate());
}
It will return the forward rate based on the tenor (say 6M for LIBOR6M).
However, in the iborcoupon.cpp, iborcoupon::indexFixing( ) overrides
FloatingRateCoupon::indexFixing( ).
It returns forward rate based on accrued period, that could be less than
6M for irregular coupon period even though the index is LIBOR6M.
The BermudaSwaption example calls iborcoupon::indexFixing( ).
But it seems to me only the implementation in FloatingRateCoupon makes
sense.
Thanks,
Peter
-----Original Message-----
From: Luigi Ballabio [mailto:
[hidden email]]
Sent: Tuesday, August 26, 2008 12:23 PM
To: Li, Peter
Cc:
[hidden email]
Subject: Re: [Quantlib-users] indexFixing( )
On Wed, 2008-08-20 at 15:50 -0500, Li, Peter wrote:
> Why use iborcoupon::indexFixing( ) to override
> fixedratecoupon::indexFixing( )?
>
> It seems to me that the index rate will be forecasted based on the
> tenor (say 6M for LIBOR6M), that is as
> fixedratecoupon::indexFixing( ).
>
> The iborcoupon::indexFixing( ) forcasts rate based on accrued period,
> that could be less than 6M for irregular coupon period.
>
> It seems to me that fairRate( ) should call
> fixedratecoupon::indexFixing( ) rather than
> iborcoupon::indexFixing( ),
Peter,
sorry, but I'm not following. May you give me some context? What
part
of the code are you talking about? For instance, may you point me to the
relevant files and methods?
Thanks,
Luigi
--
feature, n:
A surprising property of a program. Occasionally documented.
To call a property a feature sometimes means the author did not
consider that case, and the program makes an unexpected, though
not necessarily wrong response. See BUG. "That's not a bug,
it's a feature!" A bug can be changed to a feature by
documenting it.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users