You are on page 1of 49

From: Don Phillips

Subject: FIN 4.2.1 B: Financial Applications for HP48GX


Date: June 1997


This is the "broken" version of my financial programs for the
HP48GX for those with a HP48G calculator. The individual
subdirectories are zipped up separately so that you may use only
those that you really need and have room for.

The FIN file loads as the directory FIN in your HOME directory
and installs the prgrams common to all the financial programs.
FIN must be installed for the other programs to work properly.
The 11 financial programs, or subdirectories, should be loaded,
as needed, in the FIN1 subdirectory. The 11 programs are EQV,
TVM, capital budgeting (IRR, NPV, NUS, NFV), generalized IRR and
NPV calculations, bonds, stocks, depreciation, options, inflation
adjustments, simple interest, and discounted securities using the
GDP or CPI indexes. Install FIN and the other programs using
HP48 Link or another communication program in binary mode. The
directory and subdirectories are automatically created. Even if
you have the old FIN1 directory, the new FIN directory must be
loaded as some of the padding routines used for the new EQV
subdirectory have been modified.

I have created a custom set of menus for each subdirectory.
They are accessed by pressing GO->, the first soft menu key in
each subdirectory. For the bond programs I relied heavily on two
sources. I adopted the code for the Universal Bond Solver that
Tony Hutchins developed for the HP LX Palmtops to the HP48G(X),
and I used the program interface techniques of Chris Tham from
his Bond Pricing Application. For the IRR and NPV routines I
adopted the techniques of Manoj Kasichainula and use the HP
built-in functions of PROOT and PEVAL. Because of this, the IRR
routine needs no initial guess and will now compute all real
roots of a cash flow series that are greater than -100%.

The programs are provided as FREEWARE and as is. If you like
them and use them, please send me an email. That way I'll know
that they are actually useful to people and strive to improve
them. Also, I would love to hear about your most difficult
financial problems that you have either solved or could not solve
using FIN. If I get enough, I'll put them on the WEB.

The code is in UserRPL and some (very little) SysRPL. If you
find any errors, bugs, or whatever, please let me know so that I
can fix them. I hope you find them useful. I assume that you
are already familiar with the appropriate financial concepts and
the operation of the HP48G(X). For instance, all the programs
use the cash flow sign convention; i.e., cash inflows are
positive and cash outflows are negative. I developed the
routines for the MBA program I am taking.

NOTE: Two routines, IRR in the CAPB subdirectory and DISM in the
GNPV directory use HP48G(X)commands that are named the same as
commands on the MATHLIB ROM card. Since the ROM card commands

are processed before the HP48G(X)commands, the MATHLIB library
should be detached before the file is loaded onto the HP48G(X).

What's New

FIN 4.2.1 fixes a small programing error in the new EQV
subdirectory and extends the capabiltiy of the EQV routines.
Besides computing the equation of value, it can now be used to
solve arbitrary cash flow problems, i.e., problems in which,
given an interest rate, the positive and negative cash flows sum
to zero at any point in time.

FIN 4.2.0 adds a new subdirectory, EQV, for computing the
equation of value. The equation of value allows one to commute
one arbitrary set of obligations (payments and/or receipts) into
a second set of arbitrary obligations (either payments or
receipts). For example, an interest free debt of $1,000.00 is
due in two years and a 15-year debt of $1,500 is due in ten years
at 7% interest compounded annually. The two debts are to be
replaced with three equal payments beginning in 5 years. If the
current rate of interest is 9% compounded quarterly, what is the
value of the three payments? Answer: $1,438.38.

FIN 4.1.0 incorporates some SysRPL routines in writing the
displays and printing the output; the result is that the screens
are displayed much faster. In a few places I've added choose
boxes to replace the toggle routines. In the inflation
subdirectory the choose box for selecting an index will include
any index you want to add. The format for entering your own
inflation indexes is detailed below. Most routines print out a
date and time stamp; I've added the ability to print out a name

(up to 24 characters, including spaces) also. Simply enter a
string with the name on the stack and press NAME which occurs
right after the DSEC subdirectory key; The date and time stamp
as well as you name will now be printed. The settlement and
maturity dates in the bond screen now use the HP48's time string
(TSTR) function and now display the day of the week as well as
the date. Finally, in the capital budgeting subdirectory
(CAPB)and GNPV subdirectory, when computing NPV, NUS, or NFV, the
interest rate must first be entered by pressing %I; it can no
longer just be put on the stack. I've done this so that previous
calculations may remain on the stack.

FIN 4.0.1 corrects a small error in computing the depreciation
tax shield in the CAPBG subdirectory. If an asset is sold before
its depreciable life is over, IRS allows only a half year
depreciation, for tax purposes, in the year the asset is sold.
The routine now takes this into account. In addition, it now
computes the remaining depreciable balance, which can be used in
calculating the tax effect of any capital gain or loss on sale of
the asset.

FIN 4.0.1 also has a small change in the amortization schedule
program in the ->TVM subdirectory to take into account the odd
number of periods in the first year.

FIN 4.0.0 adds two new subdirectories, one for discounted
securities and one for simple interest calculations. The one for
discounted securities uses the multiple equation solver. FIN400
also adds print routines for the capital budgeting and
generalized NPV subdirectories. This required a slight change in
the how cash flows are stored; cash flows, which are entered on
the stack the same as before, are now stored using a separate

you do not have to remember what number to enter for what bond type. thus you can readily tell if print mode is set. it does so now. I hope these are the final changes for a while! FIN 3.2 makes changes in the bond display and adds a clear variable (CLV) option to the bond menu.0. In addition.0. CLV sets dates and most values to zero..0. FIN 4. PRF. all relevant values accessed through custom menus. NPV. is set. flag 1. I use flag 1 because it is displayed at the top of the screen if it is on. can now be recalled to the stack by pressing the right shift key and the appropriate soft menu key.3 has many code changes that do not affect any of the calculations from previous versions. The IRR. etc. The new TYPE? command simply rotates through the three types of bonds used. the cash flows will be printed. FIN 3. A toggle. is available in the CAPBG and GNPV subdirectories for turning the print flag on or off. but do allow the contents of the stack to be preserved whether storing. calculating. expect in the CAPB and GNPV subdirectories. CFL->. exdays to 0. It would not work correctly if the cash flows were not in chronological order. Finally. commands will no longer store cash flows. sets the redemption value/call value to 100. Choosing a bond type is now easier.1 makes the programming and operation of routines more . or printing. but maintains the current bond type.0 also corrects a programming error (my fault) in the NFV calculation for dated cash flows. FIN 3. If the print flag.command. a lot of redundant coding has been eliminated (which is not to say that some still does not exit).0. sets the coupon payment frequency to 2.

all variables used in the subdirectories are now displayed on the screen simultaneously. it again assumes it is at the beginning of the loan where there is no interest associated with the first payment. and NFV . the amortization function parameters in the ->TVM subdirectory are now reset to their initial values whenever PV is calculated. In addition. or to print out an entire amortization schedule with you choosing the number of payments in each group to amortize. NPV. The reason is that for subsequent groups of payments. FIN 2. displaying all values on the screen. It also provides for amortizing a loan on screen by choosing the number of periods to amortize. My amortization routines correct an error in the HP48G(X)'s amortization function. but not for subsequent groups. The print command also prints out a date and time stamp for the calculations. FIN300 adds a subdirectory for computing put and call option values using the Black-Scholes formulas.0 adds a subdirectory for the HP48G(X) TVM functions. the HP48G(X) will compute the principal. In addition.0.similar across subdirectories. And the SCHED function now automatically resets the amortization parameters before and after it prints the amortization schedule. If the payment mode is set to BEGIN. FIN 3.0. NUS. FIN 3.0 adds a common look to all subdirectories (except the IRR subdirectories). There are also commands to clear the variables or print them. interest.0.0 added the ability to compute the IRR. there are new commands to clear all variables and to print the variables in a manner similar to their screen appearance. as well as a new PV value entered. and balance correctly for the first group of payments.

NUS.0.e. However. Also.. 7. and NFV at the current interest rate without having to put the rate on the stack first. 5.of dated cash flows and the present value of the depreciation shield using the IRS half-year convention for 3. From it you can access the 11 subdirectories: (1) EQV (Equation of Value). the growth rate of stock dividends during supernormal periods may now equal the discount rate without giving an error message and stopping the computation. Finance Directory (FIN) This is the main directory. (2) ->TVM (Time . The first is useful when your varying cash flows are not periodic and the second is useful in capital budgeting problems. Minor adjustments included the ability to recompute or compute the NPV. Other minor changes were also been made. the net uniform series with variable interest rates. 15. and 20-year lives. This was done by changing the routines for USPV and USFV in the main FIN directory. The new method computes the uniform payment that when discounted by the variable interest rate series will yield the VNPV. i. The current method uses the effective interest rate over the period to compute VNUS. FIN 2. 10. there is no one effective interest rate for this method that will give both the VNPV and VNFV.0 also added a new method of computing VNUS.

0417826489 compounded monthly ->CC Converts from an annual percentage rate to a continuous rate. and Municipal bonds).S. The FIN directory also has three routines for interest rate conversion. Treasury. They are: CC-> Converts from a continuous compounding rate to an annual percentage rate.0417826489 compounded monthly 12 periods per year (ENTER) Press ->CC Output: 9. Enter the continuous rate on the stack. and press (or enter in alpha mode) ->CC Example: 10. (6) DEP (Depreciation). (4) GNPV (Generalized NPV): This is the new subdirectory for dated cash flows. (9) $INF (Inflation adjustments). (10) SIMP (Simple Interest). (3) CAPB (Capital Budgeting): This used to be the old NPV subdirectory.S. Output is I%YR. (11) DSEC (Discounted Securities). the number of compounding periods. and press (or enter) CC->. (5) BOND (U.00 continuous annual rate (ENTER) 12 periods per year (ENTER) Press CC-> Output: 10. then the number of compounding periods per year.99999999997 compounded continuously CI (Convert Interest Rate) Converts I%YR from one number of compounding periods per year to another. Example: 10. Enter I%YR.Value of Money). They can be used from any subdirectory. Agency. Enter I%YR. current . (8) OPTS (Black-Scholes call and put routines). (6) STCK (Stocks). U.

083564812 Example 2: Convert 8 percent compounded semi-annually to I%YR compounded monthly. The first set of six menu keys is for entering the data and interest rate and solving the equation of value. The next two . (1) Equation of Value (EQV) Press GO-> to enter the custom menu and display. enter it as a string ("Your Name") and press NAME. 10 ENTER 12 ENTER 4 ENTER Press or ENTER CI Output: 10. and then the number of periods you want to convert to. Example 1: Convert 10 percent compounded monthly to I%YR compounded quarterly. 8 ENTER 2 ENTER 12 ENTER Press or ENTER CI Output: 7.number of compounding periods.869836328 The FIN directory also has a program called NAME occurring right after the DSEC subdirectory. Press (or ENTER) CI. If you want your name printed out with the print routines.

000 non-interest bearing note that is two years past due. and a $10. The equation of value is useful for replacing one set of obligations with another. keys (accessed by pressing NXT) are for displaying and printing the results and for setting the print flag. a person owes on a $5. the original set being entered first. For instance. the first one to be made in three years. a $5.000 -1 1 0 Replacement Value 0 0 . This shifting forwards or backwards can be done with any problem.000 ten-year note bearing interest at 7% compounded annually and due in nine years. The time line will look something like this: Time Original Value -2 0 -5. the above problem can be shifted from time 0 to time 12. more convenient set of obligations. what is the value of the payments? To use this program the original obligations and replacement obligations are entered as two separate lists. If the present is designated 0. begins all problems at time 0. These debts are to be replaced with 8 equal payments. It is almost impossible to solve this problem without making a time line showing the two sets of obligations. If the going rate of interest is 5% compounded annually. then the obligations range from -2 to 10 years. however.000 five year note bearing interest at 6% per year compounded semi-annually and due in two years. My program. all payments are simply shifted forward two years.

must be entered for each set of obligations.03^10' on the stack. enter 0 and 3 on the stack and press GRP to enter a group of three zeros. Press CFL-> to enter the set of obligations. enter '-10000*1.02 0 0 13 0 0 24 -5.03^10 0 35 0 X 46 0 X 57 0 X 68 0 X 79 0 X 8 10 9 11 0 X -10. from time 0. Next.000*1. Next.07^10' on the stack. To enter the original set of obligations: Enter -5. Next. enter '-5000*1.000*1.07^10 10 12 X X All values. enter 0 and 6 on the stack and press GRP to enter a group of six zeros. To enter the replacement values: . Next.000 on the stack (the value is negative because it is a debt to be paid).

Press LS CFL-> to enter the set of obligations. First.Enter 0 and 5 on the stack and press GRP to enter a group of 5 zeros. enter 'X' and 8 on the stack and press GRP to enter a group of 8 'X's. suppose the replacement obligations were to increase by 10% a year. The answer X: -4143. Next. If flag 1 is set. It sets and clears flag 1 which is displayed at the top of the calculator. and 8 on the stack and press CPCT. (The unknown value used by the program is a capital X. CADD will add a constant amount (positive or negative) to subsequent obligations. For example. Then press SOLVE. If you have a HP calculator printer and want to print out the problem and answer. 10. the print flag must be set. A group of eight algebraics will be entered on the stack beginning with 'X' and ending with '1. CPCT will increase (decrease) subsequent obligations by a given percent.95*X'.) Press LS (left-shift) CFL-> to enter the second set of obligations. enter 0 and 5 on the stack and press GRP to enter the group of five zeros. PRF on the second set of menus is a print toggle. Enter 5 and press I%PR (interest rate per period). CADD and CPCT are for entering more complicated types of obligations. For instance.03 will be displayed. positive or (negative). . the problem will be printed out. Then enter 'X'.

However. sum to zero at any point in time. If a new set of original values is entered.g. '1. in order of course.969. e. The first of eight payments is -$2. To solve . Pressing RS (right-shift) CFL-> will recall the two sets of obligations to the stack as two lists. and pressing CFL->. If the original and replacement obligations DO NOT overlap. but the positive and negative cash flows.. The replacement values.54. press LS DISP.54. To print out the calculated replacement values. a new set of replacement values MUST be entered. 'X+100'.NOTE: The values of 'X' that can be entered must be either additive. You may not enter any powers of 'X' or other functions of 'X'. they may be entered as one set of obligations by entering all original and replacement values on the stack.. The routines in EQV can also be used to solve arbitrary cash flow problems in which the cash flows are not be replaced with another set of cash flows. at a given interest rate. e. or multiplicative. new replacement values can be entered at will as long as the original values remain unchanged. press DISP in the second set of menus. Continue as before to solve. So you won't have to calculate all the other values.2*X'. since entering a new set of original values wipes out the existing replacement values. beginning at V5 (value 5 on our time line) are displayed. Pressing LS I%PR will recall the interest rate. Press CONT to see the remaining values.g. display. and print the problem. Press SOLVE and see displayed X: -2969.

VO's payment is -2593.000. Then enter '3*X' on the stack for the 3 advance payments.60. The answer is negative since this is a payment that must be made. simply press LS (left-shift) SOLVE instead of SOLVE. Press PRV to print the current TVM variables and settings as they . The answer is X: -864. Press NXT and DISP to see displayed the value of the payments that must be made. With an interest rate of 12% compounded monthly. The enter 'X' and 9 and press GRP to enter the other nine payments and press LS CFL-> to store them. To print out the calculated payments. For instance. The first 5 variables are the HP48G(X) regular financial functions. press LS DISP. enter the present value. Enter the data and press the variable to store the value. what are the payments? First. Press LS SOLVE.000. they may be entered as one set of cash flows by simply pressing CFL->. You are required to make 3 payments in advance (at time 0) and the other nine payments monthly. Press LS (left shift) and the variable to compute the flow problems. Enter 1% and press I%PR. The other 9 payments are -864.60. you lease a machine for 12 months with a present value of $10. $10. on the stack and press CFL->.81 since three payments are made in advance. (2) Time Value of Money (TVM) Press GO-> to enter the custom menu and display. if none of the known and unknown values overlap. As above.

principal. You may continue amortizing subsequent groups of the same number by pressing AMOR again or groups of different sizes by entering the new number in the group and pressing AMOR. SCHED accepts the number of payments in the first year and the number of payments in a group in subsequent years to amortize and then prints out an amortization schedule. if entered. before printing the variables. and sets the END mode. Press NXT for the next set of six functions. The print function first prints a date and time stamp and your name. interest. AMOR accepts the number of payments to amortize (or uses the default number which is the number of periods per year) and then displays the payment group. If you want the same number of payments for the first and subsequent years. sets P/YR to 12. P/YR is for entering the number of payments per year. the . every time a new PV is entered or calculated. B/E is a toggle that switches between END and BEGIN modes. and balance. Also. SCHED automatically RESETs the initial values before and after printing the schedule. including the initial values of the TVM variables. You may press RESET at any time to set the loan to its initial state. so the 2 values must be entered.) Do not worry if the number of payments left to amortize at the end is different from the number in the group. CLV resets the financial variables to zero. (There are no default values for SCHED.appear on the screen. just enter the same number twice. the routine will handle this correctly.

TS. computes the amount of tax on the interest in each period. Three subroutines. They are T. grossed up) also accepts a tax rate. To run T. computes the after-tax cash flows of a loan by subtracting the appropriate amount of tax from the interest in each period. and TSU.amortization parameters are RESET. (3) Capital Budgeting (CAPBG) Press GO-> to enter the custom menu. The first set of menus is .. or payments. etc. and places the list of cash flows in the CAPBG subdirectory in the appropriate variable for computing NPV. TSU (tax savings. TS. not included in the menu. TSU assumes the interest rate used to calculate the payment was an after-tax interest rate. The NPV. have been added to the subdirectory. or TSU (in alpha mode) in the command line and press enter. T accepts a tax rate (in percent form). and then places the list of tax cash flows in the CAPBG subdirectory. etc. of the after-tax cash flows can then be calculated. The interest portion of the payment is grossed up before the tax is computed. TS (tax savings or payments) also accepts a tax rate. TS. and then places the list of tax cash flows in the CAPBG subdirectory. or TSU. computes the amount of tax on the interest in each period. simply put the tax rate on the stack. enter T. TS assumes the interest rate used to calculate the payment was a before-tax interest rate.

CFL->) are for entering groups of cash flows. GET) are for computing the internal rate of return. Cash outflows are entered as negative numbers. The NXT set of 6 menu keys (GRP. The first set of 6 menu keys (IRR. enter the beginning . For your regular periodic cash flows. enter the value on the stack. net present value. enter the number of cash flows in the group. and net future value of a series of periodic cash flows. NUS. NFV. GRP . CPCT. and for storing the cash flows. CADD .for periodic cash flows with a single interest rate. If the initial investment is 0. net uniform series. one after the other. R->N. as this cash flow must be present for the programs to work correctly. The last command on the third screen of menus is GOV->. for converting nominal cash flows to real cash flows and vice versa. N->R. CADD. %I stores or returns to the stack the current interest rate. the cash flows are entered on the stack. then enter a 0. this will take you to a set of menus for periodic cash flows with variable interest rates. I%PR. including the initial investment if it is negative. cash flows that vary by a constant amount or percentage. beginning with the initial investment or cash flow at time 0.If you have a series of cash flows that increase or decrease by a constant amount each period. then press GRP. NPV. The GET command is used to select an interest rate from the list of interest rates calculated by IRR.If a group of cash flows are the same. and cash inflows as positive numbers.

the converted cash flow series will be printed. Once the cash flow series is stored with CFL->. enter the beginning amount.Covert nominal cash flows to real cash flows. and then press CPCT. enter the constant percent increase or decrease (negative). For example: 1000 -10 3 Press CPCT Output: 1000 900 810 N->R . For example: 1000 -100 3 Press CADD Output: 1000 900 800 CPCT . If the print flag is set. and then press CADD. enter the expected percentage rate of inflation over the period and press N->R.amount. enter the constant increase or decrease (negative). enter the number of cash flows (including the beginning amount).If you have a series of cash flows that increase or decrease by a constant percent each period. . enter the number of cash flows (including the beginning amount).

NOTE: If using nominal cash flows. net uniform series (NUS). If the print flag is set. and 40%. use nominal interest rates in all calculations.R->N . For example: NPV @ 8. use real interest rates in all calculations. the converted cash flow series will be printed. If the print flag is set. enter its position in the list and press . Press CFL-> to store the cash flows. CFL-> .00 percent are calculated by hitting the IRR key. Net present value (NPV).848 Enter cash flows onto to the stack in order. Once the entire cash flow series is stored with CFL->.9876677% = 1728. They are returned in a list. or net future value (NFV). enter the expected percentage rate of inflation over the period and press R->N. If using real cash flows.Convert real cash flows to nominal cash flows.Stores the cash flow series that has been entered on the stack. Then press IRR to compute the real internal rates of return: 10%.540 3: 1. the answer will be printed out.700 2: -4. If the print flag is set. 20%. may be calculated using the stored cash flows by entering the periodic interest rate and pressing %I and then pressing the appropriate key.000 1: 3.83 Example: Cash flows: 0: -1. all real internal rates of return (IRR) greater than -100. Once the cash flows are stored. the cash flow series will be printed. If you want to extract one of the answers for use in subsequent calculations.

DTXSH and DEP are used to calculate the present value of the depreciation tax shield or the annual depreciation amounts using the IRS half-year convention for 3.the GET command provided in the custom menu. It may be stored by pressing I%PR. since the routine uses the IRS half-year convention for the first and last year's depreciation. 7. 15. or 20 year lives. interest rate (percent). and GOV->. NPV. SigmaCF. and NFV use the stored the interest rate. 5. PRCF. PRF. and number of years depreciation wanted. The 5 values are: cost. It take 5 values from the stack and returns the present value of the depreciation tax shield and the remaining depreciable value. 7. At an interest rate of 5 percent. Example: Cost: 10. DTXSH computes the present value of the depreciation tax shield. thus other answers may be left on the stack.000 . the net present value (NPV) is 2. 5. the number of years depreciation can be taken is life plus 1. The remaining depreciable amount can then be used to calculate the tax effect of the capital gain or loss on sale. 10.26757369614. tax rate (percent). The last 6 menu keys are DTXSH. and then press NPV. Asset lives are limited to 3. 15. 10. FIN410 in calculating the tax shield for assets sold or disposed of before their life is over allows only a half-year of depreciation in the year the asset is sold. however. or 20 years. DEP. Simply enter 5. The stack does not have to be clear before the 5 is entered. press I%PR. NUS. life.

00 1. PRCF will print the cash flows at any time. . and the present value of the tax shield. DTXSH will print out the variables.00 655.976.00 1.00 737.00 655. SigmaCF sum the cash flows and places the amount on the stack.Life: 10 %I: 8 %Tax: N: 28 11 Press: DTXSH Output: RDep: 0 Tax Shield: 1. Example: Cost: 10.800. PRF toggles the print flag on and off.00} If the print flag is set. the remaining depreciable amount. DEP computes the annual depreciation given the cost and life of the asset.00 655.440.152.00 328.000 Life: 10 Press: DEP Output: {1.00 922. the first and last are half-year amounts. Note that there are 11 years of depreciation. DEP will print out the depreciation amounts.58504565 If the print flag is set.00 1.000.00 655.

after which it declines or is tied to some interest rate index. THEREFORE. you must enter an appropriate number of zeros at the end of the cash flows. interest rates represent earnings from one time period to the next. and VNFV are designed to handle such problems. while cash flows occur at points in time. IMPORTANT NOTE: As with regular NPV calculations.Sets up the menus for cash flows with variable interest rates. Some NPV calculations not only have variable cash flows. they are used for entering and storing the cash flows and for converting real to nominal or vice versa. a savings program may guarantee a beginning interest for a number of years.Calculates NPV with variable interest rates. the number of varying interest rates entered MUST be ONE LESS than the number of cash flows. EI%PR.GOV-> . there is an initial cash flow at time 0 (zero) and a series of cash flows at times 1 to N. VNPV . Thus. the first interest rate entered represents the interest earned from period 0 (zero) to period 1 or the discount from period 1 to period 0 (zero). and USVR) are used for calculations with periodic cash flows and variable interest rates.) HOWEVER. The cash flows are entered first on the stack and then the interest rates . The Nth interest rate represents the interest earned from period N-1 to period N or the discount from period N to period N-1. VNUS. VPNV. (If you want a future value for a time after the cash flows end. VNUS. For instance. The first set of menu keys (VNPV. they also have variable interest rates. VNFV. The second set of menu keys are the same as above.

500 10 percent interest rate for 10 periods 7 percent interest rate for 5 periods 9 percent interest rate for 5 periods Press: CFL-> to save the cash flows and interest rates. Example: Initial cash flow = 0 9 cash flows of 12.41016497 Note: The uniform series computed with VNUS uses the equivalent interest rate. Press VNUS for variable net uniform series (the stack does not have to be cleared). not the series of variable interest rates.000 10 cash flows of 5. They are then saved with CFL->. the answer will also be printed out. is pressed. Press: VNPV to compute the net present value.000 1 cash flow of 8.are entered on the stack. The method below (USVR). however. and CPCT may be used for entering the cash flows and interest rates. Output: 86. the cash flows and interest rates will be printed. etc. If the print flag is set when VNPV.. Press VNFV to calculate the net future value. does use the variable interest rate series.7328562 If the print flag is set when CFL-> is pressed. Output: 9. The menu keys GRP.500. .767. CADD.

and GO->.634329 EI%PR computes the equivalent interest rate per period of the variable interest rates stored in %IV. Instead of being restricted to variable cash flows of a periodic . PRF toggles the print flag on and off. and NFV of dated cash flows. Press EI%PR. That is. USVR computes the net uniform series or payment using the variable interest rate series. This set of routines allows you to calculate IRR. Output: 8. variable interest rate problem into an ordinary annuity problem. PRF. NPV.993076522 The outputs of VNUS and EI%PR allows you to convert a variable cash flow. (4) Generalized Net Present Value (GNPV) Press GO-> to use the custom menus.664.04014657 The third set of six menus has three commands. the uniform payment when discounted by the variable rate series equals the VNPV of the series. GO-> takes you back to the standard IRR and NPV menu. NUS. Output: 9866. Press USVR.Output: 485. PRCF will print the cash flows and interest rates at any time. PRCF.

you may assign a date. how may days will be in your period. and press the BASIS soft key. If your cash flows cover many years. you may want to compute a daily rate of return. In computing the IRR. once the cash flows are on the stack. This will enable you to correctly value such things as savings plans. where inflows and outflows are on an irregular basis. (If you are computing an IRR. if you are looking at a portfolio's performance over a month or two. there must be at least one sign change in the cash flows. etc. First enter the date (in whatever date format you HP48G(X)is set up for). If your cash flows cover a couple of years in which there is no leap year and you want an annual return. The routines compute the actual number of days between the first cash flow in the series and all subsequent cash flows using the built in date functions.) The second and third set of menu keys are used to enter the cash flows. that is. then enter the amount of the cash flow. the interest rate entered will function as an initial guess for .nature. or NFV. enter the interest rate. CFL-> is in the third set of menus. use 365. Or. to a particular cash flow. you may want to use 365. by pressing I%PR and then press IRR. then enter 1 as your BASIS. press CFL-> to enter them.. NPV.25. An added bonus of this set of routines is that the cash flows DO NOT have to be entered in chronological order. Cash flows are entered in the following manner. Whatever your basis is. portfolios. NUS. The first thing you have to decide is the BASIS. any date. as a percentage. positive for inflows and negative for outflows. enter the number of days. Once the dated cash flows are stored. if so. As with the CAPBG subdirectory. depending on what you want.

Simply press the appropriate key.0992814 .301996 33. the cash flows do not have to be reentered. Enter 10 and press %I (initial guess for IRR).311996 -31.091996 -100 5.201996 -120 6. IRR.061996 -135 6.251996 -125 5.6237983845 If the print flag is set. Press IRR: Output: IRR: 17. etc.172 4.. Enter 10. press I%PR.111996 -111 4.215 Press CFL-> to enter the cash flows. If more than one calculation is wanted for a given cash flow series. will be printed.231996 -150 6. and then press NPV: Output: NPV: 531. Example: Use a BASIS of 365.Newton's Method. Enter the following on the stack: 3.

or YEAR key. CPCT. months. At an interest rate of 10/26. DAY.5 (periods) #PERS: 6 (6 full periods in term) NUS: 83. or years. the output when NUS is pressed is: TERM: 6. every so many days. 26 periods a year.Press NFV: Output: NFV: 543. Enter the number of cash flows. i.2731799686 The next set of six menu keys (GRP. and press GRP. YEAR) are for entering cash flows that occur periodically. Enter the cash flow amount. Enter the number of days.201996 14 Press: DAY Output: 14_DY Enter: 100 Enter: 3 Press: GRP . or years in the period and press the respective DAY. GRP .Use if a group of cash flows are the same and occur periodically.6245440425 per period (with an initial guess of 10/26).. MON. Enter the initial date. Example: Enter: 7. months. CADD. MON. the new IRR is . Since the basis is 365 days a year. including the initial cash flow.870538805 Press NUS: Output: No Uniform Periods.e. the 3 months encompassed in the cash flows do not constitute a full period. If the basis is made 14 days.

201996 100 8. 6.311996 as your beginning date and increment monthly. Example: Enter: 7.171996 . This will cause a date error when the number of days between dates is computed in the routines. the routine will put in 2.031996 110 8. 17.201996 14 Press: DAY Output: 14_DY Enter: 100 (initial cash flow) 10 (periodic increment) 3 (number of cash flows) Press: CADD Output: 7. 26. for example if you use 1. etc. 12. CADD .201996 100 8.031996 100 8.Output: 7.311996 as the next date.Use this routine when your cash flows are increasing or decreasing (-) by a constant amount each period. This means that it cannot handle end of the month dates. However.171996 100 Note: The number of months may be any number. the manner in which the routine increments months and years is simple.

PRCF will print the cash flows.120 CPCT . they will not be sorted by date (I don't know how to sort the rows of a matrix based on the values in one column). Example: Enter: 7. press NXT to go to the third set of menus and press CFL-> to enter the cash flows. i.. If the print flag is set when CFL-> is pressed.Use this routine when your cash flows increase or decrease (-) by a constant percentage each period. The other commands here are familiar.e. PRF toggles the print flag on and off.201996 81 Once the dated cash flows are on the stack.201996 2 Press: MON Output: 2_MN Enter: 100 (initial cash flow) -10 (percentage decrease each period) 3 (number of periods) Press: CPCT Output: 7.201996 90 11. (5) Bond Calculations (BOND) . the dated cash flows will be printed in the order they were entered.201006 100 9. SigmaCF sums the cash flows and put the value on the stack.

XDAYS . and the number of ex-dividends days. 2. coupon. maturity date. the type of calendar used. 3. or price may be calculated given the other five values. if bond is settled within the exdividend period before the next coupon payment. settlement date. CPF . yield.S. and price of the prior input is displayed along with the soft menu keys.S. or corporate bonds. U. e. the next coupon . Dates _must be_ entered in the MM.ex-dividend days. select the type of bond you are analyzing..pressing TYPE? displays a choose box. The values for coupon. municipal. Treasury. They are the number of coupon payments per payment frequency (1. The type of bond calculation. Enter the bond directory and press GO-> to display the custom menu and screen.000 call value or price would be entered as 100. or 12 times per year) Use 2 for semi-annual bonds.g. Data is entered by putting the values on the stack and pressing the corresponding menu key. a $1. yield. Values are recalled to the stack by pressing the right shift key and the appropriate soft menu key. coupon and yield as percents. and call value and price as percent of face value. call value.Bond calculations may be made for U. call (redemption) value. TYPE? . Three other pieces of data are needed to calculate bond values correctly.DDYYYY format. These variables are accessed by first pressing the NXT key. 6. Agency. 4. Values are calculated by first pressing the left shift key and then the appropriate soft menu key.

from settlement to maturity DeltaP01 .accrued interest on the bond TOT . price + accrued interest DURN .is NOT valued. Calculated by averaging the changes in price from a change in yield of plus and minus one basis point. PRV prints out the current bond variables as they appear on the screen. and the other values to 0.duration of the bond. Calculated by averaging the changes in yield from a change in price of a plus and minus 1/32nd. Other values are calculated when you calculate one of the four main bond values. CLV sets the settlement day to the current date. TERM .Change in yield due to a change in price of a 1/32nd.Change in price due to a change of 1 basis point in the yield. RDV/Call to 100. price of bond. . including the coupon payment frequency and the number of XDAYS. XDAYS to 0. Use 0 if you don't know this value for a particular bond. not modified. DeltaY32 . CPF to 2.. in years.e. a weighted average time of the bond less than or equal to the time in years from settlement to maturity. They are ACCRU . Macaulay Duration. This is the normal.

Treasury (A/A).LC .days from settlement to next coupon C . Press NXT to go to the second set of soft menu keys.days from last coupon to next coupon These values may be displayed or calculated by pressing OTH-> to display the menu keys. XDAYS = 0 Go back to the first set of soft menu keys and enter: SDATE = of last coupon payment NC . Enter: CPF = 2 (semi-annual bond) Press TYPE? and select U.75 .days from last coupon to settlement B .date of next coupon payment A . Press GO-> to return to the main display and menus.281982 MDAT = 6. simply press they to display the needed value.S. Example 1: Press GO-> to go to the custom menu.041996 CPN% = 6.

68887362638 (accrued interest from LC to SDATE) TOT = 90.041982 (next coupon date) A = 145 (days from LC to SDATE) B = 37 (days from SDATE to NC) . Press NXT and then press OTH->.3106730269 (total price) DURN = 8.621799005 if in STD mode.6870162757 TERM = 14.622. Press right shift PRICE to see Price: 87.041981 (last coupon date) NC = 6.1016483516 years DeltaP01 = .25 Press left shift and then PRICE to calculate price: 87. Press: ACCRU = 2.07534506515 DeltaY32 = .CALL = 100 YLD% = 8.00414758557 Press NXT and then press: LC = 12.

311996 .004091416085 The rest of the output remains the same.5 Press left shift YLD%: 8. Example 3: Change SDATE to 3.134% TOT = 91.5 and calculate YLD%.011982 MDAT to 1. PRICE = 88.1888736264 DURN = 8.0763794489 DeltaY32 = .716619408 DeltaP01 = . Example 2: Change PRICE to 88.C = 182 (days from LC to NC) Press GO-> to return to the main menu.

Treasury. The stock price formula will estimate stock prices based on expected annual dividends.58125 A = 31 B = 150 C = 180 If TYPE? is set to U. The formula can handle an initial period of no dividend payments and one or two periods of "super" normal growth .1428077108.14512811196 ACCRU = .S.S.14541344545 ACCRU = . YLD% will drop slightly to 8. Agency (30/360). (6) Stock Price Calculations (STCK) Press GO-> to set up the custom menu and display. YLD% will change to 8.With TYPE? at U. YLD% will be 8.540745856355 A = 29 B = 152 C = 181 With TYPE? at Muni (30/360).

period.of dividends.expected years for G1 G2 .price of stock K .discount rate or expected return on stock N0 ."super" normal growth rate for first period (may be positive or negative or zero) N1 .last dividend paid.expected years for G2 GN . of no dividend payments DIV ."super" normal growth rate for second period (may be positive or negative or zero) N2 .normal growth rate of stock that occurs after super normal growth periods (may be positive or negative or zero) CLV . in years. PRV .A program to clear the stock price variables and set them to zero. annual basis G1 .A routine to print the current stock variables in a manner similar to that on the screen. . Any of the variables may be solved for given the others. The variables are: PRICE .

Examples: Set DIV = 1. N1. or GN.936. whether that is G1. Also.1784615385. then the dividend stream is constant and DIV equals the next expected dividend. The next expected dividend must be discounted by the first growth rate that is not zero. G2.00 percent Calculate PRICE. N2 = 0 For a declining firm set GN = -4. Price = 21. Hit left shift PRICE.00 percent. if you expect a period of no dividend payments.92 K = 9.00 percent N0 = 0 G1. If all growth rates are zero. . For a no-growth firm set GN to 0. For a normal growth firm set GN to 4. DIV cannot be the value of the next expected dividend.3333333333.Note: The discount rate K cannot be less than or equal to the normal growth rate GN otherwise the equation produces an infinite result. Price = 39. G2. Price = 14.

sum-of-the-years digits. declining balance. K = 9. enter a guess for the variable and then solve for it. (7) Deprecation Subdirectory (DEP) Press GO-> to access the custom menu and display.975331917. The first set of variables are: .49981109907. Rate of return given price: If the market price of the last example was 150. Be on the look out for this. Note: Sometimes solving for a variable may produce an extremum rather than a root. If it happens.Supernormal growth firm (1 period of supernormal growth): Change G1 to 20. Price = 138.28733064. Price = 168. calculate the rate of return K. and crossover problems for annual depreciation.00 percent and N1 to 10 years.00 percent and N2 to 5 years. Set PRICE to 150. The depreciation programs can solve straight-line. Hit left shift K to calculate rate of return. Supernormal growth firm (2 periods of supernormal growth): Change G2 to 10.

useful life of asset FCTR .625.straight line depreciation Y->SY . not a percent. Four values are calculated for each year.5 Straight Line Method: Year = 15 Dep = $8.sum-of-the years digits depreciation Y->DB .00 RDV = $215. and remaining book value. Example: SBV = $375. The NXT set of menu keys is used to calculate depreciation and crossover.625. number of remaining years for straight line depreciation.000 LIFE = 40 years FCTR = 1. total depreciation through current year. e. Key in the year for which you want to calculate depreciation and press the appropriate key.00 RBV = $245. not 200% CLV .375.computes last year for declining balance method.625 . for double declining balance enter 2. Y->SL .set above variables equal to zero Data is entered by keying in the value and pressing the variable key.declining balance factor enter as an integer.salvage value LIFE ..00 Tot Dep = $129. and remaining book value at the end of the declining balance term.g.declining balance depreciation CROS .starting book value SAL .SBV . Depreciation for current year. remaining depreciable value.000 SAL = $30.

The first set of menus enable you to compute the option value.262.369. P->DB .737. The display indicates whether you are computing a call option or put option.49 RDV = $181. The variables are: . interest rate.471.18 Tot Dep = $163.Sum Of The Years' Digits Method: Year = 15 Dep = $10.369. (8) Black-Scholes Call and Put Routines (OPTS) Press GO-> to set up the custom menu and display.20 RDV = $136. the other may be calculated. exercise price.80 RBV = $166.939.235. stock price. P->SL .630. or time.51 RBV = $211.51 Crossover From Declining Balance to Straight Line: Yrs DB = 18 Yrs SL = 22 RBV = $188.737. P->SYD .Prints SOYD depreciation schedule.02 Tot Dep = $208.Prints declining balance depreciation schedule.01 The NXT set of menus prints depreciation schedules. Given any 5 of the 6 variables.80 Declining Balance Method: Year = 15 Dep = 8.Prints straight line depreciation schedule. variance.

in years Values are entered by keying in the value and pressing the appropriate key. or print the variables as they appear on the screen. not the standard deviation of the stock price--the variance is the square of the standard deviation) T .sets put mode and changes display title CLV .stores or computes the variance of the stock (enter the variance. Values are calculated by press left shift and then the appropriate key.OPTV .sets call mode and changes display title PUT . STKP = 50 EXP = 49 %INT = 7 VAR = . The NXT set of menus allows you to choose the call or put formula to calculate. clear the variables.stores or computes the stock price EXP .prints variables as they appear on the screen Example: Choose CALL mode.545205479452) Calculate OPTV .stores or computes the time.stores or computes the exercise price %INT .sets variables to zero PRV . CALL .09 T = 199/365 (.stores or computes the interest rate VAR .stores or computes the option value STKP .

OPTV = 3.01 (9) Inflation Subdirectory ($INF) Press GO-> to access the custom menu and display.85 Choose PUT mode. they are the CPI-U (for all urban workers) and GDP-CY (gross domestic product index for the calendar year). The first set of six menu keys is for choosing the index to use. The screen will also display the base year amount (BY Amt).stores or computes the current year amount NY . and nominal year index (NY Ind). Calculate OPTV. The screen title will indicate whether you are currently using the GDP or CPI index.OPTV = 5. and printing out the screen. nominal year (N Year).stores the current year (will not compute current year) INDEX opens a choose box to choose the index you want to use.stores the base year (will not compute base year) NYAM . BY AM . base year index (BY Ind).stores or computes the base year amount BY . . nominal year amount (NY Amt). Two are provided. base year (B Year). inflation adjusting values. In the choose box the beginning year for each index is also indicated.

how much would that be worth in 1982 dollars? Choose the CPI index by hitting the CPI menu key. You may only calculate base year and nominal year amounts.3).. (If a base year or nominal year is entered that is out of bounds. you should get $3. BY Amt = 815.5) and nominal year index (118. in 1982. Enter 1988 for first NY (nominal year). . 1991.72 The screen also displays the base year index (96.) Enter 1.61.Many times an analysis requires inflation adjusted numbers. For instance. If you try to calculate the base year (BY) or nominal year (NY) nothing will happen. a message will be displayed saying so. if. and 1992. Your base year is 1982.e. Press OK and enter an appropriate year. Enter 1989 for NY and calculate new BYAM: 778.728. If you add them up. you expected to receive $1. i. Do the same for 1990.000 a year for five years starting in 1988. nominal dollars from several different years need to be denominated in dollars of a base year.000 for NYAM (nominal year amount). Calculate base year amount for 1982 by pressing left shift BYAM.23. so enter BY = 1982.

To add new index values to them. First. enter a new value on the stack and press the + key. Enter a string with the title to be displayed and printed.. 2. recall the index to the stack (it is in a list format). Fourth. the index values. CLV . a list to be read by the choose box routine. Second. Eg.. the title that you want to appear on the display and printed out.clears the variables by setting the base year and current year amount to zero. and the base year index and current year index to the appropriate values for 1995. An easy way to enter your own indexes. 1. Third. Eg. the beginning year of your index. The indexes are stored in CPIU and GDPCY.PRV . the base year and current year to 1995. or using the interactive stack. You can enter your own indexes and have them appear in the choose box.pressing PRV will print the current screen values. << 'CPIU' >> Put the two elements in a list by entering 2 ->LIST. Place a short string to appear in the choose box on the stack. The only menu key here is CLV. Press NXT. . Store the expanded list under the appropriate name. There are 4 parts to the list. Leave the list on the stack. "CPI-U (1960)" In a program place the quoted name of the index on the stack. To do so they must be entered in a specific way in a list.

Given any four. Store the list in the variable name given in part 1. The variables are: . Values are entered by keying in the value and pressing the appropriate key. 'CPIU' STO. Enter the index values one after the other on the stack.. Variables are solved for by pressing LS (left-shift) and the appropriate key. Eg. the other may be computed. 3. 4.. 1960. Values can be called to the stack by pressing RS (right-shift) and the appropriate key. Reorder your variables so that GO-> is the first menu key. 5.) 6. Enter the beginning year of the index on the stack. Your index can now be used by the choose box and the programs. (Or use the interactive stack.) Leave string on stack. The print routine automatically adds an extra space to the beginning of the string to center the title on the printout. Using the DEPTH and ->LIST commands. " CPI-U Index" (There are 22 columns on the screen so enter spaces as appropriate to center the title. 7..Eg. (10) Simple Interest Press GO-> to set up the custom menu and display. create one list. Simple interest involves 5 variables. Eg.

Given either %D (discount rate) or Dys (days) and any two of the remaining four variables.the principal amount %I . annual basis Days . CLV sets the basis to 365 and the other variables to 0.the number of days interest is earned Int . Pressing NXT gets you to the CLV command.00% Days = 90 Basis = 360 Press LS Int: the answer is 600. If Basis is changed to 365.Prin = 30. the simple interest yield (%I) and the equivalent bond yield (EBY). the other two may be solved for by . Int is 591. PRV will print the variables as they appear on the screen. it is best to clear the variables with CLV before doing a new problem. The routine also computes two additional variables. For this reason. (11) Discounted Securities This routine uses the multiple equation solver.78. when solving for the discount security variables.000 %I = 8.the simple interest rate.the amount of interest earned Basis .Prin .the number of days assumed in a year Example .

Here you can change the basis for the discount and simple interest calculations. BI is the basis for simple interest.6% Dys = 81 . however. depending on the problem.face value of the discounted security Disc . simple interest is usually on a 365 day basis. BD is the basis for discount. Discount securities are usually on a 360 day basis.000 %D = 5.amount of discount Price . They can be changed.pressing the SOLVE soft key. These are the default values when CLV is rate Dys .price of discounted security (face value .days %I (simple interest yield) and EBY (equivalent bond yield) are calculated and displayed when any other of the above are solved for. Enter the value and press %D . Example 1: FValu = 10. The variables that can be solved for are: FValue . Enter the value and press BI. Pressing NXT gets you to the second set of menu keys.

00 %I = 5. Output: Disc = 126. however. MCAL will set a variable to calculated. it can be solved for.37 (360 day basis) %I = 4.627 Dys = 307 Press SOLVE.000 Price = 9. Output: Disc = 373. Using CLV. FValu = 10.00 Price = 9874. a user-defined variable cannot be solved for. sets the variables to their . MUSE will set a variable to user-defined. pressing PRV will print the variables as they appear on the screen.75 (365 day basis) EBY = 5. MUSE and MCAL are multiple equation library commands and are put hear for those who really know what they are doing.Press SOLVE.00 %D = 4.61 (365 day basis) EBY = 4.56 (Notice that it is different from %I this time) On the second set of menus.75 (EBY is always calculated on a 365 day basis and will differ from %I if days is greater than 182) Example 2: Press CLV to clear values.

May all your future cash flow be positive! . Pressing RS and the appropriate key. the variable name. (Pressing EVAL will. will be put on the stack.S.) THE END P. as desired. not the variable value. MUSE or MCAL may then be pressed. evaluate the variable and put its value on the stack. of course.appropriate state for a new problem.