Financial Algorithms Cookbook | Time Value of Money

Modified Internal Rate of Return Of a Series of Cashflows

The traditional IRR has the following problems:

  • It assumes that all the cash flows are reinvested or discounted at the computed yield rate. This is only releistic if the spread between reinvested and borrowing is narrow.
  • It is sensitive to the number of times the sign of the cash flow changes. For each change from positive to negative or visa versa there is a possible extra solution. This solution is mathematically correct, but of not much finacial use.

MIRR avoids both these problems by discounting the negative and positive cash flows seperately and using differnet reinvestment and borrowing rates. Typically negative cash flows are discounted at a safe rate such as the T_Bill or Overnight rate. While positive cash flows are reinvested at a rate that reflects the a risk similar to the investment in question.

#Algorithm:
#
#1. Find FV of the positive cash flows at the reinvestment rate.
#2. Find PV of the negative cash flows at the safe rate.
# having PV, FV, and n solve for i.

def  MIRR(safeRate, reinvestmentRate, cashFlows):
    poscf =[]
    negcf =[]
    for cf in cashFlows:
        if cf > 0.0:
            poscf.append(cf)
            negcf.append(0.0)
        else:
            negcf.append(cf)
            poscf.append(0.0)    
    pv = NPV.netPresentValue(reinvestmentRate, poscf)
    pv = -pv
    n = len(cashFlows)-1
    NFV = FV.futureValue(reinvestmentRate, pv, 0, n)
    pv = NPV.netPresentValue(safeRate, negcf)
    return i.interestRate(safeRate/100, pv, NFV, 0, n)

Example

Using the follwoing cash flows:

Group # of Months Cash Flows
0 1 -180,000
1 5 100,000
2 5 -100,000
3 9 0
4 1 200,000
cashFlows =  [-180000,
               100000, 100000, 100000, 100000, 100000,
              -100000, -100000, -100000, -100000, -100000,
               0,0,0,0,0,0,0,0,0,
               200000]
>> safeRate = 6.0/12
>> reinvestmentRate = 10.0/12
>> MIRR(6.0/12, 10.0/12,cashFlows)
>> 0.81  

That is an annual of 9.7

References

  • Gallager, T; Andrew Jr., J., Financial Management: Principals and Practices, Upper Saddle River, NJ: Prentice Hall, 1996
  • HP-12C Business Calculator Owner's Manual, Hewlett Packard, 1984
  • HP-10B Business Calculator Owner's Manual, Hewlett Packard, 1994