Ask Your Question
-1

how to calculate the internal rate of return [closed]

asked 2024-09-24 16:01:48 +0200

Cyrille gravatar image

updated 2024-09-24 20:05:08 +0200

According to Keynes the internal rate of return is the $r$ value which solve $0 = -I + A_1/(1+r) + A_2/(1+r)^2 + ...+A_1/(1+r)^n$ for $I$ and the list of the $A_i$ given .

It is evident that we gain in in changing variables for $\alpha = 1/(1+r)$ to obtain : $0 = A_1\alpha + A_2\alpha^2 + ...+A_1\alpha^n$. And in a last operation after that we have find a solution to solve on $r$ $\alpha = 1/(1+r)$ or directly to calculate $r = (1/\alpha)-1$.

My frist attempt to solve this problem whose solution is $7.7138$ (after Excel) is the following. First I plot the rhs of the equation to see if there is a solution. It seems to exist in the good interval.

fr =-250+100*x+150*x^2+200*x^3+250*x^4+300*x^5
plot(fr,(x,0,1))

Then I try

sol=fr.find_root(0.001, 1)       
show(sol)
show((1/sol)-1)

which returns $sol= 0.6380683030615047$ and $r = \frac{1}{sol}-1 = 0.567230334435854$. But this solution differs too much from Excel's one. I do not understand from where comes the problem.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by Max Alekseyev
close date 2024-09-26 22:50:04.423860

Comments

This is irrelevant to Sage. Better ask at math.stackexchange

Max Alekseyev gravatar imageMax Alekseyev ( 2024-09-24 18:23:40 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-09-25 06:25:02 +0200

Emmanuel Charpentier gravatar image

(Your computation with) Excel may be not entirely trustworthy... Since you don't tell us what you did "in Excel", we can't help you with this.

BTW, you don't tell us if "the Excel solution" is for $r$ or $\alpha$. But numerically checking this "candidate solution" for either casts a serious doubt on it :

sage: (-300*x^5 + 250*x^4 + 200*x^3 + 150*x^2 + 100*x - 250).subs(x=7.7138).n()
-7.20699223462673e6
sage: (-300*x^5 + 250*x^4 + 200*x^3 + 150*x^2 + 100*x - 250).subs(x=1/7.7138-1).n()
-61.9709622900315

HTH,

edit flag offensive delete link more

Comments

Sorry Emmanuel you are perfectly true. Yesterday I was ill and I havn't see my mistake.

Cyrille gravatar imageCyrille ( 2024-09-25 11:23:00 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2024-09-24 16:01:48 +0200

Seen: 135 times

Last updated: Sep 25