This series of posts was inspired by and/or modified in part from the methods for performance metrics for private equity investments by Karl Polen

https://www.nbr.co.nz/

1 IRR

As a consequence of senility, I still feel I do not understand this debate on the various interpretations people might have regarding \(IRRs\) and the reinvestment of withdrawals in private equity (PE) investments. I could be wrong but those that say there is an implicit reinvestment assumption, when using \(IRR\) to calculate performance metrics never seem to justify that claim.

I always thought a simple \(IRR\) assumes you are investing in something that has a constant return over the life of the investment \(\dots\) my understanding goes like this:

  • You invest \(\$10M\).
  • You withdraw \(\$5M\) at the end of the first year.
  • At the end of \(3\) years, your portfolio is worth \(\$7M\).
  • What’s your annual return?

The \(\$10M\) should be worth \(10 \times (1+x)^3\) after \(3\) years. After \(1\) year you withdraw \(\$5M\), so that’s money that don’t earn nothing. So we’d have \(10 \times (1+x)^3 - 5 \times (1+x)^2\) after \(3\) years. That’s equal to the \(\$7M\) final portfolio value \(\dots\) so to find the annual Rate of Return (\(IRR\)) we must solve:

\[10 \times (1+x)^3 - 5 \times (1+x)^2 = 7\] The solution turns out to be \(x = IRR = 0.0896\) or \(8.96\%\). So that \(5 \times (1+x)^2\) represents money without the \(x\%\) return, right? That’s what I would have said, but consider this:

  • You invest \(\$10M\).
  • After one year, you withdraw \(\$5M\), so your portfolio is now worth \(10 \times (1+x) - 5\).
  • This portfolio balance of \(10 \times (1+x) - 5\) is allowed to remain, earning an annual return of \(x\%\) for another \(2\) years.
  • At the end of \(3\) years, your portfolio is worth \(\$7M\).
  • What’s your annual return?

We would have:

\[10 \times (1+x) - 5 \times (1+x)^2=7\] That’s the \(1\)-year balance, invested for another \(2\) years at \(x\%\) per year. But what did you do with the \(\$5M\) you withdrew? If you bought a Yacht, it vanished (financially speaking) and your return would be the solution to the equation above, namely \(8.96\%\).

Suppose, instead of buying a Yacht, you withdrew that \(\$5M\) and put it in your checking account. It then becomes part of your final portfolio, so our equation would now be:

\[10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\]

The solution turns out to be \(x = 0.258\) or \(25.8\%\). Indeed, if you actually invested that \(\$5M\) at some annual return \(r\%\) for the remaining \(2\) years, that would be part of your final portfolio. We would then have:

\[10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\] Note that, if \(r = 0\), it’s the same equation as:

\[10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\]

If \(r = 0.04\) or \(4\%\), the solution turns out to be \(x = 0.270\) or \(27.0\%\).

Okay, so what’s your \(IRR\)? Take your pick. Note that this ritual described above (to calculate \(IRR\)) could also be presented like so:

  • You invest \(A_1\). In a year it would be worth \(A_1\times(1+x)\).

  • Then you withdraw \(A_2\), so your portfolio is now worth (after \(1\) year): \(P_1 = A_1 \times (1+x) - A_2\).

  • After \(2\) years, your portfolio balance is \(P_1 \times (1+x)\).

  • Now you invest another \(A_3\).

  • Your portfolio balance becomes (after \(2\) years): \(P_2 = P_1\times(1+x) + A_3 = A_1\times(1+x)^2 - A_2\times(1+x) + A^3\).

  • In another year, you withdraw \(A_4\).

  • The portfolio balance is then (after \(3\) years): \(P_3 = A_1\times(1+x)^3 - A_2\times(1+x)^2 + A_3\times(1+x) - A_4\).

  • Suppose that, after \(4\) years, your portfolio is worth \(P_4\).

  • Then:

\[A_1\times(1+x)^4 - A_2\times(1+x)^3 + A_3\times(1+x)^2 - A_4\times(1+x) = P_4\] \(\dots\) and you gotta solve for \(x = IRR\).

But the \(IRR\) value of \(8.96\%\) overestimates your “actual” annual return (using the above example):

  • You invest \(\$10M\).
  • You withdraw \(\$5M\) at the end of the first year.
  • Your portfolio is worth \(\$7M\) at the end of \(3\) years so you have \(\$5M + \$7M = \$12M\) in your pocket.
  • You started with \(\$10M\) so your \(3\)-year gain factor is \(12/10 = 1.2\).
  • That’s over \(3\) years which implies an annual return of \(1.21/3 - 1 = 0.0627\) or \(6.27\%\).

That means that the higher \(IRR\) return implies that you reinvested the \(\$5M\) withdrawal at the \(IRR\) rate. That reinvestment gave you that higher \(IRR\) return.

Suppose I put the \(\$5M\) in my checking account. What then? It wouldn’t be reinvested, right? That’s right \(\dots\) and you would have \(\$12M\) after \(3\) years and your annual return would be \(6.27\%\). But if I withdrew \(\$5M\) then immediately reinvested it at the same rate as the original \(\$10M\), then \(\dots\). Then it’s like not withdrawing it at all. You would have an initial \(\$10M\) ending up worth \(10\times(1+r)^3\dots\) for some \(r-value\).

For example, at \(r = 8.96\%\) (that’s \(IRR\)) it would be \(\$12.9M\) and at \(r = 6.27\%\) (that’s without reinvesting) it would be \(\$12M\). Henence, if you did NOT reinvest the withdrawal (but put the \(\$5M\) withdrawal in your checking account), your final portfolio would be worth \(\$12M\). If you reinvested at the \(IRR\) rate of \(8.96\%\), your final portfolio would be worth \(\$12.9M\) (not \(\$7M\)).

The \(3\)-year gain factor is \(1.2936\) so the annual gain factor would be \(1.29361/3 = 1.0896\) which means an annual return of \(8.96\%\). So \(IRR\) does imply reinvestment at the \(IRR\) rate, right? But remember, I got that final portfolio of \(\$12.9M\) by assuming that the withdrawals were invested at the \(IRR\) rate. So it’s not surprising that we conclude that the withdrawal is invested at the \(IRR\) rate. However, if (after \(1\) year) we withdrew \(\$5M\) then immediately reinvested it at the same rate, we would get:

  • The \(\$10M\) is worth \(10\times(1+x)\) after \(1\) year.
  • We withdraw \(\$5M\) then immediately put it back in, giving \(10\times(1+x) - 5 + 5\).
  • Another \(2\) years (at the same rate) and we would have \(10\times(1+x) - 5 + 5\times(1+x)^2\) or \(10\times(1+x)^3 = 7\).

Your \(\$10M\) ends up being worth a measly \(\$7M\)? Yes \(\dots\) and that’s a negative annual return of \(-11.2\%\). You started with \(\$10M\) and end up with \(\$7M\). That’s a loss..but you said that, if you reinvest the \(\$5M\) withdrawal at \(r\%\), the equation is:

\[10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\]

Above, put \(r = x\) and you do not get:

\[10\times(1+x)^3 = 7\]

That’s because it assumes you withdrew \(\$5M\) then immediately invested at some rate independent of \(IRR\). The resultant equation, namely \(10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\), gives \(x = \text{actual return on investment}\).

So it’s not IRR? No, it’s whatever is the solution to \(10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\).

Remember that \(IRR\) is (by definition) the solution to \(10 \times (1+x)^3 - 5 \times (1+x)^2 = 7\). On the other hand, \(10\times(1+x)^3 = 7\) assumes you withdraw from your portfolio then immediately put it back in. Your actual return is whatever is the solution to \(10\times(1+x)^3 = 7\).

Let’s recap:

  • \(IRR\) (by definition) is the solution to \(10 \times (1+x)^3 - 5 \times (1+x)^2 = 7\).

  • If you withdrew \(\$5M\) and burned that withdrawal money (or bought a Yacht), your return would be the solution to \(10 \times (1+x)^3 - 5 \times (1+x)^2 = 7\). That’s \(IRR\).

  • If you reinvest \(\$5M\) at a \(0\%\) rate and assume the final portfolio is \(\$12M\) you get the \(6.27\%\) return. That’s the solution to \(10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\), namely \(25.8\%\).

  • If you reinvest at some (unknown) rate \(x\) (the same as the original investment) and assume the final portfolio is \(\$7M\), you get a negative return. That’s like withdrawing \(\$5M\) then immediately putting it back in your portfolio. Your return is the solution to \(10\times(1+x)^3 = 7\).

  • Now you reinvest at the \(IRR\) rate (putting the withdrawal in some other investment account so as not to confuse it with the original account).

The balance in that other account must be added to the \(\$7M\) in the original portfolio, giving you a final balance of \(7+5\times(1+IRR)^2\). You get a return which is the solution to

\[10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\]

with \(r = IRR\), namely \(28.4\%\).

To summarize be careful what you stick in for your final portfolio value and where you invest the withdrawals. The \(IRR\) gives you the solution to \(10 \times (1+x)^3 - 5 \times (1+x)^2 = 7\) and the solution turns out to be \(x = IRR = 0.0896\) or \(8.96\%\). But it would give the annual return if your final portfolio is just \(\$7M\) and you spend the withdrawals on a Yacht.

Let’s consider the general case:

  • There’s an initial investment in a portfolio \(P\), namely \(A_0\), and are several others: \(A_1\), \(A_2\), \(\dots\) they occur at times \(t_1\), \(t_2\), \(\dots\)

  • There are also several withdrawals: \(B_1\), \(B_2\), \(\dots\) which occur at times \(z_1\), \(z_2\), \(\dots\). They are invested in some other portfolio \(Q\) at investment rates \(r_1\), \(r_2\), \(\dots\)

  • After \(n\) years your portfolio P is worth $K. Then:

\[\text{[P] }\{A_0\times(1+x)^n + A_1\times(1+x)^{n-t_1} + A_2\times(1+x)^{n-t_2} + \dots\} - \{ B_1\times(1+x)^{n-z_1} + B_2\times(1+x)^{n-z_2} + \dots \} = K\] The solution is \(x = IRR\) (whatever that turns out to be). Wait! It is just equation \(A_1\times(1+x)^4 - A_2\times(1+x)^3 + A_3\times(1+x)^2 - A_4\times(1+x) = P_4\) but with different notation.

You mean I get that invest-withdrawals-in-Yacht return? That is what you would think, but your family has taken your withdrawals and, instead of buying the Yacht, they invested them for you. They become part of your final worth – to be added to \(\$K\).

Your other portfolio, \(Q\), is worth:

\[\text{[Q] } B_1\times(1+r_1)^{n-z_1} + B_2\times(1+r_2)^{n-z_2} + \dots\] They’re part of your financial gains, too. So how much money do you have?

\[\text{[Q] Final worth }= K + B_1\times(1+r_1)^{n-z_1} + B_2\times(1+r_2)^{n-z_2} + \dots\]

So my actual return is not \(IRR\)? No, it is the solution to an equation like \(10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\), namely:

\[ \{ A_0\times(1+x)^n + A_1\times(1+x)^{n-t_1} + A_2\times(1+x)^{n-t_2} + \dots \} - \{ B_1\times(1+x)^{n-z_1} + B_2\times(1+x)^{n-z_2} + \dots \} = \\ K + B_1\times(1+r_1)^{n-z_1} + B_2\times(1+r_2)^{n-z_2} + \dots \]

Here’s something interesting: If you start with \(\$A_0\) and make no more investments and all withdrawals are invested at \(IRR\), then \(A\times(1+IRR)^n = K + \text{\{sum of final values of investments}\}\) I mean that IRR satisfies (by definition):

\[A_0\times(1+IRR)^n - \{ B_1\times(1+IRR)^{n-z_1} + B_2\times(1+IRR)^{n-z_2} + \dots \} = K\]

which can be written

\[A_0\times(1+IRR)^n = K + { B_1\times(1+IRR)^{n-z_1} + B_2\times(1+IRR)^{n-z_2} + \dots }\]

So the withdrawals are invested at \(IRR\)! Okay, look at it this way:

  • You invest \(A_0\) then your PE manager makes a number of withdrawals and invests them at \(IRR\).
  • That’s the solution to equation \([P]\) without any additional investments \(A_1\), \(A_2\) etc.
  • Then the PE manager sticks these withdrawals in your portfolio (after \(n\) years of \(IRR\) returns).
  • You wake up and say "I started with \(A_0\) and now I have \(K + \{ B_1\times(1+IRR)^{n-z_1} + B_2\times(1+IRR)^{n-z_2} + \dots \}\). That is an \(n\)-year return on my original investment of \(\$A_0\) which then satisfies:

\[A_0\times(1+x)^n = K + \{ B_1\times(1+IRR)^{n-z_1} + B_2\times(1+IRR)^{n-z_2} + \dots \}\] And the solution is \(x = IRR\), right? Yes. That’s why (some Private Equity guys) consider \(IRR\) to involve withdrawals to be invested at the \(IRR\) rate. Of course, had you made the withdrawals and just burned the withdrawal monies (no reinvestment), you would solve \(A_0\times(1+IRR)^n - \{ B_1\times(1+IRR)^{n-z_1} + B_2\times(1+IRR)^{n-z_2} + \dots \} = K\) and get the solution: \(IRR\).

However, suppose you made NO withdrawals, but found some extra money in your portfolio after \(n\) years (equivalent to fictitious withdrawals invested at \(IRR\))? You’d get equation \(A_0\times(1+IRR)^n = K + { B_1\times(1+IRR)^{n-z_1} + B_2\times(1+IRR)^{n-z_2} + \dots }\) with the same solution: \(IRR\).

For example:

  • You withdraw \(\$5M\) and immediately reinvest it at the same rate. That presumably means you take it out then put it back in. That would mean \(10\times(1+x) - 5 + 5\) after \(1\) year (in our example, above). That would mean you did not withdraw it at all: \(10\times(1+x)^3 = 7\)

  • You withdraw and burn the money that you withdrew \(\dots\) or buy the Yacht: \(10 \times (1+x)^3 - 5 \times (1+x)^2 = 7\)

  • You withdraw and reinvest at a different rate: \(10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\)

  • You withdraw and keep the \(\$5M\), uninvested in your checking account: \(10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\)

  • You withdraw and invest at the \(IRR\) rate: \(10 \times (1+x)^3 - 5 \times (1+x)^2=7+5\times(1+r)^2\) with \(r = IRR\), the solution to \(10 \times (1+x)^3 - 5 \times (1+x)^2 = 7\)

  • You make only one, original investment in a \(PE\) fund. The manager withdraws and invests at \(IRR\): \(A_0\times(1+x)^n = K + \{ B_1\times(1+IRR)^{n-z_1} + B_2\times(1+IRR)^{n-z_2} + \dots \}\)

Now you can see why there is a debate about reinvesting withdrawals! So how do you get those return numbers? I mean solving equations like \(10 \times (1+x)^3 - 5 \times (1+x)^2=7\). To find the roots of the equation f(x) = 0 we can use a numerical method called Newton’s Method.

Quick Pause for Newton’s Method

I have been applying Mathematics in the investment world for over fifteen years. Perhaps the most common question I got from analysts and students was: when will I ever use calculus? And my standard answer you never know what the future return is. In fact, solving equations help you develop clear and logical thinking. So lets start by guessing at a root, say \(x_0\). That gives us a point on the curve \(y = f(x)\), namely: \((x_0,\, f(x_0))\). Then we move along the tangent to the curve at that point \(\dots\) until we reach the x-axis at, say \(x_1\). The relationship between \(x_0\) and \(x_1\) is: \(x_1 = x_0 - \frac{f(x_0)}{f'(x_0)}\)

You can see that by staring intently at the figure below:

your image caption

As you can see, \(x_1\) is closer to the root than our guess of \(x_0\). Keep in mind that this is not always the case, and we gotta make a reasonable guess. Anyway, we now assume that \(x_1\) is our next guess and repeat \(\dots\) moving along the tangent to the next guess, \(x_2 = x_1 - \frac{f(x_1)}{f'(x_1)}\). Then repeat the same ritual to get \(x_3 = x_2 - \frac{f(x_2)}{f'(x_2)}\). Then repeat to get \(\dots\) and if you are lucky you get closer and closer to the actual root.

Back to our example…

We are trying to solve an equation like \(10 \times (1+x)^3 - 5 \times (1+x)^2=7\), which is the same as finding finding a root of \(f(x) = 10 \times (1+x)^3 - 5 \times (1+x)^2-7=0\) starting with a guess: \(x_0=0.2\). The various Newton iterates, them’s \(x_1\), \(x_2\), \(x_3\) etc., converge to \(8.96\%\):

fx <- function(x){10*(1+x)^3-5*(1+x)^2-7}
# fx(xt) # uniroot(fx, c(0.0001, 0.2), tol =0.00000001)$root
dx <- function(x){30*(1+x)^2-10*(1+x)} # Deriv::Deriv(fx)

xt=0.2
ft=fx(xt); dt=dx(xt)
i=0
while(i<=5){
  xn=xt-ft/dt
  ft=fx(xn); dt=dx(xn)
  xt=xn; print(xt)
  i=i+1
} 
[1] 0.1013
[1] 0.08975
[1] 0.0896
[1] 0.0896
[1] 0.0896
[1] 0.0896

The solution is \(x=IRR=\) 8.96% \(\dots\) which can also be obtained using \(\text{Excel's IRR}\) command - but I prefer RStudio. With IRR there can be more than one solution to such equations and we can find them. For example, for investing \(\$1M\), withdrawing \(\$2.5M\), investing an additional \(\$1.7M\), and ending with a \(\$0.2M\) portfolio after \(3\) years, you get this:

fx=function(x) 1000*(1+x)^3-2500*(1+x)^2+1700*(1+x)-200

g=c(0.2, 0.5)
xt1=uniroot(fx, g, tol =0.00000001)$root
xt1
[1] 0.3521

g=c(-0.9, 0.8)
xt2=uniroot(fx, g, tol =0.00000001)$root
xt2
[1] -0.8521

\[f(x) = 1000\times(1+x)^3 - 2500\times(1+x)^2 + 1700\times(1+x) - 200\]

x=seq(-0.99, 0.5, 0.01)
y=fx(x)

plot(x, y, type="l")
points(xt1, fx(xt1), col = "red")
points(xt2, fx(xt2), col = "red")
abline(h=0, col="blue")

Roots for \(f(x)\): 35.21% and -85.21%. So what would you say about your annual return? Would you say \(35.2\%\) or \(-85.2\%\)? You definitely do not want to say \(-85.2\%\). But this annual return is unlikely in PE, right? Unlikely, perhaps, but possible.

\(IRR\) is often used to compare two private equity investments. The one with the larger \(IRR\) is (presumably) the better choice. In that scenario, the initial portfolio investment is replaced by a bank loan (to start the business). Subsequent portfolio withdrawals are replaced by the profits from the business. In this scenario, you would be investing the profits at some rate independent of the bank loan. In such a case, you would be better served to consider not \(IRR\), but MIRR. With \(MIRR\), of course, there is no need for brain gesticulation; no fancy equation to solve; and no multiple IRRs (roots/solutions).

2 MIRR

With \(MIRR\) you know both the loan rate and the investment rate and would like to calculate some kind of return. Say you want to borrow \(\$A\) to buy a tech company. The financing rate (\(F\%\)) is the interest charged on the loan. Profits from the company are Invested at a rate \(I\%\). Expected profits are \(\$B\) after \(1\) year and \(\$C\) after \(2\) years. These you intend to invest at that annual rate of \(I\%\). Then comes the Billion Dollar Question question: Is \(\$A\) too much to pay for the tech company?

The profits will be worth (at the end of \(n\) years):

\[P = B \times (1+I)^{n-1} + C\times(1+I)^{n-2}\]

Suppose the tech company is worth \(\$K\), at the end of \(n\) years. The total value of \(profits + company\) will then be their sum, \(P + K\).

So what return are you getting on your enterprise? There is this rate of return called MIRR. Our \(A\) would be worth \(A\times(1+MIRR)^n\) (after \(n\) years at this return). Setting that equal to \(P + K\) we would get the equation:

\[A \times(1+MIRR)^n = B\times(1+I)^{n-1} + C\times(1+I)^{n-2} + K.\]

Now all we have to do is solve for \(MIRR\)? To buy that tech company, suppose we get \(MIRR = 8\%\). For the traditional company we get \(MIRR = 7\%\). Then we buy the tech company.

Keep in mind that if \(A\) is the only loan, then \(MIRR\) ain’t got nothing to do with the Finance rate \(F\). However, if there are other loans, we gotta calculate their present value (at the Finance rate \(F\%\)) and add all these present values to \(A\). If that gave \(A'\), then we would solve for \(MIRR\) from:

\[A'\times(1+MIRR)^n = B\times(1+I)^{n-1} + C\times(1+I)^{n-2} + K.\] There may be other profits as well as \(B\), \(C\), and so on \(\dots\)

If an initial loan of \(A_0\) is followed by subsequent loans (after \(1\), \(2\), \(\dots\) years) of \(A_1\), \(A_2\) \(\dots\) and the Financing rate is \(F\) and annual profits (after \(1\), \(2\), \(\dots\) years) are \(B_1\), \(B_2\) \(\dots\) which are invested at an Investment rate \(I\) then define:

\[PV = A_0 + \frac{A_1}{(1+F)^1} + \frac{A_2}{(1+F)^2} + \dots \text{that is a present value}\]

\[FV = B_1\times(1+I)^{n-1} + B_2\times(1+I)^{n-2} + \dots \text{that is a future value}\]

then \(MIRR\) is defined so that:

\[PV\times(1+MIRR)^n = FV\] So the \(PV\) gives \(FV\) after \(n\) years with annual return \(MIRR\). Solving:

\[MIRR = \frac{FV}{PV}^{\frac{1}{n}} - 1\] You can also take the \(PV\) as a series of negative cash flows, so \(-PV\) is (often) used in the formula for \(MIRR \dots\) just so you get a positive ratio: \(-\frac{FV}{PV}\). Further, if \(I = F = IRR\), then \(MIRR\) ain’t no different than \(IRR\). Lastly, in the above analysis, all cash flows are discounted to Present Value at the same rate.

Example

cf=c(15, 0.104, 0.180, -3.721, -2.607, 1.056, -2.928, 4.707, -2.659, 4.186, -33.342)
n=length(cf)-1

You invest $15M for \(10\) years, adding or withdrawing each year. Your final portfolio is $33.342M. There is the Newton method to solve for \(IRR\), namely \(f(x) = 0\). The value of \(x\) that makes \(f(x) = 0\) is the \(IRR\).

fx<-function(x){} # eval(parse(text=paste0(cf, "*(1+x)^", n:0, collapse="+")))
body(fx) <- parse(text=paste0(cf, "*(1+x)^", n:0, collapse="+"))
dx <- Deriv::Deriv(fx)

xt=0.2
ft=fx(xt); dt=dx(xt)
i=0
while(i<=5){
  xn=xt-ft/dt # Newton's Method
  ft=fx(xn); dt=dx(xn)
  xt=xn; print(xt)
  i=i+1
}
[1] 0.1325
[1] 0.1057
[1] 0.1021
[1] 0.102
[1] 0.102
[1] 0.102
fx(xt)
[1] -4.263e-14

\(IRR=\) 10.2046%

Now you borrow $15M for \(10\) years \(10.0\%\). You make additional loans and/or invest profits \(12.0\%\). The final value of your enterprise is $33.342M.

\[\text{PV = present value of your loans}\] \[\text{FV = future value of your invested profits}\]

There is an equation to solve for \(MIRR\), namely:

\[PV\times(1+MIRR)^{10} = FV\]

f_rate=0.1 # Finance Rate
i_rate=0.12 # Investment Rate

tbl=tibble(
  year=0:n,
  cash_flows=-cf,
  rate=ifelse(cash_flows>0, f_rate, i_rate),
  pv=ifelse(cash_flows<0,-cash_flows/(1+f_rate)^year,NA_real_),
  fv=ifelse(cash_flows>0,cash_flows*(1+i_rate)^(n-year),NA_real_)
)
tbl %>% knitr::kable(.)
year cash_flows rate pv fv
0 -15.000 0.12 15.0000 NA
1 -0.104 0.12 0.0945 NA
2 -0.180 0.12 0.1488 NA
3 3.721 0.10 NA 8.226
4 2.607 0.10 NA 5.146
5 -1.056 0.12 0.6557 NA
6 2.928 0.10 NA 4.607
7 -4.707 0.12 2.4154 NA
8 2.659 0.10 NA 3.335
9 -4.186 0.12 1.7753 NA
10 33.342 0.10 NA 33.342

\(MIRR=\) 10.5266%

(sum(tbl$fv, na.rm=TRUE)/sum(tbl$pv, na.rm=TRUE))^(1/n)-1
[1] 0.1053

3 KIRR & LIRR

In the derivation of \(MIRR\), we calculated the Present Value of all the loans using the financing rate \(F\). Suppose now we make a bunch of loans and, after \(n\) years, we owe \(\$B\). Our invested profits (at the end of \(n\) years) are worth \(\$A\). Let’s assume that \(A > B\).

How to calculate some rate of return? I started with \(\$0\), made some loans and ended up with a profit of \(A - B\). That’s a return of infinity. Obviously, starting with \(\$0\) ain’t good for calculating some annual return. We need an initial bankroll. \(MIRR\) does that by calculating a Present Value at the \(F\%\) rate.

How about if I imagine starting with an initial (fictitious) bankroll which is just sufficient to cover the actual loans. Since I can (presumably) invest at the Investment rate \(I\), that (fictitious) initial bankroll would be the Present Value of all the loans, discounted by the annual rate \(I\):

\[P = A_0 + \frac{A_1}{(1+I)^1} + \frac{A_2}{(1+I)^2} + \dots\]

Having \(\$P\) initially, I would be able to pay off each loan at times \(t = 0\), \(1\), \(2\), etc..

Now I have an initial \(\$P\) in my pocket and, after \(n\) years, the profits (invested at \(I\%\)) are worth:

\[Q = B_1\times(1+I)^{n-1} + B_2\times(1+I)^{n-2} + \dots\] Note that \(Q\) is the same as \(FV\), above.

So now how would I calculate some rate of return? I got me some initial bankroll, right? I reckon I’d just write: \[P \times(1+R)^n = Q \text{ or } R = [ Q / P ]^{\frac{1}{n}} - 1\] Looks like \(MIRR\). Not quite. In fact, \(MIRR\) calculates the Present Value of the loans using the Finance rate \(F\). Here we are using the Investment rate \(I\). Lets call this rate (\(R\)), \(KIRR\).

Since the Finance rate does not even appear on \(KIRR\), we need some initial bankroll to calculate \(LIRR\). Let’s pretend to have enough initial money, \(\$M\), to pay off the final value of the loan(s). That iss:

\[L = A_0\times(1+F)^n + A_1\times(1+F)^{n-1} + A_2\times(1+F)^{n-2} + \dots\] What’s the necessary value of \(\$M\) so that after \(n\) years (invested at \(I\%\)) it’s worth \(\$L\)? That’s:

\[M = \frac{L}{1+I}^n\] After \(n\) years, we pay off that loan and have what left in our portfolio? We have the invested profits, namely \(Q\). That’d mean, at some annual return, x, we would start with \(\$M\) and end up with \(\$Q\), \(M\times(1+x)^n = Q\). So we got us yet another annual return, \(LIRR\):

\[LIRR = [ Q / M ]^{\frac{1}{n}} - 1\]

cf=c(10,-5,5,-10,-8)
n=length(cf)-1

f_rate=0.05 # Finance Rate
i_rate=0.08 # Investment Rate

tbl=tibble(
  year=0:n,
  cash_flows=cf,
  pv=ifelse(cash_flows>0,cash_flows/(1+f_rate)^year,NA_real_),
  fv=ifelse(cash_flows<0,-cash_flows*(1+i_rate)^(n-year),NA_real_),
  p=ifelse(cash_flows>0,cash_flows/(1+i_rate)^year,NA_real_),
  loans=ifelse(cash_flows>0,cash_flows*(1+f_rate)^(n-year),NA_real_)
)
tbl %>% knitr::kable(.)
year cash_flows pv fv p loans
0 10 10.000 NA 10.000 12.155
1 -5 NA 6.299 NA NA
2 5 4.535 NA 4.287 5.513
3 -10 NA 10.800 NA NA
4 -8 NA 8.000 NA NA

Here you borrow $10M to buy the tech company. Each year you withdraw some profit (entered as a negative) and/or make another loan (entered as a positive). Your loans have a Finance rate of 5%. Your profits are invested at an Investment rate of 8%. Your profits amount to $25M after 4 years. However, at the end of the time period you must pay off the loan(s). That’s $18M

The BIG QUESTION: What annual return would you assign to your enterprise? IRR? MIRR? KIRR? LIRR?

fx<-function(x){} # eval(parse(text=paste0(cf, "*(1+x)^", n:0, collapse="+")))
body(fx) <- parse(text=paste0(cf, "*(1+x)^", n:0, collapse="+"))

irr=uniroot(fx, c(0.0001, 0.3), tol =0.00000001)$root # irr
mirr=(sum(tbl$fv, na.rm=TRUE)/sum(tbl$pv, na.rm=TRUE))^(1/n)-1 # mirr

kirr=(sum(tbl$fv, na.rm=TRUE)/sum(tbl$p, na.rm=TRUE))^(1/n)-1 # kirr
ib=sum(tbl$loans, na.rm=TRUE)/(1+i_rate)^n # Initial bankroll 
lirr=(sum(tbl$fv, na.rm=TRUE)/ib)^(1/n)-1 # lirr

\(IRR=\) 21.39%

\(MIRR=\) 14.63%

\(KIRR=\) 15.13%

\(LIRR=\) 17.91%

Pick one!