FixedRateCoupon question

View: New views
5 Messages — Rating Filter:   Alert me  

FixedRateCoupon question

by Slava Mazur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Greetings,

 

I’m new to QuantLib, so if my question has already been discussed please point me to the answer.

 

I noticed that the amount of a fixed rate coupon bond is always calculated using day count convention for such a bond

(see FixedRateCoupon::amount() function for details). In reality however, many bond contracts are set up in such a way that the issuer of the bond doesn’t care about how many days passed since the previous coupon payment. For example, 10% semi-annual would pay $5 per $100 no matter what, so the cash flow amount is $5 for each coupon. In QuanLib however, the function that calculates coupon amount would give the result that slightly deviates from $5 depending on day count convention and a calendar.

 

And here is my question. Is there any way to setup a bond pricer in such a way that cash flows from coupons would be fixed (and equal to nominal / coupon frequency) and day count conventions would affect only calculation of discount factors?

 

Thanks,

 

Slava

 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Re: FixedRateCoupon question

by JURAJ HUSKA :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

just a quick attempt (I had the same problem before)-if you use ISMA daycounter it should always give you 5(unless the coupon period is drastically shorter than 6 months).

Juraj

On Mon, Jun 2, 2008 at 11:05 AM, Slava Mazur <Slava.Mazur@...> wrote:

Greetings,

 

I'm new to QuantLib, so if my question has already been discussed please point me to the answer.

 

I noticed that the amount of a fixed rate coupon bond is always calculated using day count convention for such a bond

(see FixedRateCoupon::amount() function for details). In reality however, many bond contracts are set up in such a way that the issuer of the bond doesn't care about how many days passed since the previous coupon payment. For example, 10% semi-annual would pay $5 per $100 no matter what, so the cash flow amount is $5 for each coupon. In QuanLib however, the function that calculates coupon amount would give the result that slightly deviates from $5 depending on day count convention and a calendar.

 

And here is my question. Is there any way to setup a bond pricer in such a way that cash flows from coupons would be fixed (and equal to nominal / coupon frequency) and day count conventions would affect only calculation of discount factors?

 

Thanks,

 

Slava

 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Re: FixedRateCoupon question

by Allen Kuo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi: I've used ActualActual(ActualActual::Bond) in the FixedRateBond constructor to get constant cash flows. I believe the DayCounter which you set in the YieldTermStructure (passed in to DiscountingBondEngine) is the one used to calculate the discount factors to those cash flows. Allen

--- On Mon, 6/2/08, Slava Mazur <Slava.Mazur@...> wrote:
From: Slava Mazur <Slava.Mazur@...>
Subject: [Quantlib-users] FixedRateCoupon question
To: quantlib-users@...
Date: Monday, June 2, 2008, 12:05 PM

Greetings,

 

I’m new to QuantLib, so if my question has already been discussed please point me to the answer.

 

I noticed that the amount of a fixed rate coupon bond is always calculated using day count convention for such a bond

(see FixedRateCoupon::amount() function for details). In reality however, many bond contracts are set up in such a way that the issuer of the bond doesn’t care about how many days passed since the previous coupon payment. For example, 10% semi-annual would pay $5 per $100 no matter what, so the cash flow amount is $5 for each coupon. In QuanLib however, the function that calculates coupon amount would give the result that slightly deviates from $5 depending on day count convention and a calendar.

 

And here is my question. Is there any way to setup a bond pricer in such a way that cash flows from coupons would be fixed (and equal to nominal / coupon frequency) and day count conventions would affect only calculation of discount factors?

 

Thanks,

 

Slava

 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Parent Message unknown Re: FixedRateCoupon question

by Piter Dias-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Allen,

I had this issue while developing TestSuite for a Brazilian Bond. You can
check "void BondTest::testBrazilianCached()" the way I solved this.

If you change
couponRates[0] = InterestRate(0.1,Thirty360(),Compounded,Annual);
// gives you 4,880885% per semester

to

couponRates[0] = InterestRate(0.1,Thirty360(),Simple,Annual);
// gives you 5% per semester.

You would have the result you want.

There are simpler ways to that for for Simple rates (it wasn`t my case) but
you can get more complex schedules with this approach.

Regards,



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Re: FixedRateCoupon question

by Luigi Ballabio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 2008-06-02 at 12:05 -0400, Slava Mazur wrote:
> And here is my question. Is there any way to setup a bond pricer in
> such a way that cash flows from coupons would be fixed (and equal to
> nominal / coupon frequency) and day count conventions would affect
> only calculation of discount factors?

You can choose the day counters independently. As already suggested,
choosing ActualActual(ActualActual::Bond) when building the bond will
give you fixed cash flows; the day counter passed to the yield curve
will be used for discount factors.

Luigi


--

So little done, so much to do.
-- Cecil Rhodes



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users
LightInTheBox - Buy quality products at wholesale price