From: Chris Tham Subj: Bond Pricing Application Date: 25 Nov 91 HP-48SX Bond pricing application Version 1.0 Copyright (C) 1991 Chris Tham (christie@extro.ucc.su.oz.au) Introduction The BOND application allows your HP-48SX to act as a sophisticated bond pricing calculator, with features above and beyond that incorporated in most financial calculators, including ones manufactured by Hewlett-Packard. Indeed, it has features similar to bond pricing programs normally found on personal computers but retains the ease of use and flexibility of keystroke oriented bond pricing functions found on financial calculators. The BOND application has the following features: * Continuous display of all relevant bond pricing parameters (settlement and maturity dates, coupon and yield rates, bond price) on screen during data entry. * Calculates bond price using the Reserve Bank of Australia pricing formulae, with extensions to support bonds with different coupon payment frequencies and ex-interest periods. The RBA bond pricing formula is compatible with the Securities Industry Association's recommendations. * User can view the RBA bond pricing parameters (i, y, g, x, n, f, d) on screen to verify correct calculation. * Bond pricing is compatible with the bond functions available on the Hewlett-Packard range of financial calculators (including the HP-12C). * Calculation of bond price, capital price, accrued interest, implied yield, implied coupon, duration, modified duration, convexity, dispersion, PVBP (Price Value for a Basis Point change in yield). How to use the BOND Application The BOND application is normally stored in a subdirectory on the HP-48SX called `BOND'. To use the application, simply enter the directory and either type the `GO' command or press the [VAR] menu key and then press the soft key marked [GO] (this should be the left most soft key if you have not created any variables in this directory). The screen should now display something like the following: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³{ HOME BOND } ³ ³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij ³ ³ ³Settlement 22-Nov-1991 ³ ³Maturity 15-Nov-2000 ³ ³Coupon 12.00% ³ ³Yield 10.500% ³ ³Bond Price 108.812 ³ ÃÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄ´ ³SETTL³MATU ³ CPN ³YIELD³PRICE³ RBA ³ ÃÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄ´ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ The soft keys at the bottom corresponds to keys for * SETTLement date * MATUrity date * CouPoN rate per annum * YIELD of bond if held to maturity * Bond Gross (Total) PRICE * RBA (Reserve Bank of Australia) Pricing Parameters If you press the [NXT] (Next Menu) key, the soft menus will successively show the following soft keys: * [CAPL] (Calculate bond capital price) * [ACCR] (Calculate bond accrued interest) * [DUR] (Calculate bond duration) * [MDUR] (Calculate bond Modified duration) * [CONV] (Calculate bond convexity) * [DISPR] (Calculate bond dispersion) * [PVBP] (Calculate change in bond Price Value per 1 Basis Point change in yield) * [FREQ] (Change coupon frequency per annum) * [EXINT] (Change coupon ex-interest period) The settlement date is entered into the system by typing in a date as a number of the form DD.MMYYYY or MM.DDYYYY (depending on flag -42 in the calculator) and then pressing the [SETTL] key. The display should automatically update to show the new settlement date. The calculator does not check that the settlement date falls on a business day, or even if it is in the right format, so be careful. Entering a nonsensical date will cause the program to crash. The maturity date of the bond is similarly entered into the system by typing in the date in the current HP-48SX date format and then pressing the [MATU] key. The display will automatically update to show the new maturity date. The annual coupon rate must be entered as a percentage and then followed by the [CPN] key. The system displays coupon rates to 2 decimal places. The desired or actual yield to maturity of the bond must be entered as a percentage followed by the [YIELD] key. The system displays yields to three decimal places. The bond gross price per $100 face value is entered into the system by typing in the price and then pressing the [PRICE] key. The system displays the price to 3 decimal places. To calculate the bond price, implied yield or implied coupon, enter the remaining (known) parameters as outlined above and then calculate the unknown parameter by pressing the appropriate key preceeded by the left (orange) shift key. To retrieve the current value of any parameter, press the appropriate key preceeded by the right (blue) shift key. Let's run through the examples given in the HP-12C Owner's Handbook and Problem-Solving Guide (Reorder Number 00012-90001 Edition 1, Copyright (C) Hewlett-Packard Company 1982, July 1987) on pages 76-78. Example 1: What price should you pay on April 28, 1982 for a 6 3/4% US Treasury bond that matures on June 4, 1996, if you want a yield of 8 1/4%? Lets assume our current date format is DD.MMYYYY. Key sequence will be 28.041982 [SETTL] 4.061996 [MATU] 6 [SPC] 3 [SPC] 4 / + [CPN] 8 [SPC] 1 [SPC] 4 / + [YIELD] [Left Shift] [PRICE] The screen will show: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³{ HOME BOND } ³ ³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij ³ ³ ³Settlement 28-Apr-1982 ³ ³Maturity 4-Jun-1996 ³ ³Coupon 6.75% ³ ³Yield 8.250% ³ ³Bond Price 90.311 ³ ÃÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄ´ ³SETTL³MATU ³ CPN ³YIELD³PRICE³ RBA ³ ÃÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄ´ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Hence, the total bond price is $90.311 per $100 face value (including accrued interest). Note that although the bond price is given to three decimal places the full precision is stored internally. To find out the capital and accrued interest components, press the [NXT] key. The screen will clear and the soft keys will now say [CAPL] [ACCR] [DUR] [MDUR] [CONV] [DISPR]. Press the [CAPL] key, then the [ACCR] key. Depending on the setting of your numeric display format (mine is on FIX 2) you should get something like "Capital: 87.62" on level 2 of your stack and "AccrInt: 2.69" on level 1. Pressing the [PREV] key ([Left Shift] [NXT]) will bring you back to the previous soft key menu and pressing [Left Shift] [SETTL] will restore the screen display of bond parameters. The RBA pricing parameters for the above bond can be obtained by pressing the [RBA] key which should show something like: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³n 28 ³ ³f 37 ³ ³d 182 ³ ³x 1 ³ ³g 3.375 ³ ³i .04125 ³ ³v .960384153661 ³ ÃÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄ´ ³SETTL³MATU ³ CPN ³YIELD³PRICE³ RBA ³ ÃÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄ´ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Pressing any key (except the [ON] key, of course!) will restore the bond parameter screen. Example 2: The market is quoting 88 3/8% for the bond described in Example 1. What yield will that provide? We first need to find the gross price corresponding to the quoted capital price, then we can find the implied yield. The key sequence is 88 [SPC] 3 [SPC] 8 / + [NXT] [ACCR] + [PREV] [PRICE] [Left Shift] [YIELD] After a few seconds, the display will show that the corresponding yield is 8.151%. To calculate bond characteristics such as duration, modified duration, convexity, dispersion, and PVBP simply press the appropriate key. For the bond given in example 2, the relevant values are Duration = 8.71 Modified Duration = 8.37 Convexity = 98.66 Dispersion = 5.16 PVBP = 0.08 Note that PVBP/PRICE * 10,000 approximately equals the Modified duration. This is a consequence of the method used to calculate Modified duration. The last two soft keys ([FREQ] and [EXINT]) allows you to change the coupon payment frequency per annum and ex interest period of the bond. By default, FREQ = 2 and EXINT = 15. Pressing either [FREQ] or [EXINT] will display the current settings of FREQ and EXINT respectively. To enter a new coupon frequency, just type the number of coupon payments per year and press [Left Shift] [FREQ] and to enter a new ex interest period, just type the minimum number of days to the next interest period from settlement date before the bond goes ex-interest then press [Left Shift] [EXINT]. The BOND application currently does not handle bonds calculated on a 30/360 day basis.