Thursday, May 10, 2018

HP Prime: Combined Internal Rate of Return


HP Prime: Combined Internal Rate of Return

Introduction

An investor has several projects, each with their own initial investments and discount rate.  The net present value is calculated (NPV) for each project.  If the investor combined all the projects into one set of cash flows, what is the effective internal rate of return (IRR)?  The program COMBIRR tackles this question.

For example, an investor has the following projects, each lasting five years:

Project A:  NPV:  -$3,500, discount rate: 10%
Project B:  NPV:  $18,000, discount rate: 12%
Project C:  NPV:  $20,000, discount rate: 9%

If the investor combines all three projects, what would be the combined internal rate of return?  I use the following steps:

1. Calculate the NUS (net utility stream) of each project.  Since we are only given the net present value in this case, will need to determine a payment flow.  The NUS calculates the cash flow of each year, assuming they are equal.  Setup:  N = number of years, I/YR = discount rate, PV = -NPV, FV = 0, P/Y = 1.

2.  Combine the present values from each project, along with net utility streams calculated from each project.  Calculate IRR.  Setup:  CF0 = -ΣNPV, Cash Flows = ΣNUS, frequency length of project

This procedure, like the program COMBIRR, assumes that each project has the same length.  With some adjustments, you can calculate combined IRR using projects of the same length.

Going back to our example:
 
Project A:  NPV:  -$3,500, discount rate: 10%, NUS: -$569.61
Project B:  NPV:  $18,000, discount rate: 12%, NUS: $3,185.71
Project C:  NPV:  $20,000, discount rate: 9%, NUS: $3,116.40

ΣNPV:  $34,500, ΣNUS:  $5,732.50

Calculate IRR with CF0 = -34500.00, Cash Flows:  5,732.50 with a frequency of 5

Result:  10.49  (Combined IRR: 10.49%)

How to Run COMBIRR:

1. Enter the length of each of the projects.  COMBIRR assumes each project has the same length.

2.  Enter the NPV and discount RATE for the first project.  Each time the program will ask you “ENTRY?”.  Select YES for additional entries, NO to stop entering amounts.

3.  The combined IRR is calculated. 

HP Prime Program: COMBIRR

sub1(); // data subroutine

EXPORT COMBIRR()
BEGIN
// EWS 2018-05-10
// Combined IRR using
// same length projects

// initialize
LOCAL L1,U,T,L,C;
LOCAL h,N,I;

// input
INPUT(L,"Number of Periods",
"LEN: ");

// entry routine
REPEAT
L1:=sub1(); N:=L1(1); I:=L1(2);
T:=T-N;
U:=U+Finance.TvmPMT(L,I,−N,0,1);
CHOOSE(h,"ENTRY?","YES","NO");
UNTIL h==2;

// calculate combined IRR
C:=Finance.CashFlowIRR(
{T,{U,L}},1);
RETURN C;

END;

// data entry subroutine
sub1()
BEGIN
LOCAL x1,x2;
INPUT({x1,x2},"Data Entry",
{"NPV: ","RATE: "});
RETURN {x1,x2};
END;

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.