Post Reply 
(12C) Financial Management Rate of Return - FMRR
06-20-2019, 05:22 PM (This post was last modified: 06-20-2019 06:53 PM by Joe_H.)
Post: #1
(12C) Financial Management Rate of Return - FMRR
I went through a program I wrote some days ago to calculate the Modified IRR of a proposed investment cashflow (https://www.hpmuseum.org/forum/thread-13...=%2812c%29). This is seen as an improvement on standard IRR as the investment returns are not compounded at the rate of return of the investment itself but rather a more normal rate of return that the company normally makes (i.e. IRR is often too optimistic). A 'criticism' of MIRR is that the investment outflows in the future (i.e. negative net cashflows in the CF sequence) get discounted back to the present whereas it is argued they really should be funded by intermediate positive cashflows in the sequence. This means they shouldn't be discounted back to the present but only as far back as the next positive cashflow. This is called the Financial Management Rate of Return (FMRR) and is used in the finance industry, particularly in real estate for some reason. The only financial desktop calculator model that calculates it, that I know of, is the HP-30b of which I am a proud owner since around 2011. The TI BAII+ Professional doesn't calculate it and no other one I can find, so it appears it isn't available in any current models. So, enter the 1981 HP-12C which will out perform the rest of the currently available financial models on the market!

Given the difficulty I had with stackrobatics in the MIRR program, I knew that this more complex algorithm was unlikely to be do-able without use of R registers (most are used in the CF itself). Like the MIRR program, the R0-R6 are the CF and I used R7&8 for the interest variables. That gives me 85 steps to get it all done.

Code:

// Financial Management Rate of Return (FMRR) for HP-12C - written by Joe Henry, Dublin - June 2019
// TVM registers are n = {set by CF entry}, [i] = safe/WACC rate i%, PV = 0, PMT = Re-investment rate i*%, FV = 0
// X has the total number of cashflow periods N (different from n if any Nj's > 1)
// R0-R6 are used to store the cashflow series; R7=1.i; R8=1.i*; R9-R.9=used for program


01 RCL PMT
02 EEX
03 2
04 /
05 1
06 +
07 STO 8                // 1.i* 
09 STO PMT        // Store N here it will be used as N-N'
10 RCL i
11 EEX
12 2
13 /
14 1
15 +
16 STO 7        // 1.i
17 0
18 STO i        // Set N' to 0
19 STO PV        // Set PV & FV accumulators to 0
20 STO FV        // nothing on stack for start of loop
21 RCL g Nj        // ::5 - ***** Start of main outer loop ******
22 RCL g CFj    
23 RCL PV        // ::2 - ****** Start of inner loop ****** stack: PV, CFj, Nj
24 X/Y                // swap PV & CFj
25 +                // Add this year's CFj to accumulated PV (new var called PV') 
26 STO PV              // temporary storage of PV' to re-arrange stack
27 g LSTx            // !!! this overwrites PV in X stack: CFj, Nj
28 X/Y
29 RCL PV            // stack: PV',Nj, CFj,- 
30 0                // if PV' is 0 or positive
31 x<=y?
32 g GTO 43         // goto ::1 - positive PV' [1]
33 Rv                    // negative PV' - remove 0; stack: PV', Nj, CFj
34 RCL PMT                // recall N-N' to check if zero
35 x=0?
36 g GTO 41                // goto ::6 N-N'=0 so don't discount [2]
37 Rv                    // discounting here as N>0
38 RCL 7                // recover 1.i and discount it 1 period
39 /
40 0                    // Padding so PV' ends at top of stack after Rv below 
41 Rv                    // ::6 if N-N'=0 come to here
42 g GTO 54                // goto ::2 - common section to + & -    [3]    
43 Rv                // ::1 - Start of positive PV' stack after this exec: PV', Nj, CFj, 0            
44 STO PV                // temporary storage of PV' in [PV]
45 RCL 8                // 1.i*  !!! this overwrites PV in X
46 RCL i                // N' stack: N', 1.i*, Nj, CFj
47 y^x                    // Future value factor for N' periods
48 RCL PV                // get PV' back on stack: PV', factor, Nj, CFj
49 *                    // Get future value of this year's cashflow PV'*factor (call it FV')
50 RCL FV                // Add FV' to FV accumulator
51 +
52 STO FV                // last part of specific positive loop stack: FV, Nj, CFj
53 0                    // reset PV to zero stack: 0, FV, Nj, CFj
54 STO PV            // :: 2 - Common inner loop section stack: PV' or FV', Nj, CFj        
55 RCL i                // Recall N'  !!! N' over writes FV'/PV' in X
56 1                    // Increase N' by 1 and store
57 +
58 STO i
59 RCL PMT                // Reduce N-N' by 1 and store
60 1
61 -
62 STO PMT
63 1                    // Reduce Nj by 1 and check if 0  !!! this over writes the N in X 
64 -
65 x=0?
66 g GTO 69                // goto ::3 - Nj=0 then go to outer loop [4]
67 X/Y                    // set up stack: CFj, Nj-1
68 g GTO 23            // goto ::2 - start inner loop  [5]
69 RCL n        // ::3 - end of outer loop starts here
70 1
71 CHS
72 X/Y
73 x<=y?        // if n=-1 then at end of cashflow
74 g GTO 76        // goto ::4 - carry out the final stages with PV, FV and N [6]
75 g GTO 21        // goto ::5 - back to start of outer loop        [7]
76 RCL i        // ::4 - n=-1, i=N+1, PV-ok, pmt=-1, FV-ok
77 1            // N' is N + 1
78 -
79 STO n        // Place N into [n]
80 0
81 STO PMT        // payment needs to be 0 but is -1
82 i            // Calculate i for the N,PV,0,FV and store in [i]

I'll put some results in the next post.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Financial Management Rate of Return - FMRR - Joe_H - 06-20-2019 05:22 PM



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