xirr | XIRR implementation in Java | Android library

 by   yccheok Java Version: Current License: No License

kandi X-RAY | xirr Summary

kandi X-RAY | xirr Summary

xirr is a Java library typically used in Mobile, Android applications. xirr has no vulnerabilities and it has high support. However xirr has 1 bugs and it build file is not available. You can download it from GitHub.

XIRR (Internal Rate of Return) implementation in Java. This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. Ported from C# code.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              xirr has a highly active ecosystem.
              It has 5 star(s) with 2 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              xirr has no issues reported. There are no pull requests.
              It has a positive sentiment in the developer community.
              The latest version of xirr is current.

            kandi-Quality Quality

              xirr has 1 bugs (0 blocker, 1 critical, 0 major, 0 minor) and 40 code smells.

            kandi-Security Security

              xirr has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              xirr code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              xirr does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              xirr releases are not available. You will need to build from source code and install.
              xirr has no build file. You will be need to create the build yourself to build the component from source.
              It has 1622 lines of code, 21 functions and 6 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed xirr and discovered the below as its top functions. This is intended to give you an instant insight into xirr implemented functionality, and help decide if they suit your requirements.
            • Bi - detection method
            • Find a bracket
            • Calculate the FIRr of a complex number
            • Compute IRRr function
            • Compose two functions
            • Main method for testing
            • Runs a new xer method with a new value
            • Calculates the total fraction of the payment with xirr
            • Calculates the xirr of xirr pattern
            Get all kandi verified functions for this library.

            xirr Key Features

            No Key Features are available at this moment for xirr.

            xirr Examples and Code Snippets

            No Code Snippets are available at this moment for xirr.

            Community Discussions

            QUESTION

            To find XIRR for different investments using google sheet
            Asked 2022-Feb-18 at 16:47

            I am currently trying to calculate the XIRR of a huge portfolio containing non-periodic cashflows. The database contains lot of transactions and I want to calculate the XIRR for each one. This image contains the format and the last column contains the TICKER names of firms. I want to calculate the XIRR for these firms. The database on the left contains all the data for the ticker names

            Please find the sample sheet here: https://docs.google.com/spreadsheets/d/1LnTHOuw5FROyZ8tNo1Zl270RhTDX1gfB2m7jtEU9F_k/edit?usp=sharing

            ...

            ANSWER

            Answered 2022-Feb-18 at 16:47

            on your sheet you will find a new tab called MK.Help.

            This is how you find XIRR for an investment like what you have:

            Source https://stackoverflow.com/questions/71153759

            QUESTION

            Basic Wrapper for LibreOffice Calc Python UDF
            Asked 2021-Dec-05 at 11:04

            How is the Basic wrapper call formed to run a LibreOffice Calc Python User Defined Function using non-integer spreadsheet ranges?

            I'm not clear on how to declare the function properly for the values and excel_date arrays which are both arrays of real numbers, type Variant in Basic terminology I understand.

            I've followed Calling a python function from within LibreCalc and ranges can be passed as integer arguments without defining them but these are real values. Both arrays are single-dimension so the multi-dimensional array issues do not apply as discussed in How can I call a Python macro in a cell formula in OpenOffice.Org Calc?

            Basic code is:

            ...

            ANSWER

            Answered 2021-Dec-05 at 11:04

            Thank you to @arturaz for explaining the Basic array comes to python as a tuple and needs converting to a list (best match for an array in python). Further details are given in his answer at https://stackoverflow.com/a/8978435/4539999 which builds on the question and other answer.

            The APSO python console shows:

            1. what is parsed from Basic to python
            2. what is required
            3. required data with dates formatted

            Source https://stackoverflow.com/questions/68833486

            QUESTION

            How to calculate XIRR for each investment using python
            Asked 2021-Dec-04 at 08:52

            I am trying to apply an XIRR Formula so that the percentage of each investment is calculated separately.

            I Have data in excel file like:

            https://i.stack.imgur.com/yqMiV.png

            headers: Script,date,Values

            result : Scrip and XIRR

            Used Python library:

            #pip install pyxirr

            from pyxirr import xirr

            I am Calculating for single script code like the below and appending it to a dataframe:

            ...

            ANSWER

            Answered 2021-Dec-04 at 08:52

            You can group by your DataFrame by Script and apply xirr function to the each group:

            Source https://stackoverflow.com/questions/70141947

            QUESTION

            Calculate IRR in Python
            Asked 2021-Jul-13 at 20:29

            I am running into a roadblock and would appreciate some help on this.

            Problem Statement:

            I am trying to calculate XIRR for a cash flow over 30 years in Python.

            What have I tried so far:

            However, none of the established libraries(like numpy and pandas) seem to have support for this. After doing some research, I learned through this source (https://vindeep.com/Corporate/XIRRCalculation.aspx) that with some simple manipulation, XIRR can be calculated from IRR.

            So, all I need is an IRR function that is implemented well. The functionality used to exist in numpy but has moved to this other package (https://github.com/numpy/numpy-financial). While, this package works, it is very very slow. Here is a small test:

            ...

            ANSWER

            Answered 2021-Jun-18 at 03:48

            Taking a look at the implementation on their GitHub, it is pretty evident to me that the npf.irr() function is implemented pretty well. Your alternative seems to be to implement the function yourself using NumPy operations but I am doubtful that a) that is easy to accomplish or b) possible to accomplish in pure Python.

            NumPy Financial seems to be doing their implementation using eigenvalues which means they are performing complex mathematic operations. Perhaps, if you are not bounded to Python, consider Microsoft's C# implementation of IRR and see if that works faster. I suspect that they are using regression to calculate the IRR. Therefore, based on your guess, it may indeed be quicker than NumPy Financial.

            Your final alternative is to continue with what you have at the moment and just run on a more powerful machine. On my machine, this operation took about 71 seconds and it is does not even have a GPU. I am sure more powerful computers, with parallelization, should be able to compute this much much faster than that.

            Source https://stackoverflow.com/questions/68028580

            QUESTION

            Relative Range in the Row of a Formula
            Asked 2021-Apr-12 at 06:43

            I have been struggling with a macro for over a month now. The goal is to break up data by security identifier (in column C) by inserting a row every time the value in the column changes. Afterwards, I want to insert an XIRR formula in the blank row that was inserted. The issue is that every security has a different amount of rows, and I cannot get the row count to become dynamic in the XIRR formula. Here is the code I have been able to put together:

            ...

            ANSWER

            Answered 2021-Apr-07 at 20:30

            As stated by @BigBen in the comments, you need to build your rowCount variable into the string for your formula.

            Source https://stackoverflow.com/questions/66993295

            QUESTION

            kdb - solver function to solve for IRR
            Asked 2021-Feb-22 at 23:52

            Having trouble implementing a rate of return calculation to compare to Excel's XIRR calc which is essentially an solver algorithm to find the discount rate at which the NPV of an investment is zero using provided cash flow and dates in a table.

            Per MSFT documentation, the function loops through 100 times (not limited to this..I'm using 10,000 in my code below to test a wide range of rates)

            https://support.microsoft.com/en-ie/office/xirr-function-de1242ec-6477-445b-b11b-a303ad9adc9d?ui=en-us&rs=en-ie&ad=ie

            Here is the example with my dummy data to match the above in a single table

            ...

            ANSWER

            Answered 2021-Feb-22 at 23:52

            I suspect that excel is using Newton's Method here, rather than running through a list of 100 equally spaced guesses. To calculate using this method we can start with your table, plus an initial guess of 0.5:

            Source https://stackoverflow.com/questions/66323233

            QUESTION

            Append value to result of FILTER function in order to call XIRR function
            Asked 2021-Jan-02 at 00:00

            I'm trying to call the XIRR function using a filtered array of data, but I need to append one additional value to each array

            The baseline idea is the following formula that gathers the cashflow/date arrays from the K/A columns using the FILTER function:

            ...

            ANSWER

            Answered 2021-Jan-01 at 21:24

            You can define a new array with appended values using curly bracket and semicolon:

            Source https://stackoverflow.com/questions/65533645

            QUESTION

            Calculate IRR from inception until slicer selection, while other metrics only for that slicer selection
            Asked 2020-Nov-11 at 00:14

            My report needs to display IRR from inception until the year and quarter selected in the slicer, while the same report has other metrics that display only for the year and quarter selected. I'm using XIRR formula.

            The report has a slicer for Year, and another for Quarter.

            If I make a selection in the slicer for year = 2020, and quarter = Q3, the other metrics display the correct values for Q3 of 2020 (since the data in the respective tables have columns for Year and Quarter), but the IRR metric will incorrectly show me the value for Q3 of 2020. I need that card to show me the IRR up to Q3 of 2020.

            (For context, an IRR table usually consists of date, and the cash flow. When the asset is purchased, that date is the inception date and it has a negative cash flow associated with that date. During the life of the investment, there are cash distributions i.e. positive cash flow, and the last date consists the selling price of that asset. Hence showing the IRR for Q3 of 2020 only will result in an error, because the XIRR formula needs to see both positive and negative cash flows)

            I'm using the same calendar lookup table for IRR and the other metrics in my data model.

            ...

            ANSWER

            Answered 2020-Nov-11 at 00:14

            You need to clear the filter on quarter and replace it with <= selected quarter.

            Source https://stackoverflow.com/questions/64746103

            QUESTION

            Python IRR Function giving different result than Excel XIRR
            Asked 2020-Sep-08 at 16:36

            I am using the following functions to perform IRR-Calculations with Python:

            ...

            ANSWER

            Answered 2020-Sep-08 at 16:36

            Scipy optimization functions are fallable to local minima. Change optimization method to something diferent, e.g. anderson, and get what you expect to.

            Proof

            Source https://stackoverflow.com/questions/63797804

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install xirr

            You can download it from GitHub.
            You can use xirr like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the xirr component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/yccheok/xirr.git

          • CLI

            gh repo clone yccheok/xirr

          • sshUrl

            git@github.com:yccheok/xirr.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link