OpenGaa Docuentation Bond Pricing Marc Henrard arc@opengaa.co OpenGaa Docuentation n. 5 Version 2.0 - May 2013
Abstract The details of the ipleentation of pricing for fixed coupon bonds and floating rate note are provided. The different day count and yield conventions used by sovereign bonds are described.
Contents 1 Introduction 1 2 Notation 1 2.1 Fixed coupon bond.................................... 1 2.2 Floating rate note.................................... 2 3 Conventions 2 3.1 Day count: ACT/ACT ICMA.............................. 2 3.2 Day count: ACT/365 Fixed............................... 3 3.3 Sovereign bonds conventions............................... 3 3.4 Settleent lag....................................... 3 4 Repurchase agreeent 3 5 Discounting 4 5.1 Fixed coupon bond.................................... 4 5.2 Floating rate note FRN)................................ 4 6 Clean and dirty price 5 6.1 Dirty price of a bond security fro curves....................... 5 6.2 Fixed coupon bond present value fro clean price.................. 5 7 Yield 5 7.1 Siple interest in last period.............................. 6 7.2 Copound interest in last period............................ 6 7.3 US Street convention................................... 6 7.4 UK: DMO ethod.................................... 6 7.5 US Treasury Convention................................. 7 7.6 FRANCE:COMPND METH.............................. 7 7.7 GERMAN BONDS.................................... 7 7.8 Sovereign bonds conventions............................... 7 8 Duration and convexity 7 8.1 Modified duration.................................... 7 8.2 Macaulay duration.................................... 8 8.3 Convexity......................................... 8 9 Other easures 9 9.1 Z-spread.......................................... 9 9.2 Z-spread sensitivity.................................... 9 10 Ipleentation 9
1 Introduction The coputation of the present value of fixed coupon bonds and floating rate notes is not very coplex atheatically. Nevertheless, it requires a lot of details and there are any subtleties. This note provides the details of the ipleentation in the OpenGaa analytical library. When speaking about bonds, one can ake the distinction between a bond security or issue) and a bond transaction. Here, the bond security represents the official description of the bond, with details about the coupons, noinal payents and conventions. A bond transaction is the purchase or sale) of a certain quantity of the bond issue on a given date for a given price. The bond figures described here involves both of those concepts. Fixed coupon bonds are usually quoted as clean prices. The clean price is the relative price to be paid at the standard settleent date in exchange for the bond. Soe bonds trade ex-coupons before the coupon payent. The coupon is paid not to the owner of the bond on the payent date but to the owner of the bond on the detachent date. The difference between the two is the ex-coupon period easured in days). The issues related to those detachents are also described. When a bond has been purchased but has not settled yet, the proceeds of the payent are still pending. The payent of those proceeds need to be taken into account in the present value calculation of the bond purchase. The aount representing the proceed will have the opposite sign to the quantity of bond purchased. The total present value of a bond which has not settled will generally be very sall with respect to the notional. 2 Notation The pricing described here will be relative to a reference date denoted t r ; the will be, depending of the circustances described below, the settleent date of a particular transaction, the standard spot date of the bond or today. Only the cash flows after that date subject to ex-coupon adjustents) will be taken into account. The definition of after will also depend of the circustances: for settle;net date it eans t > t r but for today, it eans t 0 = t r. 2.1 Fixed coupon bond The coupon aounts are denoted c i ),...,n c and paid on ties t c i ); the nuber of coupon periods in a year is denoted. Only the coupons to be received are taken into account. When the ex-coupon period is 0, the coupons taken into account are the coupons after the reference date. When the ex-coupon period is non-zero we need an extra date which is t x, the reference date plus the ex-coupon period. The coupons taken into account are the coupons such that t c i > t x. The notional capital) payents are denoted N i ),...,n N and are paid on t N i ). Usually, there is a unique payent of the full notional at the final coupon date t c nc. But in case of aortising bonds, the notional can be paid in several instalents, The bond settleent purchase) is done through the payent of an aount S on t S. The sign of S is the opposite of the sign of N i. If the settleent has already occurred, the aount used is S = 0 and the tie is t S = 0. 0 First version: 8 April 2011; this version: 2.0-13 May 2013. 1
2.2 Floating rate note The coupon aounts are denoted Ni c),...,n c; the spreads are sc i, the accrual fraction are δc i and the coupons are paid on t c i ). The coupon pay-off is the Ibor rate plus the argin ultiplied by the coupon accrual and notional, i.e. L I i + sc i )δc i N i c. The Ibor fixing accrual fraction is δi i. As for fixed coupon bonds, only the coupons to be received are taken into account. It eans that if the ex-coupon period is 0, the coupons taken into account are the coupons such that t c i > t r. If the ex-coupon period is non-zero, let t x be the reference date plus the ex-coupon period. The coupons taken into account are the coupons such that t c i > t x. The notional capital) payents are denoted N i ),...,n N and are paid in t N i ). Usually there is a unique payent of the full notional at the final coupon date t c n c. The bond settleent purchase) is done through the payent of an aount S in t S. If the settleent already occurred, the aount used is S = 0 and the tie is t S = 0. 3 Conventions The ost used day count conventions for bonds are 3.1 Day count: ACT/ACT ICMA The rule is described in ICMA. The accrual factor is 1 Freq Adjustent where Freq is the nuber of coupon per year and Adjustent depends of the type of stub period. None The Adjustent is 1. The second expression reduces to 1 and the coupon is 1/Freq. Short at start The Adjustent is coputed as a ratio. The nuerator is the nuber of days in the period. The denoinator is the nuber of days between the standardised start date, coputed as the coupon end date inus the nuber of onth corresponding to the frequency i.e. 12/Freq), and the end date. Long at start Two standardised start dates are coputed as the coupon end date inus one tie and two ties the nuber of onth corresponding to the frequency. The nuerator is the nuber of days between the start date and the first standardised start date and the nuerator is the nuber of days between the first and second standardised start date. The Adjustent is the ratio of the nuerator by the denoinator plus 1. Short at end The Adjustent is coputed as a ratio. The nuerator is the nuber of days in the period. The denoinator is the nuber of days between the start date and the standardised end date, coputed as the coupon start date plus the nuber of onth corresponding to the frequency i.e. 12/Freq). Long at end Two standardised end dates are coputed as the coupon start date plus one tie and two ties the nuber of onth corresponding to the frequency. The nuerator is the nuber of days between the end date and the first standardised end date and the nuerator is the nuber of days between the second and first standardised end date. The Adjustent is the ratio of the nuerator by the denoinator plus 1. 2
3.2 Day count: ACT/365 Fixed Also called English Money Market basis. The accrual factor is d 2 d 1 365 where d 2 d 1 is the nuber of days between the two dates. The nuber 365 is used even in a leap year. 3.3 Sovereign bonds conventions The following countries use the ACT/ACT ICMA: France Gerany Italy Spain United Kingdo since Noveber 1, 1998) United States The following countries use the Day count: ACT/365: United Kingdo before Noveber 1, 1998) 3.4 Settleent lag A conventional settleent lag is associated to each bond. The lag is the delay between trade date and settleent date. It is usually one business day for US treasuries and UK Gilts and three days for Euroland governent bonds. transactions can be entered into at any settleent date agreed by the parties. Nevertheless the quoted price fro data providers are prices for standard settleent date. It is iportant to know the correct convention to use the quoted price inforation correctly even if one does not use those conventions for actual transactions. 4 Repurchase agreeent A repurchase agreeent repo) is a collateralised deposit which is financially equivalent to selling and buying back the sae bond at an agreed price at a later date even if there are legal differences between the two). If we take a repo with settleent date today and aturity at a date t r in the future, the flows are given in Table 1. On the other side it is possible to sell the bond today with value date today and at the sae tie buy today with settleent t r. The flows are also given in Table 1. The two being equal, the dirty price with forward settleent is Dirtyt r ) = Dirty0)1 + δr), i.e. the forward price should be discounted at the repo) risk free rate to obtain today s value. We will use this discounting fro settleent approach for the bond when we discuss present value coputation fro quoted price. 3
Repo Bond today and forward Tie Cash flow Bond Tie Cash flow Bond 0 +P 0 1 0 +P 0 1 t r P 0 1 + δr) +1 t r P tr +1 5 Discounting Table 1: Flow for repo and forward settleent bond transaction. The discounting price is the price obtained by discounting each cash flow. Not all cash flows are discounted using the sae curve. The following sections describes the details for coupon bonds and floating rate notes. 5.1 Fixed coupon bond For a coupon bond, all the cash flows are known and directly discounted. The coupons and notional are discounted with the curve including credit risk relevant for the issuer. The settleent aount when the bond has not settled yet) is discounted with the risk-free curve, as the aount to be paid for settleent is collateralised by the bond delivery versus payent DVP)). The two curves used are 1. Discounting risk free) : P D t). 2. Credit issuer): P C t). The present value of the security without settleent payent is, for t c i 0, c n PV Security Discounting = c i P C t c i) + n N N i P C t N i ). 1) If the settleent date t s is after today t s 0) and the settleent aount is S, the present value of a transaction is given by, for t c i > t s, PV Transaction Discounting = c i P C t c i) + n c n N 5.2 Floating rate note FRN) N i P C t N i ) + SP D t s ) = PV Security Discounting + SP D t s ). 2) In the case of a FRN a third curve is used: the forward curve related to the relevant Ibor. The three curves are: 1. Discounting risk free) : P D t). 2. Credit issuer): P C t). 3. Ibor forward): P I t). 4
The coupons and notional are discounted with the credit curve. The coupons are estiated with the forward curve. The approach is based on an independence hypothesis between the issuer credit risk and Ibor rates. The forward estiation is Fi I = 1 P I ) s i ) δi I P I e i ) 1. 3) The present value is PV Discounting = δ i Ni c Fi I + s c i)p C t c i) + n c 6 Clean and dirty price n N N N i P C t N i ) + SP D t s ). 4) The stander prices clean and dirty) are defined only for the bonds with unique notional payent N at the end bullet bonds). 6.1 Dirty price of a bond security fro curves The dirty price is the relative price to be paid in a fair transaction at the standard settleent date. The dirty price, denoted Dirty, should be such that PV Discounting = 0 for S = N Dirty, with t S the standard settleent date. We obtain for the dirty price Dirty Discounting = PV Security Discounting /P D t S )/N. 6.2 Fixed coupon bond present value fro clean price The present value fro the clean price is approxiately the clean price plus accrued interest ultiplied by the notional. This is not exact as it does not take into account the discounting between settleent and today and any coupon that ay be due in between. We start with the price for a bond with standard settleent date. The settleent date is denoted t 0 and the present value of a synthetic transaction with standard settleent date is denoted P Standard. Its present value is PV Standard Price = P Quoted + A)NP C t 0 ). For the coupon that are added or subtracted fro the standard one, we use the curves 7 Yield PV Transaction Price = PV Transaction Discounting PV Standard Discounting) + PV Standard Price. The yield of a bond security is a conventional nuber representing the internal rate of return of standardised cash flows. Standardised eans in this context that the exact payent dates are not taken into account but only the nuber of periods. The accrual factor fro the standard settleent date to the next coupon is denoted w. The factor is coputed using the day count convention of the bond. The yield is written only for the bonds with unique notional payent N at the end bullet bonds). 5
7.1 Siple interest in last period Soe bonds use a different calculation ethod in the last coupon period. The ost used ethod is the siple interest in last period or US arket final period convention. In the final period n c = 1), the siple yield is used. The dirty price at standard settleent date) is related to the yield by N Dirty = 1 + w y ) 1 cnc + N). 7.2 Copound interest in last period In the final period n c = 1), the copound interest is used. The dirty price at standard settleent date) is related to the yield by N Dirty = 1 + y ) w cnc + N). 7.3 US Street convention The US street convention assues that yield are copounded over the bond coupon period usually sei-annually in US), including in the fractional first period. The dirty price at standard settleent date) is related to the yield by N Dirty = 1 + y ) w n c c i ) 1 + y i 1 + N 1 + y ) nc 1 In the final coupon period, the US arket final period convention is used. ) 7.4 UK: DMO ethod The ethod is siilar to the US street convention except that the final period uses the sae convention and not the US arket final period convention. It can be different if the first period is long or short or if there is an ex-dividend period. Let v = 1 + y/) 1. The coupons are all identical fro the third one: c i = c/ for i = 3,..., n c. The forula described by DMO in Debt Manageent Office 2005) is NDirty = v w c 1 + c 2 v + cv 2 ) 1 c vn 2 ) + Nv nc 1 1 v) where c 1 is the cash-flow on the next date ay be 0 in the ex-dividend period or if the gilt has long first dividend period) and c 2 is the cash flow due on the next but one quasi-coupon date ay be greater than c/ for long first dividend periods). In the last period the forula reduces to N Dirty = v w c 1 + N) and is not replaced by the siple yield approach. 6
7.5 US Treasury Convention The US Treasury convention assues that yields are copounded over the bond coupon period usually sei-annually in US), except in the fractional first period where a siple yield is used. The dirty price at standard settleent date) is related to the yield by N Dirty = 1 + w y ) 1 n c ) c i N ) 1 + y i 1 + ) 1 + y nc 1 In the final coupon period, the US arket final period convention is used. It appears that this convention is no longer coonly used. 7.6 FRANCE:COMPND METH It is the sae ethod as the UK: DMO ethod with copound interest in the last period. 7.7 GERMAN BONDS It is the sae ethod as the US Street convention with siple interest in the last period. 7.8 Sovereign bonds conventions The following countries use the US Street convention: Spain United States The following countries use the UK: DMO ethod: United Kingdo 8 Duration and convexity 8.1 Modified duration The odified duration is a dirty) price sensitivity easure. It is the relative derivative of the price with respect to the conventional yield, i.e. Duration Modified = 1 1 + y Dirty y 1 + y = Duration Modified Dirty. For the US street convention and UK DMO convention it is n c c i i 1 + w ) i 1+w + For the siple interest in the last period it is Duration Modified = 1 + y N ) nc 1+w ) n 1 + w 1 N Dirty. 5) 1 + w y ) 1 w. 6) 7
For the copound interest in the last period it is Duration Modified = 1 + y ) 1 w. 7) The odified duration is not scaled by the notional/quantity of bonds. 8.2 Macaulay duration Macaulay duration, naed for Frederick Macaulay, who introduced the concept, is the weighted average aturity of cash flows. The discounting and the tie to aturity are in line with those of the yield convention. For US street not in the last period and DMO ethods it is coputed as Duration Macauley = n c c i i 1 + w) ) 1 + y i+w + For siple interest in the last period it is 1 + y N ) n c 1+w ) n c + w) 1 N Dirty. 8) Duration Macauley = w. 9) For US Street not in the last period and DMO ethods, the relationship between the two durations is Duration Modified = 1 1 + y Duration Macauley. For US Street in the last period the relationship is 1 Duration Modified = 1 + w y Duration Macauley. The Macaulay duration is not scaled by the notional/quantity of bonds. 8.3 Convexity The convexity is the relative second order derivative of the price with respect to the conventional yield, i.e. Dirty = Convexity Dirty. y For US street not in the last period and DMO ethods is coputed as Convexity = n c c i 1 + y i 1 + w) i + w) ) i+w+1 + N 1 + y For US Street in the last period the relation it is ) nc +w+1 n c 1 + w) ) n c + w) 1 N Dirty. 10) Convexity = 2 1 + w y ) 2 w ) 2. 11) The convexity is not scaled by the notional/quantity of bonds. 8
9 Other easures 9.1 Z-spread The z-spread is the constant spread for which the present value fro a curve plus the spread atches a present value. The spread is in the convention in which the curve is stored; this convention is usually ACT/ACT, continuously copounded. The discounting curve for a spread s and an initial curve P t) is P t) exp st). The z-spread is not scaled by the notional/quantity of bonds. The coputation of the Z-spread depends on the way the present value is coputed. The ost used approach is to copute the present value fro the arket quoted price as described in Section6.2. This eans that one needs a arket price, a risk free repo) curve and a issuer curve to copute the present value and the initial curve fro which the spread is coputed. The requireent is thus one price and three curves to obtain the Z-spread. 9.2 Z-spread sensitivity This is the present value sensitivity to the z-spread. It is the parallel in the curve convention) curve sensitivity at the curve plus spread level. The z-spread sensitivity is scaled by the notional/quantity of bonds. 10 Ipleentation In OG-Analytics, the bond security figures are coputed in the class BondSecurityDiscountingMethod and BondTransactionDiscountingMethod. In the Analytics viewer, the different settings can be changes through the following Properties: 1. RiskFree: the risk free/repo curve 2. Credit: the issuer specific curve 3. Curve: the base curve in particular for Z-spread) 4. CalculationMethod: to change the calculation ethod. The possible values are FroCurves, FroCleanPrice, and FroYield. References Debt Manageent Office 2005). Forulae for calculating Gilt prices fro yields. Technical report, Debt Manageent Office. 3rd edition: 16 March 2005. 6 ICMA. ICMA s rules and recoandations. rule 251 accured interest calculation. Available at http://isda.org/c and a/pdf/icma-rule-251.pdf. 2 9
placeholder
OpenGaa Analytics Docuentation 1. The Analytic Fraework for Iplying Yield Curves fro Market Data. 2. Multiple Curve Construction. 3. Option Pricing with Fourier Methods. 4. Bill Pricing. 5. Bond Pricing. 6. Interest Rate Futures and their Options: Soe Pricing Approaches. 7. Bond Futures: Description and Pricing. 8. Forex Options Vanilla and Sile. 9. Forex Options Digital. 10. Swaption Pricing. 11. Sile Extrapolation. 12. Inflation Instruents: Zero-Coupon Swaps and Bonds. 13. Hull-White one factor odel. 14. Swap and Cap/Floors with Fixing in Arrears or Payent Delay. 15. Replication Pricing for Linear and TEC Forat CMS. 16. Binoral With Correlation by Strike Approach to CMS Spread Pricing. 17. Libor Market Model with displaced diffusion: ipleentation. 18. Portfolio hedging with reference securities. 19. Copounded Swaps in Multi-Curves Fraework 20. Curve Calibration in Practice: Requireents and Nice-to-Haves.
About OpenGaa OpenGaa helps financial services firs unify their calculation of analytics across the traditional trading and risk anageent boundaries. The copany's flagship product, the OpenGaa Platfor, is a transparent syste for front-office and risk calculations for financial services firs. It cobines data anageent, a declarative calculation engine, and analytics in one coprehensive solution. OpenGaa also develops a odern, independentlywritten quantitative finance library that can be used either as part of the Platfor, or separately in its own right. Released under the open source Apache License 2.0, the OpenGaa Platfor covers a range of asset classes and provides a coprehensive set of analytic easures and nuerical techniques. Find out ore about OpenGaa www.opengaa.co Download the OpenGaa Platfor developers.opengaa.co/downloads Europe OpenGaa 185 Park Street London SE1 9BL United Kingdo North Aerica OpenGaa 280 Park Avenue 27th Floor West New York, NY 10017 United States of Aerica