(12C) Discounted Payback Period Program
|
06-10-2019, 09:32 PM
Post: #1
|
|||
|
|||
(12C) Discounted Payback Period Program
For the CFA exams one of the reasons most commonly quoted for preferring the TI BA II is that the HP12C cannot do discounted payback calculations (or simple ones either). In another thread (https://www.hpmuseum.org/forum/thread-10385.html) Carson has written a program to do payback calculations and I had mistakenly thought at first they were discounted ones but they are simple payback periods only. I therefore set out to write such a program and it is now working successfully.
It is a challenging program to write as none of the TVM registers can be used (they are required for the NPV calculations the programs uses) or the R registers as these may be used for the cashflow sequence itself. Therefore, the only available registers are X, Y, Z and L (T isn't used). The program uses n for the cashflow sequence (auto generated when cashflow is entered), i for the discount rate and the X register (display) has to have the total number of payments in the sequence (excl. CF0). The program takes into account the Nj values at each step in the cashflow sequence. The program can do discounted or simple payback calculations. For simple payback period just set i to zero. If redoing the calculation (say simple first and then discounted or different discount rates) Nj values greater than 1 may have to be reset to the correct value and n will have to be reset. It is quick and easy to reset these when you're familiar with entering and editing cashflow sequences on the HP12C (need to be for CFA exams). I have a 3rd edition HP12C (Chinese one 2 cells model HSTNJ-KN05 same as 30th anniv edition but that text isn't on the face purchased around 2010/11) and it runs on lengthy cashflows in well less than a second. The program and other details are in the attached pdf. Let me know how you get on with it. |
|||
06-10-2019, 10:47 PM
Post: #2
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
(06-10-2019 09:32 PM)Joe_H Wrote: For the CFA exams one of the reasons most commonly quoted for preferring the TI BA II is that the HP12C cannot do discounted payback calculations (or simple ones either). In another thread (https://www.hpmuseum.org/forum/thread-10385.html) Carson has written a program to do payback calculations and I had mistakenly thought at first they were discounted ones but they are simple payback periods only. I therefore set out to write such a program and it is now working successfully. It's unlikely I will ever need such a calculation, and I'm 100% certain I'll never take the CFA exam, but I WILL enter it in a 12C to dabble, just because of the beautiful documentation; it's a lot like using an old school HP manual. I look forward to the stackrobatics too, always fun to explore. Thanks for sharing this Joe! --Bob Prosperi |
|||
05-11-2021, 09:48 AM
Post: #3
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
Hi Joe, thanks for your hard work and for creating the payback period program. Could you please detail the steps of the example with the keystrokes sequence? ( sorry I am not getting the correct answer!)
Example - Simple payback so I =0 Initial investment 1000 Year 1 200 Year 2 300 Year 3 800 Year 4 200 Year 5 600 In this case, how do I enter the data in HP 12c? I tried the following: f-REG -1000 g CFo 200 g CFj 300 g CFj 800 g CFj 200 g CFj 600 g CFj 0 i 5 R/s I got answer 1.4 but that's not correct. Could you please advise me. i hope, for discounted payback, the only difference is with the value of i. Thanks a lot for your efforts. |
|||
05-11-2021, 10:07 AM
Post: #4
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
Hi Joe,
One clarification please on your program for calculating the payback period in HP 12 c In step 37 you mentioned that {divided by key}, could you please details what should I type for this after pressing the divide sign. sorry to bother you and asking basic questions. thanks Joe. RajMohan |
|||
05-11-2021, 12:50 PM
Post: #5
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
rajmohanpr, sorry I don't recall exactly how to enter the cashflow. Remember that the Nj's get changed if more than 1 if you do a calculation and have to be reset to the correct value.
After the divide sign just follow the rest of the program as indicated. Joe |
|||
05-11-2021, 04:00 PM
Post: #6
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
rajmohanpr,
I programmed in the program exactly as in the attached sheet and entered your cashflow. For simple payback (i=0%) I got 2.625 which is correct. For i=10% I got 2.948... which looks about right. Make sure you entered the program correctly. Just press the keys as in the programming guide and don't press enter between them. The guide shows what should be on the screen at each step. To run a calculation enter the cashflow as per the HP12C guide (note positive and negative for investment and returns). As Nj is 1 in your cashflow at every step it is straightforward. n should now be 5 (check with RCL n). Enter 0 for i. Enter 5 on the screen (don't press enter) - this is the total number of cashflow steps (check guide for n versus N - same in your case). Now press R/S and 2.625 should appear on your screen. (Make sure n is set to 5 as it changes when program is run and set N on screen before pressing R/S. Joe |
|||
05-11-2021, 04:11 PM
Post: #7
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
rajmohanpr,
I see your confusion in the program. Ignore the text {divided by key} and just hit that top right key. I was trying to make sure people didn't mistake it for the + key. Joe |
|||
05-11-2021, 04:54 PM
Post: #8
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
rajmohanpr,
Also, I just recalled there are a few subtle differences between the different models of HP12C around stack popping after operations etc. It is possible that could be the issue. Please note my edition of HP12C in the first post in this thread. There are some posts on this around on this forum which should help (I have a few on HP12C v HP12C+). First, re-enter the program and make sure you set up the cashflow correctly. After that, see if it is a subtle calculator edition issue. Joe |
|||
05-18-2021, 12:40 PM
Post: #9
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
(06-10-2019 09:32 PM)Joe_H Wrote: For the CFA exams one of the reasons most commonly quoted for preferring the TI BA II is that the HP12C cannot do discounted payback calculations (or simple ones either). What a lovely piece of work. Well done, Joe. Like others, I will never sit the CFA exam because I'm an engineer and near the end of my career. But I can still appreciate a beautiful piece of work. Best... |
|||
11-25-2022, 10:08 PM
Post: #10
|
|||
|
|||
RE: (12C) Discounted Payback Period Program
Hi Joe,
Thanks alot your post here help me make a buying decision. I just bought the Chinese HSTNJ-KN05 also without the 30th Anniverary text which worried me. As somoen else said that was the model to get due to being better made. Was also bothered it said it takes one CR2032 but the view of the back case battery slot looks right for two. I watched a video that said they have two battery slots but only need one to run. I am after the HP12C+ version as it's the faster one like you says does the lengthy calcs in a second but still has the nice retro look. "I have a 3rd edition HP12C (Chinese one 2 cells model HSTNJ-KN05 same as 30th anniv edition but that text isn't on the face purchased around 2010/11) and it runs on lengthy cashflows in well less than a second." This post only 2021 I'd imagine you still have yours. Regards Daniel (06-10-2019 09:32 PM)Joe_H Wrote: For the CFA exams one of the reasons most commonly quoted for preferring the TI BA II is that the HP12C cannot do discounted payback calculations (or simple ones either). In another thread (https://www.hpmuseum.org/forum/thread-10385.html) Carson has written a program to do payback calculations and I had mistakenly thought at first they were discounted ones but they are simple payback periods only. I therefore set out to write such a program and it is now working successfully. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)