More cashflow greeks...

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

More cashflow greeks...

Toyin Akin

Hi all,
 
Added two extra cashflow greeks.
 
yieldValueBasisPoint()
 
the Yield value of a one basis point change in price is the derivative of the yield with respect to the price multiplied by 0.01
 
and
 
BasisPointValue()
 
Basis point value is obtained by setting  = 0.0001 in the 2nd order Taylor series expansion.
 
Toy out...
 
 
 



Do you know a place like the back of your hand? Share local knowledge with BackOfMyHand.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

cashflows.cpp (24K) Download Attachment
cashflows.hpp (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Fwd Bond Price logic...

Toyin Akin
Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

Toyin Akin

Hi again,
 
It looks like my interpretation of the curves were wrong. The discountcurve within the forward class is the repo curve and the income discount class is the underlying instrument's discounting class (according to the comments).
 
The new revised QuantLib logic is as so...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the underlying discounting class (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compounding the resulting value to the forward date via the repo curve.
 
Again, FinancialCAD never uses an underlying discounting object to discount flows. Instead it grows the value of the cashflows to the Forward date via the Repo curve.

Both implementation are essentially the same except that within the current implementation of the Forward bond class, you have to manage how the underlying discounting curve is passed to the constructor. The underlying FixedBond object cannot give you this discounting object. In reality, the underlying discount curve is not needed if you follow FinancialCAD's methodology.
 
Toy out.


From: [hidden email]
To: [hidden email]
Date: Fri, 9 Nov 2007 05:09:33 +0000
CC: [hidden email]
Subject: [Quantlib-users] Fwd Bond Price logic...

Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!


Are you the Quizmaster? Play BrainBattle with a friend now!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

Toyin Akin

One other thing, the FinancialCAD methodology also has the advantage where the underlying FixedRateBond is a Government bond object. You don't really have access to a discounting curve.
 
When you initially create the FixedRateBond object, no discounting  curve information is needed. When solving for yields or pricing the bond, you can do so by providing bond prices or bond yield information.
 
If you do want to price via a yieldcurve, you can attach a pricing engine that has an underlying discounting curve, but this is optional.
 
For the Forward bond price, the underlying discounting curve is mandatory.
 
Toy out...
 

 

From: [hidden email]
To: [hidden email]
Date: Fri, 9 Nov 2007 05:55:48 +0000
CC: [hidden email]
Subject: Re: [Quantlib-users] Fwd Bond Price logic...


Hi again,
 
It looks like my interpretation of the curves were wrong. The discountcurve within the forward class is the repo curve and the income discount class is the underlying instrument's discounting class (according to the comments).
 
The new revised QuantLib logic is as so...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the underlying discounting class (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compounding the resulting value to the forward date via the repo curve.
 
Again, FinancialCAD never uses an underlying discounting object to discount flows. Instead it grows the value of the cashflows to the Forward date via the Repo curve.

Both implementation are essentially the same except that within the current implementation of the Forward bond class, you have to manage how the underlying discounting curve is passed to the constructor. The underlying FixedBond object cannot give you this discounting object. In reality, the underlying discount curve is not needed if you follow FinancialCAD's methodology.
 
Toy out.


From: [hidden email]
To: [hidden email]
Date: Fri, 9 Nov 2007 05:09:33 +0000
CC: [hidden email]
Subject: [Quantlib-users] Fwd Bond Price logic...

Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!


Are you the Quizmaster? Play BrainBattle with a friend now!


Do you know a place like the back of your hand? Share local knowledge with BackOfMyHand.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

Allen Kuo-2
Hi Toyin:
 
>
> Both implementation are essentially the same except that within the current
> implementation of the Forward bond class, you have to manage how the underlying
> discounting curve is passed to the constructor. The underlying FixedBond object
> cannot give you this discounting object. In reality, the underlying discount curve is
> not needed if you follow FinancialCAD's methodology
>
 
To avoid having to pass in two curves, could the incomeDiscountCurve be defaulted to the discountCurve, if it is not passed into the constructor ?
 
I originally put in the income discount curve for flexibility- I had a repo curve and a gov't bond curve (collateralized versus uncollateralized debt curves) and it wasn't clear whether or not I should be discounting the bond's income/coupons using the collateralized curve, so I left it up to the user. I am curious what "standard practice" is though: I would have thought that by using the repo curve to discount the coupons, that would be inconsistent with subtracting that value from NPV, since the latter is obtained by discounting the coupons using the bond's own curve, not the repo one.
 
In ql/Example/Repo, I did do a comparison against Fincad's aaBondFwd(), but both curves input into the FixedRateBondForward constructor are the repo curve (because Fincad only takes one curve).
 
Best, Allen
 

Toyin Akin <[hidden email]> wrote:

One other thing, the FinancialCAD methodology also has the advantage where the underlying FixedRateBond is a Government bond object. You don't really have access to a discounting curve.
 
When you initially create the FixedRateBond object, no discounting  curve information is needed. When solving for yields or pricing the bond, you can do so by providing bond prices or bond yield information.
 
If you do want to price via a yieldcurve, you can attach a pricing engine that has an underlying discounting curve, but this is optional.
 
For the Forward bond price, the underlying discounting curve is mandatory.
 
Toy out...
 

 

From: [hidden email]
To: [hidden email]
Date: Fri, 9 Nov 2007 05:55:48 +0000
CC: [hidden email]
Subject: Re: [Quantlib-users] Fwd Bond Price logic...


Hi again,
 
It looks like my interpretation of the curves were wrong. The discountcurve within the forward class is the repo curve and the income discount class is the underlying instrument's discounting class (according to the comments).
 
The new revised QuantLib logic is as so...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the underlying discounting class (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compounding the resulting value to the forward date via the repo curve.
 
Again, FinancialCAD never uses an underlying discounting object to discount flows. Instead it grows the value of the cashflows to the Forward date via the Repo curve.

Both implementation are essentially the same except that within the current implementation of the Forward bond class, you have to manage how the underlying discounting curve is passed to the constructor. The underlying FixedBond object cannot give you this discounting object. In reality, the underlying discount curve is not needed if you follow FinancialCAD's methodology.
 
Toy out.


From: [hidden email]
To: [hidden email]
Date: Fri, 9 Nov 2007 05:09:33 +0000
CC: [hidden email]
Subject: [Quantlib-users] Fwd Bond Price logic...

Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!


Are you the Quizmaster? Play BrainBattle with a friend now!


Do you know a place like the back of your hand? Share local knowledge with BackOfMyHand.com -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

Toyin Akin

Hi Allen,
 
You're right, defaulting the incomeDiscountCurve to the discountCurve would be incorrect for the reasons you explained.
If you notice FinCad implementation, discounting doesn't occur at all. All the cash flows (including the dirty price) are compounded up to the Fwd date via the Repo curve.
 
Toy out...


Date: Fri, 9 Nov 2007 00:20:24 -0800
From: [hidden email]
To: [hidden email]
CC: [hidden email]
Subject: Re: [Quantlib-users] Fwd Bond Price logic...

Hi Toyin:
 
>
> Both implementation are essentially the same except that within the current
> implementation of the Forward bond class, you have to manage how the underlying
> discounting curve is passed to the constructor. The underlying FixedBond object
> cannot give you this discounting object. In reality, the underlying discount curve is
> not needed if you follow FinancialCAD's methodology
>
 
To avoid having to pass in two curves, could the incomeDiscountCurve be defaulted to the discountCurve, if it is not passed into the constructor ?
 
I originally put in the income discount curve for flexibility- I had a repo curve and a gov't bond curve (collateralized versus uncollateralized debt curves) and it wasn't clear whether or not I should be discounting the bond's income/coupons using the collateralized curve, so I left it up to the user. I am curious what "standard practice" is though: I would have thought that by using the repo curve to discount the coupons, that would be inconsistent with subtracting that value from NPV, since the latter is obtained by discounting the coupons using the bond's own curve, not the repo one.
 
In ql/Example/Repo, I did do a comparison against Fincad's aaBondFwd(), but both curves input into the FixedRateBondForward constructor are the repo curve (because Fincad only takes one curve).
 
Best, Allen
 

Toyin Akin <[hidden email]> wrote:

One other thing, the FinancialCAD methodology also has the advantage where the underlying FixedRateBond is a Government bond object. You don't really have access to a discounting curve.
 
When you initially create the FixedRateBond object, no discounting  curve information is needed. When solving for yields or pricing the bond, you can do so by providing bond prices or bond yield information.
 
If you do want to price via a yieldcurve, you can attach a pricing engine that has an underlying discounting curve, but this is optional.
 
For the Forward bond price, the underlying discounting curve is mandatory.
 
Toy out...
 

 

From: [hidden email]
To: [hidden email]
Date: Fri, 9 Nov 2007 05:55:48 +0000
CC: [hidden email]
Subject: Re: [Quantlib-users] Fwd Bond Price logic...


Hi again,
 
It looks like my interpretation of the curves were wrong. The discountcurve within the forward class is the repo curve and the income discount class is the underlying instrument's discounting class (according to the comments).
 
The new revised QuantLib logic is as so...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the underlying discounting class (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compounding the resulting value to the forward date via the repo curve.
 
Again, FinancialCAD never uses an underlying discounting object to discount flows. Instead it grows the value of the cashflows to the Forward date via the Repo curve.

Both implementation are essentially the same except that within the current implementation of the Forward bond class, you have to manage how the underlying discounting curve is passed to the constructor. The underlying FixedBond object cannot give you this discounting object. In reality, the underlying discount curve is not needed if you follow FinancialCAD's methodology.
 
Toy out.


From: [hidden email]
To: [hidden email]
Date: Fri, 9 Nov 2007 05:09:33 +0000
CC: [hidden email]
Subject: [Quantlib-users] Fwd Bond Price logic...

Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!


Are you the Quizmaster? Play BrainBattle with a friend now!


Do you know a place like the back of your hand? Share local knowledge with BackOfMyHand.com -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


The next generation of MSN Hotmail has arrived - Windows Live Hotmail
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

JURAJ HUSKA
In reply to this post by Toyin Akin
Hi all,

the question is how we define  FwdBond price. When you use Bloomberg "buy/sell back repo analysis", the approach is different (or at least so I deduced). The Forward bond price is defined as the price that we would agree to pay on a future date to buy that bond on that date (no money changes hands at initiation).

To arrive at no arbitrage price, one can go to repo market, borrow money to buy that bond (at spot price) keep the bond's coupons (and reinvest them at the repo rate) and pay the repo interest until the forward settle date.

Therefore one needs to sum up all the flows between the settlement date and the forward date via the repo curve (this is= "reinvested coupons- the repo payment") and add this to bond's spot price. (no compounding of spot price occurs in this process)

If I am correct, the forward bond price calculation would then have to be changed in QuantLib.


Bond experts, let me know what you think.

Juraj

On Nov 8, 2007 11:09 PM, Toyin Akin < [hidden email]> wrote:
Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

Toyin Akin
Hi Juraj,

I'm not too sure about Bloomberg's methodology. Again a call to Bond experts...
 
What I do know is that QuantLib's current methodology and FinCad's methodology are practically the same if you are pricing via the yieldcurve approach. The results should be identical.
 
FinCAD simply grows all the cashflows including the spot dirty price to the FwdDate via the repo curve
 
QuantLib discounts the bonds cashflows to the settlement date first (via the bond's discounting curve), the bond dirty price is already valued at the settlement date and thus both results are then grown to the FwdDate via the repo curve.
 
Basically the same method.
 
FinCADs method is more flexible in that it does not rely on the discounting curve and thus can compute a fwd price based solely on the spot dirty price, the cashflows and the repocurve.
 
It would seem, from your text, that Bloomberg also only depends on the Repo curve.

Would be interesting to compare results.
 
Toy out...
 

Date: Fri, 9 Nov 2007 10:26:17 -0600
From: [hidden email]
To: [hidden email]
CC: [hidden email]; [hidden email]
Subject: Re: [Quantlib-users] Fwd Bond Price logic...

Hi all,

the question is how we define  FwdBond price. When you use Bloomberg "buy/sell back repo analysis", the approach is different (or at least so I deduced). The Forward bond price is defined as the price that we would agree to pay on a future date to buy that bond on that date (no money changes hands at initiation).

To arrive at no arbitrage price, one can go to repo market, borrow money to buy that bond (at spot price) keep the bond's coupons (and reinvest them at the repo rate) and pay the repo interest until the forward settle date.

Therefore one needs to sum up all the flows between the settlement date and the forward date via the repo curve (this is= "reinvested coupons- the repo payment") and add this to bond's spot price. (no compounding of spot price occurs in this process)

If I am correct, the forward bond price calculation would then have to be changed in QuantLib.


Bond experts, let me know what you think.

Juraj

On Nov 8, 2007 11:09 PM, Toyin Akin < [hidden email]> wrote:
Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users




Get free emoticon packs and customisation from Windows Live. Pimp My Live!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

Simon Ibbotson
Why would you reinvest coupons at the repo rate? You should invest them at either the market rate (Ibor) or at your own treasury rate, whichever is the highest.

On 11/9/07, Toyin Akin <[hidden email]> wrote:
Hi Juraj,

I'm not too sure about Bloomberg's methodology. Again a call to Bond experts...
 
What I do know is that QuantLib's current methodology and FinCad's methodology are practically the same if you are pricing via the yieldcurve approach. The results should be identical.
 
FinCAD simply grows all the cashflows including the spot dirty price to the FwdDate via the repo curve
 
QuantLib discounts the bonds cashflows to the settlement date first (via the bond's discounting curve), the bond dirty price is already valued at the settlement date and thus both results are then grown to the FwdDate via the repo curve.
 
Basically the same method.
 
FinCADs method is more flexible in that it does not rely on the discounting curve and thus can compute a fwd price based solely on the spot dirty price, the cashflows and the repocurve.
 
It would seem, from your text, that Bloomberg also only depends on the Repo curve.

Would be interesting to compare results.
 
Toy out...
 

Date: Fri, 9 Nov 2007 10:26:17 -0600
From: [hidden email]
To: [hidden email]
CC: [hidden email]; [hidden email]
Subject: Re: [Quantlib-users] Fwd Bond Price logic...

Hi all,

the question is how we define  FwdBond price. When you use Bloomberg "buy/sell back repo analysis", the approach is different (or at least so I deduced). The Forward bond price is defined as the price that we would agree to pay on a future date to buy that bond on that date (no money changes hands at initiation).

To arrive at no arbitrage price, one can go to repo market, borrow money to buy that bond (at spot price) keep the bond's coupons (and reinvest them at the repo rate) and pay the repo interest until the forward settle date.

Therefore one needs to sum up all the flows between the settlement date and the forward date via the repo curve (this is= "reinvested coupons- the repo payment") and add this to bond's spot price. (no compounding of spot price occurs in this process)

If I am correct, the forward bond price calculation would then have to be changed in QuantLib.


Bond experts, let me know what you think.

Juraj

On Nov 8, 2007 11:09 PM, Toyin Akin < [hidden email]> wrote:
Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.fincad.net/support/developerfunc/mathref/bfwd.htm" target="_blank">http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.pimpmylive.co.uk/" target="_blank">Pimp My Live!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://get.splunk.com/" target="_blank">http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/quantlib-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/quantlib-users




Get free emoticon packs and customisation from Windows Live. <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.pimpmylive.co.uk/" target="_blank">Pimp My Live!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://get.splunk.com/" target="_blank">http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/quantlib-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/quantlib-users



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

JURAJ HUSKA
In reply to this post by Toyin Akin

Yes, Bloomberg also only depends on the Repo curve.

In fact, to be precise down below I should have said "add this to bond's spot clean price to arrive at bond's forward clean price". Not surprisingly, you actually get the same result as FinCad or QuantLib (so I was wrong that QuantLib calcs should be changed...)...

It does seem cleaner to use only the spot dirty price, the cashflows and the repocurve.

Simon, technically, you could reinvest coupons at highest  rate achievable but I guess it's a market convention to assume repo  rate (so you would profit from a higher rate if you can get it in the market).

Juraj







On Nov 9, 2007 11:08 AM, Toyin Akin <[hidden email]> wrote:
Hi Juraj,

I'm not too sure about Bloomberg's methodology. Again a call to Bond experts...
 
What I do know is that QuantLib's current methodology and FinCad's methodology are practically the same if you are pricing via the yieldcurve approach. The results should be identical.
 
FinCAD simply grows all the cashflows including the spot dirty price to the FwdDate via the repo curve
 
QuantLib discounts the bonds cashflows to the settlement date first (via the bond's discounting curve), the bond dirty price is already valued at the settlement date and thus both results are then grown to the FwdDate via the repo curve.
 
Basically the same method.
 
FinCADs method is more flexible in that it does not rely on the discounting curve and thus can compute a fwd price based solely on the spot dirty price, the cashflows and the repocurve.
 
It would seem, from your text, that Bloomberg also only depends on the Repo curve.

Would be interesting to compare results.
 
Toy out...
 

Date: Fri, 9 Nov 2007 10:26:17 -0600
From: [hidden email]CC: [hidden email]; [hidden email]

Subject: Re: [Quantlib-users] Fwd Bond Price logic...

Hi all,

the question is how we define  FwdBond price. When you use Bloomberg "buy/sell back repo analysis", the approach is different (or at least so I deduced). The Forward bond price is defined as the price that we would agree to pay on a future date to buy that bond on that date (no money changes hands at initiation).

To arrive at no arbitrage price, one can go to repo market, borrow money to buy that bond (at spot price) keep the bond's coupons (and reinvest them at the repo rate) and pay the repo interest until the forward settle date.

Therefore one needs to sum up all the flows between the settlement date and the forward date via the repo curve (this is= "reinvested coupons- the repo payment") and add this to bond's spot price. (no compounding of spot price occurs in this process)

If I am correct, the forward bond price calculation would then have to be changed in QuantLib.


Bond experts, let me know what you think.

Juraj

On Nov 8, 2007 11:09 PM, Toyin Akin < [hidden email]> wrote:
Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users




Get free emoticon packs and customisation from Windows Live. Pimp My Live!


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd Bond Price logic...

Allen Kuo-2
In reply to this post by Toyin Akin
>
> QuantLib discounts the bonds cashflows to the settlement date first (via the bond's
> discounting curve), the bond dirty price is already valued at the settlement date and thus
> both results are then grown to the FwdDate via the repo curve.
>
 
Yes, the forwards class design was based on Hull Chapter 3, where he uses the concept of the "present value of income" (hence the virtual class spotIncome() ). You could instead have a virtual forwardIncome() method, skipping the extra step of discounting the coupons to spot time, but would have to refactor the base and derived classes (only other forwards class right now is FRA). It should all be the same but for the case of the bond forward, may get rid of the need for the bond's own discount curve (the one that reproduces its own NPV).
 
Of course there is the other issue of what Simon mentioned- if the coupons can be reinvested at something other than the repo rate, may still need two curves in the constructor (could end up being bond's own discount curve if Simon is correct: max(LIBID, TSY).
 
From Juraj's last email, it sounds like repo is the market convention- in this case, the default incomeDiscountCurve (the curve for reinvestment of coupons) could be set to discountCurve (e.g. repo curve), but it could take another curve in case the user wants it (e.g. to calc profit). The spotIncome() method would have to go, in favor of forwardIncome().
 
 
 


Toyin Akin <[hidden email]> wrote:
Hi Juraj,

I'm not too sure about Bloomberg's methodology. Again a call to Bond experts...
 
What I do know is that QuantLib's current methodology and FinCad's methodology are practically the same if you are pricing via the yieldcurve approach. The results should be identical.
 
FinCAD simply grows all the cashflows including the spot dirty price to the FwdDate via the repo curve
 
QuantLib discounts the bonds cashflows to the settlement date first (via the bond's discounting curve), the bond dirty price is already valued at the settlement date and thus both results are then grown to the FwdDate via the repo curve.
 
Basically the same method.
 
FinCADs method is more flexible in that it does not rely on the discounting curve and thus can compute a fwd price based solely on the spot dirty price, the cashflows and the repocurve.
 
It would seem, from your text, that Bloomberg also only depends on the Repo curve.

Would be interesting to compare results.
 
Toy out...
 

Date: Fri, 9 Nov 2007 10:26:17 -0600
From: [hidden email]
To: [hidden email]
CC: [hidden email]; [hidden email]
Subject: Re: [Quantlib-users] Fwd Bond Price logic...

Hi all,

the question is how we define  FwdBond price. When you use Bloomberg "buy/sell back repo analysis", the approach is different (or at least so I deduced). The Forward bond price is defined as the price that we would agree to pay on a future date to buy that bond on that date (no money changes hands at initiation).

To arrive at no arbitrage price, one can go to repo market, borrow money to buy that bond (at spot price) keep the bond's coupons (and reinvest them at the repo rate) and pay the repo interest until the forward settle date.

Therefore one needs to sum up all the flows between the settlement date and the forward date via the repo curve (this is= "reinvested coupons- the repo payment") and add this to bond's spot price. (no compounding of spot price occurs in this process)

If I am correct, the forward bond price calculation would then have to be changed in QuantLib.


Bond experts, let me know what you think.

Juraj

On Nov 8, 2007 11:09 PM, Toyin Akin < [hidden email]> wrote:
Hi all,
 
I've been looking at the logic for FwdBond prices within QuantLib and I noticed that the methodology used is different from that used by FinancialCAD.
 
In QuantLib...
 
The FixedRateBondForward class computes the FwdPrice by discounting the flows between the settlement date and the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the spot bond's dirty price and then compouding the resulting value to the forward date via the discountingcurve.
 
In FinancialCAD...
 
FinancialCAD computes the FwdPrice by compounding the flows between the settlement date and the foward date to the forward date via the repo curve (incomeDiscountcurve), summing this up, deleting this value from the compounded spot bond's dirtyprice (to the forward date via the repocurve).
 
The compounded spot bond dirty price is computed by dividing the bond spot price by the discount factor obtained via the repo curve.
 
The discounting curve is never used in FinancialCAD's implementation.
 
See here...
 
http://www.fincad.net/support/developerfunc/mathref/bfwd.htm
 
Toy out...
 


Get free emoticon packs and customisation from Windows Live. Pimp My Live!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users




Get free emoticon packs and customisation from Windows Live. Pimp My Live! -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users