This program is Copyright © 1978 by Hewlett-Packard and is used here by permission. This program was originally published in "HP-38E/38C Personal Finance Applications" book. This program was transcribed by Kris Collins.
This program is supplied without representation or warranty of any kind. Hewlett-Packard Company and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.
A bond is a contract to pay interest, usually semi-annually, at a given rate (coupon), and to pay the principal of the bond at some specified future date. The value or price of a bond is the present value of the coupon payments plus the present value of the principal or redemption value, at a given interest rate (yield).
In periods of high inflation, bonds may be of great interest to investors, because of their high yields. Bonds are frequently purchased between coupon dates, making determination of their price and interest quite complicated.
In such cases, the Securities Industry Association has established certain formulae^{1} to determine their price and yield. For semi-annual bonds held for more than 6 months, the following HP-38E/38C program evaluates bond price and accrued interest on an Actual/Actual day basis. For bonds calculated on a 30/360 day basis, two additional program steps are needed. Insert g roll down after f change days at steps 36 and 40.
^{1}Standard Securities Calculations Methods; Securities
Industry Association; 1973.
g P/R g CLP | 00- | . | 12- 73 |
f CLEAR FIN | 01- 24 32 | 9 | 13- 9 |
RCL 1 | 02- 22 1 | 9 | 14- 9 |
f INTGR | 03- 24 61 | 9 | 15- 9 |
6 | 04- 6 | 9 | 16- 9 |
. | 05- 73 | 9 | 17- 9 |
0 | 06- 0 | 9 | 18- 9 |
1 | 07- 1 | + | 19- 51 |
g x<>y | 08- 25 5 | g GTO 24 | 20- 25 7 24 |
g GTO 21 | 09- 25 7 21 | RCL 1 | 21- 22 1 |
RCL 1 | 10- 22 1 | 6 | 22- 6 |
5 | 11- 5 | - | 23- 41 |
STO 6 | 24- 21 6 | RCL 7 | 41- 22 7 |
RCL 2 | 25- 22 2 | ÷ | 42- 71 |
n | 26- 11 | n | 43- 11 |
RCL 3 | 27- 22 3 | 0 | 44- 0 |
PMT | 28- 14 | PMT | 45- 14 |
RCL 4 | 29- 22 4 | FV | 46- 15 |
i | 30- 12 | CHS | 47- 32 |
RCL 5 | 31- 22 5 | RCL n | 48- 22 11 |
FV | 32- 15 | RCL 3 | 49- 22 3 |
PV | 33- 13 | CHS | 50- 32 |
RCL 6 | 34- 22 6 | x | 51- 61 |
RCL 1 | 35- 22 1 | R/S | 52- 74 |
f Change Days | 36- 24 41 | - | 53- 41 |
STO 7 | 37- 21 7 | g GTO 00 | 54- 25 7 00 |
RCL 6 | 38- 22 6 | g P/R | |
0 | 39- 22 0 | ||
f Change Days | 40- 24 41 |
R_{0} Settlement | R_{1} Next Coupon | R_{2} # periods | R_{3} Coupon |
R_{4} Yield | R_{5} Redemption | R_{6} Last Coupon | R_{7} Used |
Note: If a coupon is received on the last day of the month (i.e., October 31), an error condition may result. This happens because the count-back routine determines the last coupon date to be exactly 6 months earlier (i.e., April 31), and this may be an illegal date.
Example:
Given the following U.S. Treasury Bond, find its price:
Settlement date January 3, 1977; maturity date December 14, 1990 (28 coupon periods); next coupon date June 14, 1977; coupon rate 4.75%; yield 5%.
Keystrokes:
Begin --> End
1.031977 STO 0 | 1.03 | Settlement date |
6.141977 STO 1 | 6.14 | Next coupon date |
28 STO 2 | 28.00 | Total number of coupons |
4.75 ENTER 2 ÷ STO 3 | 2.38 | Semi-annual coupon |
5 ENTER 2 ÷ STO 4 | 2.50 | Semi-annual yield |
100 STO 5 | 100.00 | Redemption value is not specified and is assumed to be 100 |
R/S | -0.26 | Accrued interest |
R/S | -97.51 | Purchase price |
To find bond yield, an iteration (trial and error) approach may be used with the bond price program. The user inputs successive "guesses" at the periodic yield into register 4 and solves for price. If the calculated price is the actual price paid, the yield is in register 4. If not, adjust the yield and repeat the procedure until the desired accuracy is obtained.
*Positive for cash received; negative for cash paid out.
Go back to the software library
Go back to the main exhibit hall