Questions tagged [irr]

The internal rate of return (IRR) or economic rate of return (ERR) is a rate of return used in capital budgeting to measure and compare the profitability of investments. It is also called the discounted cash flow rate of return (DCFROR) or the rate of return (ROR)

The internal rate of return (IRR) or economic rate of return (ERR) is a rate of return used in capital budgeting to measure and compare the profitability of investments. It is also called the discounted cash flow rate of return (DCFROR) or the rate of return (ROR)

88 questions
7
votes
1 answer

How to calculate new list of payment

First of all, apologies for posting the same question again. I want to add the grace period to a repay table for the flat interest calculation method such that the interest amount can be received for the grace period. Dataframe1: This is the normal…
Sophia Wilson
  • 581
  • 3
  • 16
7
votes
1 answer

3-dimensional IRR in Matlab 2019

I am trying to calculate an IRR with several dimensions in Matlab 2019a. My formula works in theory (ignoring the "multiple rates of return" warning for now), but the problem is that for bigger matrices, i.e. noScenarios > 5 or so, the code gets…
LenaH
  • 313
  • 2
  • 14
7
votes
2 answers

NumPy: financial irr method returns 'nan'. Why?

When I calculate the Internal Rate of Return (irr) using the numpy method irr, I receive nan as return. In [45]: numpy.irr([-10, 2, 2, 2, 2]) Out[45]: nan Shouldn't the results be at least negative? Let's say -8%? When I tried to understand the…
neurix
  • 4,126
  • 6
  • 46
  • 71
6
votes
2 answers

Financial.IRR not calculated in C#

I am not able to calculate IRR. I am usign Microsoft.VisualBasic to calculate IRR. Here is a case: using Microsoft.VisualBasic; ... static void Main(string[] args) { double[] tmpCashflows = new double[] { …
renathy
  • 5,125
  • 20
  • 85
  • 149
3
votes
3 answers

How can I incorporate if statement when calculating IRR in R?

This is a simple function I use to calculate IRR. However, there are incidences when all cash flows are negative and return "Error in uniroot(npv, c(0, 1), cf = cf) : f() values at end points not of opposite sign." Is there any way I can put if…
sh2657
  • 127
  • 1
  • 11
3
votes
2 answers

Looking for Accurate Ruby, Javascript, or R Excel RATE() or IRR() Function Implementation

I'm currently looking for working and accurate implementations of Excel's RATE() and IRR(). I am coding in Javascript targeting modern browsers and Ruby 2.0.0 within Rails 4. My goal is to be able to calculate APR within a responsive Javascript…
jkndrkn
  • 4,012
  • 4
  • 36
  • 41
2
votes
4 answers

Calculate IRR in Python

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…
UGuntupalli
  • 769
  • 1
  • 9
  • 22
2
votes
1 answer

IRR in poi return NaN but correct value in excel

When i calculate Irr value use apache/poi i get Double.NaN, but the same inputs in excel i got a negative value. So why they return different value? inputs…
Bo.hai
  • 63
  • 8
2
votes
2 answers

IRR calculating in Python

I wrote some code to calculate IRR and it's works fine... import scipy.optimize as optimize import datetime def npv(cf, rate=0.1): if len(cf) >= 2: first_date = min([x[0] for x in cf]) dcf = [x[1] * (1 / …
Max Maximum
  • 23
  • 1
  • 3
2
votes
0 answers

Pandas: Calculating IRR of loan cashflows

I have a Pandas dataframe of cashflows which are of unpredictable length. They range monthly over a period of between a few months and 30+ months and there is a column each month which contains that months cashflow information. I need to compute the…
SWBM
  • 21
  • 2
2
votes
1 answer

Kappam.light from irr package in R: Warning sqrt(varkappa), NAns produced, kappa = NA, z-value=NA and p-value=NA

I'm trying to calculate the inter-observer reliability in R for a scoring system using Light's kappa provided by the irr package. It's a fully crossed design in which fifteen observers scored 20 subjects for something being present ("1") or…
2
votes
1 answer

Package in R: error messages and zero subjects

My data frame (Test1) is correctly formatted n*m (n= 300 subjects, m= 15 raters): x rater1 rater2 rater3 ...... rater15 y Case1 1 1 NA Case2 1 NA NA Case3 2 1 2 . . . Case300 Fleiss & Error message -- `kappam.fleiss(Test1)' Error in ratings[i, ]…
JH_R
  • 21
  • 1
1
vote
1 answer

Calculate intraclass correlation (ICC) on each column and return a dataframe with results

I have a dataframe based on a questionnaire, all participants answer the questionnaire 2 times. based on this a dataframe with all participants and questionnaire items is formed. The dataframe looks like the following, (each row is a different…
user21538383
1
vote
1 answer

Split list and turn into dataframe in R

When analysing a dataframe, the output of the analysis i put in a dataframe, but that dataframe shows up as a list with all data as 1 list. I want the data-analyses output in a dataframe with the items in the (first) rows and the columns with the…
user21538383
1
vote
2 answers

How to calculate IRR function by group

I'm trying to calculate IRR by group using the package "jrvFinance" - function "irr" but i don't know how. I have this for only 1 group: example: pr1 <- data.frame(idC=1,period = 0:12, cf =…
hfa
  • 39
  • 5
1
2 3 4 5 6