+ Reply to Thread
Results 1 to 5 of 5

XIRR - weird results

Hybrid View

  1. #1
    Registered User
    Join Date
    10-06-2022
    Location
    Mosselbay, South Africa
    MS-Off Ver
    na
    Posts
    3

    XIRR - weird results

    I have a set of dates and values and need to calculate the XIRR - however I have picked up a weird discrepancy, and in an attempt to try and decipher the issue I have replicated the same data set
    • MSoft Excel
    • Google Sheets
    • LibreOffice Calc
    • PHP Code.

    MSoft Excel gets stuck at some point, and seems to be disregarding the cashflow from a certain point, resulting in a 148.15 XIRR value
    ALL the others return -0.09 XIRR value.

    The sheet is attached showing columns E,F and G showing what values are returned for each platform.
    Column I shows the live calculation - which 'should' be your system's interpretation.
    On each row - I calculated the XIRR from row 1 up-to-including the formula row.
    Can anyone explain to me what is wrong here ?

    Thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-06-2022
    Location
    Mosselbay, South Africa
    MS-Off Ver
    na
    Posts
    3

    Re: XIRR - weird results

    Found a solution

    Microsoft use a default of 10% (0.1) in the 3rd variable (guess) of the XIRR formula in Excel.

    The other platforms use 0 as default. When I adjusted to 10% the results were much closer.

  3. #3
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: XIRR - weird results

    It's mostly GIGO. Your XIRR formula is malformed, if column I truly represents the formula.

    If Column C are the cash flows (i.e. external funds added or withdrawn), the last "cash flow" should be the net value, namely =C77+D77, not simply C77.

    That requires some finess in order to create the progressive XIRR that you want to calculate. For example, array-enter the following in N2 and copy down:

    =XIRR(IF(ROW($C$2:C2)=ROW(C2), C2+D2, $C$2:C2), $B$2:B2)

    That presumes a "normal" interpretation of the cash flow model, namely: a series of external cash flows and corresponding end balance.

    However, if that is the case, the cash flows are extreme, if not incredulous.

    And the balances are calculated incorrectly. For example, if -8041.43 on 2012-12-31 (YMD) represents an investment of 8041.43, the balance should be =-C2 (8041.43), not =C2.

    Be that as it may, the calculations that I added might help you understand what is happening, based on your (incorrect) XIRR usage.

    See the attached Excel file. LMK if you want an explanation.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-06-2022
    Location
    Mosselbay, South Africa
    MS-Off Ver
    na
    Posts
    3

    Re: XIRR - weird results

    I do not agree (or actually - I do not have an opinion, but MicroSoft do not agree with you)

    According to support.microsoft.com/en-us/office/xirr-function-de1242ec-6477-445b-b11b-a303ad9adc9d the formula is simply

    XIRR(values, dates, [guess])
    Values   Required. A series of cash flows that corresponds to a schedule of payments in dates. The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. The series of values must contain at least one positive and one negative value.
    Dates    Required. A schedule of payment dates that corresponds to the cash flow payments. Dates may occur in any order. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text. .
    Guess    Optional. A number that you guess is close to the result of XIRR.
    So in my sheet the XIRR calculation on each line is perfect for the entire series UP TO THAT POINT IN THE SERIES
    eg the XIRR up to (including) 2016-02-26 (Line 33) is correct as
    =XIRR( $C$2:C33 , $B$2:B33 , 1)
    resulting in 148.15

    ... also the XIRR formula for the entire series ending on line 77 is correct (so is the formula on each line)
    =XIRR( $C$2:C77 , $B$2:B77 , 1)
    resulting in 148.15

    I do understand why the first 5 lines throw errors, it is because there are only negative values up to that point, and the formula requires at least one positive value in the range as well.
    ... and it also does that with your formulas.

  5. #5
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: XIRR - weird results

    Quote Originally Posted by NotanMSFan View Post
    MicroSoft do not agree with you
    MSFT documentation is not dispositive. It is renowned for its many errors. My approach is: when it's right, it's useful; otherwise, GIGO.

    For example, the XIRR help page includes ``The first payment is optional`` and ``If the first value is a cost or payment, it must be a negative value``.

    Neither statement is correct.

    By definition, the first cash flow must be present. The "first" is the first. Klunk!

    (They might mean: the cash flow associated with the first date can be zero. And indeed, that should be right. But ironically, Excel XIRR does not allow that !)

    Moreover, the first cash flow does not have to be negative, regardless of how we interpret it.

    It is true that the signs of cash flows (inflows, outflows) must be opposite.

    But our choice of sign is arbitrary; for example, positive inflows or negative inflows. We just have to be consistent.

    Think of it as POV: as a borrower, payments might be outflows; but as a lender, payments might be inflows.

    -----

    Be that as it may, nothing that you quote refutes my statement, namely: the last cash flow should be the balance on that date, properly signed.

    But again, I am assuming a "normal" interpretation of the cash flow model, namely: a series of external cash flows and corresponding end balance.

    You have not explained the cash flows in your model. Do a google search for how to use XIRR for your model.

    Anyway, I've done the best that I can to help. Good luck!
    Last edited by curiouscat408; 10-06-2022 at 01:07 PM.

+ 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. Adding rows to table; really weird results
    By Gaellus in forum Excel General
    Replies: 2
    Last Post: 08-24-2021, 10:21 AM
  2. [SOLVED] Index/match giving correct results, wrong results & #N/A results...sometimes
    By mrteater in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-27-2019, 10:41 AM
  3. [SOLVED] Weird results from SUMIF
    By lentulax in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2019, 11:21 PM
  4. Final PMT in a Series that results in a Specific XIRR??
    By JoeLV in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-17-2018, 11:46 AM
  5. Replies: 5
    Last Post: 07-09-2017, 03:24 AM
  6. Extracting a delimited CSV gave weird results.
    By Aswathy in forum Excel General
    Replies: 6
    Last Post: 10-21-2008, 04:13 AM
  7. [SOLVED] Weird sorting results
    By J Streger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2006, 05:30 PM

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