+ Reply to Thread
Results 1 to 10 of 10

IRR calc with different ending values

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    IRR calc with different ending values

    Hello all,

    I'm working on a project to analyze several different investments' impacts on a portfolio's total IRR. I have three tables:

    1 - Cash flows. This just shows the cash flows for the entire portfolio. The final cash flow (9-1-16) represents cash flows during the month plus the portfolio's ending value.
    2 - Quarterly Gain. Each investment has had either a gain (positive) or a loss (negative) during the quarter.
    3 - IRR Impact (this is what I need help on). This table shows how much each investment's gain/loss has impacted the portfolio's overall IRR.

    The way I'm doing it now (as can be seen in the Example - Apple tab) is to subtract the 9-1-16 cash flow by each deal's quarterly gain individually and then manually pasting that value in to the IRR Impact table. I know there is a formula that can do all this legwork for me. Any idea on the best way to automate this?

    I can be as flexible as needed on the format / structure, so if helper columns are the best solution then I'm happy to throw them in.

    Thanks in advance for your help! Let me know if you have any questions.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: IRR calc with different ending values

    Hi -

    Maybe I'm not understanding what you want. You just want the 0.74% that is calculated in cell C46 to show up in cell I4? Can you just paste this formula into cell I4: =C46

    That seems too simple, so I'm guessing I don't understand what you're asking for.
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: IRR calc with different ending values

    You're on the right track. Thank you for taking a look.

    Yes - I do want the 0.74% to show up in cell I4, but then I need to recalculate it for "pear" by subtracting $1,375 from the $100,000 in C43. Then I have to do it again for Orange, and again for Grapefruit, etc. So I'm trying to find a formula that will subtract the quarterly gain for each deal from the Sep 1, 16 cash flow and return the result to the IRR Impact table.

    Hopefully that makes a little sense... Let me know if you have any follow-up questions.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: IRR calc with different ending values

    I don't know why, but the existing IRR() function gives me a #NUM error.

    I would use a separate column for each "variation" of the IRR() calculation you want. I might
    1) put something like "Apple" in Q2 (to identify which variation this column represents, and to use as a lookup value in a later lookup function).
    2) Q4 =$C4 (note the absolute reference, so this column will be easy to copy across). copy down
    3) In Q43 enter =$C43-VLOOKUP(Q2,$E$4:$F$10,2,FALSE) again, note the mix of relative and absolute references.
    4) Copy the C45 over to Q45 and add any other additional calculations you want.
    5) Make copies of column Q into R, S, T, ...
    6) Then enter the desired formula/references in your impact calculation tables to see the summaries of the IRR impact.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: IRR calc with different ending values

    Quote Originally Posted by IronCladRooster View Post
    The way I'm doing it now (as can be seen in the Example - Apple tab) is to subtract the 9-1-16 cash flow by each deal's quarterly gain individually and then manually pasting that value in to the IRR Impact table. I know there is a formula that can do all this legwork for me. Any idea on the best way to automate this?
    Array-enter (press ctrl+shift+Enter, not just Enter) the following formula into L4, then copy and paste into L5:L10:

    Please Login or Register  to view this content.
    You might not need the -10%. Or you might need some "guess" value (not necessarily -10%) for some of the formulas. Moreover, you might need different "guess" values for each formula. See below.

    Also note that the IRR might not be computable at all for some cash flow series. Mathematically, the IRR is unstable when there are so many signs changes in the cash flows. See the IRR wikipage.

    -----

    Quote Originally Posted by MrShorty View Post
    I don't know why, but the existing IRR() function gives me a #NUM error.
    Me, too. Because in our Excel versions (mine is XL2007), IRR needs a "guess" value. Presumably, "IronClad" is using a later version of Excel where IRR has been improved, directly or indirectly.

    If we look at the NPV curve for varying IRRs, we see that the original monthly IRR is between 0% and 5%. So ordinarily, I would start with a "guess" of 2.5%.

    (In fact, we can calculate the required "guess" value from the annualized IRR that "IronClad" calculated. It is about 0.91%. But we usually do not have that information.)

    However, that guess might not work for all of the IRRs of the modified cash flows, which we calculate in column L.

    In the past, I have found that a "guess" of -10% works more consistently, for no good reason. No guarantee, however.

    Of course, given the NPV curve, any negative guess is counter-intuitive. On the other hand, sometimes even a close guess does not work.

    I have long-suspected that the Excel IRR and XIRR implementations approximate the derivative using a difference quotient. In that case, the step size is critical when the derivative is steep, which we can see in the NPV curve for the example that "IronClad" posted.

    In contrast, my own IRR implementation calculates an exact derivative. It rarely needs a "guess" value. And it rarely fails to derive an IRR, if there is only one and it is computable.

  6. #6
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: IRR calc with different ending values

    PS....
    Quote Originally Posted by joeu2004 View Post
    Mathematically, the IRR is unstable when there are so many signs changes in the cash flows.
    And when I see that, often it is because the cash flow model is incorrect.

    In your model, net CFs should be withdrawals (positive) plus deposits (negative).

    Note that reinvested distributions have a net CF of zero.

    More importantly, unrealized gain/losses (i.e. differences in monthly balances) are not CFs.

    If you have any doubts, consider the following simple example: a single deposit ($100,000) into a savings account that earns 1% compounded interest per month. Ostensibly, the last CF is the balance after 12 months.

    A B C D E
    1 Per Incorrect CF Bal Int Correct CF
    2 0 -$100,000.00 $100,000.00 -$100,000.00
    3 1 -$1,000.00 $101,000.00 $1,000.00 $0.00
    4 2 -$1,010.00 $102,010.00 $1,010.00 $0.00
    5 3 -$1,020.10 $103,030.10 $1,020.10 $0.00
    6 4 -$1,030.30 $104,060.40 $1,030.30 $0.00
    7 5 -$1,040.60 $105,101.01 $1,040.60 $0.00
    8 6 -$1,051.01 $106,152.02 $1,051.01 $0.00
    9 7 -$1,061.52 $107,213.54 $1,061.52 $0.00
    10 8 -$1,072.14 $108,285.67 $1,072.14 $0.00
    11 9 -$1,082.86 $109,368.53 $1,082.86 $0.00
    12 10 -$1,093.69 $110,462.21 $1,093.69 $0.00
    13 11 -$1,104.62 $111,566.83 $1,104.62 $0.00
    14 12 $111,566.83 $112,682.50 $1,115.67 $112,682.50
    15 IRR 0.000000% 1.000000%

    The monthly IRR in E15 is correct since, by definition, the monthly IRR is the monthly interest rate for this simple example. Despite the fact that interest is added to the balance monthly, the intermediate cash flows are zero because there are no deposits and withdrawals. Thus, the interest is "unrealized" gain.

    In contrast, the monthly IRR in B15 is incorrect, since it is not 1%, the interest rate. It is zero because the sum of the monthly interest "deposits" (negative) equals the difference between the initial and final balances in C2 and C14. The last CF is the final balance minus the interest earned because the net interest cash flow is zero (interest "deposited" minus interest "withdrawn").
    Last edited by joeu2004; 03-20-2017 at 10:38 PM. Reason: restored original for posterity

  7. #7
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: IRR calc with different ending values

    Quote Originally Posted by MrShorty View Post
    I don't know why, but the existing IRR() function gives me a #NUM error.

    I would use a separate column for each "variation" of the IRR() calculation you want. I might
    1) put something like "Apple" in Q2 (to identify which variation this column represents, and to use as a lookup value in a later lookup function).
    2) Q4 =$C4 (note the absolute reference, so this column will be easy to copy across). copy down
    3) In Q43 enter =$C43-VLOOKUP(Q2,$E$4:$F$10,2,FALSE) again, note the mix of relative and absolute references.
    4) Copy the C45 over to Q45 and add any other additional calculations you want.
    5) Make copies of column Q into R, S, T, ...
    6) Then enter the desired formula/references in your impact calculation tables to see the summaries of the IRR impact.


    This would do the trick. The table could get a little long, so maybe I'll do all of this legwork on a separate tab and reference everything over to the master tab.

  8. #8
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: IRR calc with different ending values

    Quote Originally Posted by joeu2004 View Post
    Array-enter (press ctrl+shift+Enter, not just Enter) the following formula into L4, then copy and paste into L5:L10:

    Please Login or Register  to view this content.
    Hmm I couldn't get this formula to work for me either. Thanks for trying though.

    And yes - I'm using Excel 2010, but I don't know how much has changed on the IRR calc between 07 and 10.

  9. #9
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: IRR calc with different ending values

    Quote Originally Posted by joeu2004 View Post
    Array-enter (press ctrl+shift+Enter, not just Enter) the following formula into L4, then copy and paste into L5:L10:
    Please Login or Register  to view this content.
    Quote Originally Posted by IronCladRooster View Post
    Hmm I couldn't get this formula to work for me
    Works just fine for me, at least for the examples that you provided originally. See the column L of Sheet1 in the attachment [1].

    IRR Array Calc.xlsx (click here)

    (Could not use the Attachment feature in this forum.)

    Unfortunately, you do not say in what way the formula did not work for you. Perhaps I can help, if you attach an example with the errant formula.

    Some guesses....

    Perhaps you did not array-enter the formulas (press ctrl+shift+Enter, not just Enter). When you do, the formula will appear surrounded by curly-braces in the Formula Bar. We cannot type the curly-braces ourselves. That is just how Excel displays an array-entered formula.

    Or perhaps you selected more than just L4 when you array-entered the formula. We must array-enter into just L4, then copy and paste in other cells.

    Or perhaps my guess of -10% does not work well in your version of Excel, as I said it might not.

    Or perhaps you are trying the same guess (or no guess) with more data than you presented in your examples, which I forewarned might not work.

    Unfortunately, in the latter case, you are right: the formula is not reliable because Excel IRR is not reliable, again as I forewarned.

    However, I think you would encounter the same problem using MrShorty's method.


    -----
    [1] https://app.box.com/s/9n73dt1jpbm5t73oaro927ndu0883vtw

  10. #10
    Registered User
    Join Date
    12-17-2013
    Location
    Greater NYC Area
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: IRR calc with different ending values

    Quote Originally Posted by joeu2004 View Post
    Works just fine for me, at least for the examples that you provided originally. See the column L of Sheet1 in the attachment [1].

    Some guesses....
    Thanks for the follow up. I tried your formula again (and looked at your attachment) and it's working great now! When I tried it last time I got a #VALUE! error, so I assumed that the IRR guesses were throwing things off, but I must have entered something in incorrectly (I did use Ctrl Shift Enter, so that wasn't the culprit).

    Either way - I'm all set now. Thanks a million! I'll mark this as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Replace all values with "0" ending to the value with "5" ending
    By mgecelov in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-04-2017, 02:39 PM
  2. Autofill with values ending in characters
    By johnny206 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-25-2016, 08:40 PM
  3. [SOLVED] Calc Numbers with decimals and having the Decimal be moved to new column to be Calc
    By TwistedFaith in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-24-2015, 12:01 AM
  4. How do I set some wksht formulas to calc. manually and others to calc. automatically?
    By hoboking87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2013, 08:16 PM
  5. [SOLVED] If values in a column are equal, then need to calc average of values in other columns
    By engineerlady in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2013, 02:33 PM
  6. Can't sort time data for values ending in '0'
    By Antarctic-Excel in forum Excel General
    Replies: 3
    Last Post: 11-28-2011, 01:39 PM
  7. How to add leading and ending zeroes to existing values
    By perfection in forum Excel General
    Replies: 8
    Last Post: 10-17-2010, 03:42 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1