Post Reply 
(11C) Purchase or Lease
09-25-2018, 10:24 AM (This post was last modified: 09-26-2018 01:39 AM by Gamo.)
Post: #1
(11C) Purchase or Lease
This program is the "Discount Cash Flow Analysis" to find NPV or
Net Present Value.

This program was from the HP-11C Solutions Handbook

I found this interesting that the example shown two set of data, one for
Purchase and another for Lease.
This program help you to choose which one is the best choice.

Procedure:

[A] Initial Investment
[B] Periodic Interest
[C] Key in the number of equal cash flow if greater than 1
[D] Net Present Value
[E] Review # of Cash Flow

Program:
Code:

LBL A  // Initial Investment
STO 0
0
STO 5
1
STO 2
RCL 0
CHS
RTN
-----------------------------------
LBL B  // I(%)
EEX 
2
÷
STO 1
LSTx
x
RTN
----------------------------------
LBL C  // Numbers of equal cash flow
STO 2
RTN
----------------------------------
LBL D  // NPV
STO 3
1
RCL 1
+
RCL 2
STO+5
Y^X
STO 4
RCL 0
x
RCL 4
1
-
RCL 1
÷
RCL 3
x
+
STO 0
1
RCL 1
+
RCL 5
Y^X
÷
1
STO 2
Rv
RTN
-----------------------------------------------------
LBL E    // Review # of Cash Flow
RCL 5
RTN

Registers

R0: NPV
R1: i / 100
R2: # of equal CF
R3: CF
R4: (1+n)^n
R5: Σn
R6-R9: Unused

Example:

Company needs a new photocopier and is considering leasing the equipment
as an alternative to buying. The end of the year net cost of each option is:

Purchase

Year Net Cash Cost
1 533
2 948
3 1,375
4 1,815
5 2,270

Total Net Cash Cost 6,941

-------------------------------------------------------

Lease

Year
1 1,310
2 1,310
3 1,310
4 1,310
5 1,310

Total Net Cash Cost 6,550

----------------------------------------------------
Looking at the total cost, leasing appears to be less, But purchasing
costs less the first two years. He known that he can make a 15% return
on every dollar he puts in the business; the sooner he can reinvent money,
the sooner he earn 15%. Therefore, he decides to consider the timing of the
costs, discounting the cash flows at 15% to find the present value of the
alternatives. Which options should he choose?
------------------------------------------------------

Purchase:
0 [A]
15 [B]
533 [D] 948 [D] display 1,180.30
1375 [D] 1815 [D] display 3,122.12
2270 [D] answer 4,250.71

Lease:
0 [A] 5 [C] 1310 [D] answer 4,391.32

-----------------------------------------------------
Leasing has a present value of 4391.32, while purchasing has a
present value of 4250.71.
Since these are both expense items, the lowest present value is the most
desirable. So, in this case, purchasing is the least costly alternative.
-----------------------------------------------------

Gamo
Find all posts by this user
Quote this message in a reply
09-25-2018, 01:28 PM
Post: #2
RE: (11C) Purchase or Lease
(09-25-2018 10:24 AM)Gamo Wrote:  Company needs a new photocopier and is considering leasing the equipment
as an alternative to buying. The end of the year net cost of each option is:

Purchase

Year Net Cash Cost
1 533
2 948
3 1,375
4 1,815
5 2,270

Is the numbers reversed ?
Normally it cost more (mainly depreciation) at the beginning
I would use the copier for 1 year, sell it, and buy another Big Grin

If numbers are allowed to input backwards, NPV can be much simpler, with Horner's rule:
Discount rate = 1.15 (stored in memory 0):

2270 RCL-0 /
1815 + RCL-0 /
1375 + RCL-0 /
948 + RCL-0 /
533 + RCL-0 /

We get the same NPV of 4250.71, without using X^Y
Find all posts by this user
Quote this message in a reply
09-25-2018, 04:27 PM (This post was last modified: 09-25-2018 04:29 PM by Dieter.)
Post: #3
RE: (11C) Purchase or Lease
(09-25-2018 10:24 AM)Gamo Wrote:  This program is the "Discount Cash Flow Analysis" to find NPV or
Net Present Value.

Yes, it's a regular NPV program. Not a special program to assess buy-or-lease decisions. Maybe you should explain how the program is used: what exactly do the A, B, C and D keys do and what is the input and output?

(09-25-2018 01:28 PM)Albert Chan Wrote:  If numbers are allowed to input backwards, NPV can be much simpler, with Horner's rule:
Discount rate = 1.15 (stored in memory 0):

2270 RCL-0 /
1815 + RCL-0 /
1375 + RCL-0 /
948 + RCL-0 /
533 + RCL-0 /

I assume that "RCL–0" does not really mean RCL–0 (recall arithmetic, not supported by the 11C) but simply "RCL 0". ;-)

Yes, the Horner method works nicely here, but why do you want to do it this complicated?

1,15 [1/x] [ENTER] [ENTER] [ENTER]
2270 [x]
1815 [+] [x]
1375 [+] [x]
948 [+] [x]
533 [+] [x]

=> 4250,71

Good old RPN practice. ;-)

(09-25-2018 01:28 PM)Albert Chan Wrote:  We get the same NPV of 4250.71, without using X^Y

Even without RCL 0 and less keystrokes. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
09-25-2018, 06:36 PM
Post: #4
RE: (11C) Purchase or Lease
(09-25-2018 04:27 PM)Dieter Wrote:  Yes, the Horner method works nicely here, but why do you want to do it this complicated?

1,15 [1/x] [ENTER] [ENTER] [ENTER]
2270 [x]
1815 [+] [x]
1375 [+] [x]
948 [+] [x]
533 [+] [x]

=> 4250,71

Good old RPN practice. ;-)

With this, there is no need for a cash flow program Smile

I use RCL 0 because of "/"
Multiply flipped rate (rounded) might accumulate too much errors.

There is no reason to inisist for NPV, it is more accurate to do FV.
For purchase / lease decisions, FV comparison is just as good.
With FV, reversed cash flow input is not needed.

1.15 [ENTER] [ENTER] [ENTER]
533 [x]
948 [+] [x]
1375 [+] [x]
1815 [+] [x]
2270 [+]

=> FV (year 5) = 8549.70

If NPV is needed, just "pull back" numbers to Year 0:

[X<>Y] 5 [Y^X] [/]

=> NPV (year 0) = 4250.71
Find all posts by this user
Quote this message in a reply
09-26-2018, 02:11 AM (This post was last modified: 09-26-2018 02:26 AM by Gamo.)
Post: #5
RE: (11C) Purchase or Lease
Program information is updated.

Added LBL E for review of how many Cash Flow

This program is very compact for NPV solver and
easy to use.

Press A for initial investment
Press B for interest in percent
Press C for number of same amount of continue CF
Press D for NPV
Press E for review of how many CF

Gamo
Find all posts by this user
Quote this message in a reply
09-26-2018, 05:40 AM
Post: #6
RE: (11C) Purchase or Lease
(09-26-2018 02:11 AM)Gamo Wrote:  Press A for initial investment
Press B for interest in percent
Press C for number of same amount of continue CF
Press D for NPV
Press E for review of how many CF

You forget an essential point:
Where and how to enter the cash flows. ;-)

As far as I can see you enter the CF, press [D] and the NPV for all cash flows up to that one is returned.

So it's:

Enter initial investment, press [A]
Enter interest rate in percent, press [B]
If there is a number of continuous identical cash flows, enter this number and press [C] (else 1 single CF is assumed)
Enter cash flow, press [D], see NPV up to that period
Continue with all other cash flows.

But please correct me if I'm wrong.

Dieter

Dieter
Find all posts by this user
Quote this message in a reply
09-26-2018, 07:37 AM (This post was last modified: 09-26-2018 09:35 AM by Gamo.)
Post: #7
RE: (11C) Purchase or Lease
Dieter
Yes that correct.

Here is another example from 12C Owner's Handbook on page 62
This example is not about purchase or lease matter.
Below example show how to input data.

An investor has an opportunity to purchase a piece of property for 79,000;
and he would like 13.5% return. He expects to be able to sell it after 10 years

for 100,000 and anticipates the yearly cash flows in the table below:

Year Cash Flow
1 14,000
2 11,000
3 10,000
4 10,000
5 10,000
6 9,100
7 9,000
8 9,000
9 4,500
10 100,000

Keystrokes: FIX 2

79000 [CHS] [A] display 79000.00 // Initial Investment
13.5 [B] display 13.50 // Interest
14000 [D] display -66665.20
11000 [D] display -58126.32
3 [C] 10000 [D] display -39952.08 // 3 [C] is three continue identical cash flows
9100 [D] display -35695.45
2 [C] 9000 [D] display -28718.37 // 2[C] is two continue identical cash flows
4500 [D] display -27278.75
100000 [D] display 907.77 // Last cash flow show final result of NPV

[E] display 10 // check for how many cash flows this case is 10 Cash Flows

NPV is 907.77

Since NPV is positive, the investment would increase the financial value
of the investor's assets by 907.77

Gamo
Find all posts by this user
Quote this message in a reply
09-26-2018, 12:53 PM
Post: #8
RE: (11C) Purchase or Lease
(09-26-2018 07:37 AM)Gamo Wrote:  An investor has an opportunity to purchase a piece of property for 79,000;
and he would like 13.5% return. He expects to be able to sell it after 10 years
for 100,000 and anticipates the yearly cash flows in the table below:

Year Cash Flow
1 14,000
2 11,000
3 10,000
4 10,000
5 10,000
6 9,100
7 9,000
8 9,000
9 4,500
10 100,000

... NPV is 907.77

What is the actual NPV (with all digits) ?
Exact NPV (10 places) should be 907.76893 37698

HP-12C, Horner's for NPV (cash-flow input in reverse)
Multiply flipped rate => 907.76891 00
Divide discount rate => 907.76893 00

HP-12C, Horner's for FV, then back to NPV => 907.76892 51

HP-12C build-in CFj/Nj code => 907.76893 37 ... Amazingly Good

How does HP-12C code get it so close ?
My guess is calculations all done in 13 internal digits, only 1 rounding for the NPV result ...
Find all posts by this user
Quote this message in a reply
09-26-2018, 06:59 PM
Post: #9
RE: (11C) Purchase or Lease
(09-26-2018 12:53 PM)Albert Chan Wrote:  HP-12C, Horner's for NPV (cash-flow input in reverse)
Multiply flipped rate => 907.76891 00
Divide discount rate => 907.76893 00

Hey, that's a difference of 0,002 Cents!!!!1111eleven!!!

(09-26-2018 12:53 PM)Albert Chan Wrote:  HP-12C, Horner's for FV, then back to NPV => 907.76892 51

HP-12C build-in CFj/Nj code => 907.76893 37 ... Amazingly Good

How does HP-12C code get it so close ?

Simple. Since 1976 most HPs use three additional guard digits for their internal functions. So the 10-digit 12C internally works with 13 digits. Only this way the usual 10-digit accuracy for scientific or financial functions can be achieved. Well, mostly, but not always. Try the infamous 3201 example on a regular 10-digit HP. ;-)

(09-26-2018 12:53 PM)Albert Chan Wrote:  My guess is calculations all done in 13 internal digits, only 1 rounding for the NPV result ...

That's the main reason. But there is more. As far as I remember the financial calculators have special internal functions that evaluate (1+i)n and (1+i)n–1 with higher accuracy. I assume this means they have something like ln(1+x) and ex–1 implemented so that these expressions can be accurately calculated even for small interest rates. There is a nice example in the HP15C Advanced Functions Handbook that shows what happens when these expressions are evaluated with standard functions.

Dieter
Find all posts by this user
Quote this message in a reply
09-27-2018, 01:23 AM
Post: #10
RE: (11C) Purchase or Lease
Albert Chan

Just put this program on a real HP-11C

The full digits answer NPV answer on 11C is 907.7689308

Answer on 12C Owner's Handbook is 907.77

I think for businesses two digits is more than enough. Wink


Gamo
Find all posts by this user
Quote this message in a reply
09-30-2018, 05:45 PM (This post was last modified: 09-30-2018 05:49 PM by Dieter.)
Post: #11
RE: (11C) Purchase or Lease
(09-25-2018 10:24 AM)Gamo Wrote:  This program is the "Discount Cash Flow Analysis" to find NPV or
Net Present Value.

This program was from the HP-11C Solutions Handbook

For the record: here is a slightly modified program. The math has been streamlined a bit, the current NPV value can always be recalled with a simple RCL 0, the user may enter CF0 and the interest rate in any order, and finally only R0...R3 are used.

Code:
001 LBL A
002 STO 0
003 GTO 0
004 LBL B
005 1
006 X<>Y
007 %
008 STO 1
009 LstX
010 LBL 0
011 1
012 STO 2
013 CLX
014 STO 3
015 R↓
016 FIX 2
017 RTN
018 LBL C
019 STO 2
020 RTN
021 LBL D
022 RCL 1
023 1
024 +
025 RCL 2
026 STO+3
027 y^x
028 1
029 -
030 RCL 1
031 ÷
032 RCL 1
033 1
034 STO 2
035 +
036 RCL 3
037 y^x
038 ÷
039 x
040 STO+0
041 RCL 3
042 RCL 0
043 RTN

Registers:
R0: accumulated NPV
R1: i%/100
R2: number of consecutive identical CFs (default: 1)
R3: total number of periods

Usage:
Enter CF0 (with correct sign) and press [A]
Enter interest rate and press [B]

For all cash flows:

Optional:
Enter CF frequency and press [C]

Enter CF (with correct sign) and press [D]
=> NPV for all cash flows up to this one
Press [X⇄Y] to see the number of periods

Example:
–10000 [A]
3,5 [B]

2000 [D] => –8067,63
3 [C] 3000 [D] => 53,05
1000 [D] => 895,03

[X⇄Y] 5

So after 5 years the NPV is 895,03.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)