Post Reply 
(11C) Purchase or Lease
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 


Messages In This Thread
(11C) Purchase or Lease - Gamo - 09-25-2018, 10:24 AM
RE: (11C) Purchase or Lease - Albert Chan - 09-25-2018, 01:28 PM
RE: (11C) Purchase or Lease - Dieter - 09-25-2018, 04:27 PM
RE: (11C) Purchase or Lease - Albert Chan - 09-25-2018, 06:36 PM
RE: (11C) Purchase or Lease - Gamo - 09-26-2018, 02:11 AM
RE: (11C) Purchase or Lease - Dieter - 09-26-2018, 05:40 AM
RE: (11C) Purchase or Lease - Gamo - 09-26-2018, 07:37 AM
RE: (11C) Purchase or Lease - Albert Chan - 09-26-2018, 12:53 PM
RE: (11C) Purchase or Lease - Dieter - 09-26-2018, 06:59 PM
RE: (11C) Purchase or Lease - Gamo - 09-27-2018, 01:23 AM
RE: (11C) Purchase or Lease - Dieter - 09-30-2018 05:45 PM



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