indexFixing( )

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

indexFixing( )

Li, Peter-2

Hi,

 

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( ),

 

Thanks,

Peter

 


-------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: indexFixing( )

Luigi Ballabio
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
Reply | Threaded
Open this post in threaded view
|

Re: indexFixing( )

Li, Peter-2
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
Reply | Threaded
Open this post in threaded view
|

Re: indexFixing( )

Luigi Ballabio

On Aug 26, 2008, at 7:20 PM, Li, Peter wrote:

> 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.

You're right---this breaks the semantics of indexFixing(). I guess  
that the idea was to implement par coupons, as per market practice---
but the right place to do it would probably be the rate() method.

Nando, this is part of the refactoring done in your group a while ago.  
Do you remember what was the rationale for this design?

Luigi


-------------------------------------------------------------------------
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