Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
-1

how to calculate the internal rate of return [closed]

asked 0 years ago

Cyrille gravatar image

updated 0 years ago

According to Keynes the internal rate of return is the r value which solve 0=I+A1/(1+r)+A2/(1+r)2+...+A1/(1+r)n for I and the list of the Ai given .

It is evident that we gain in in changing variables for α=1/(1+r) to obtain : 0=A1α+A2α2+...+A1αn. And in a last operation after that we have find a solution to solve on r α=1/(1+r) or directly to calculate r=(1/α)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=1sol1=0.567230334435854. But this solution differs too much from Excel's one. I do not understand from where comes the problem.

Preview: (hide)

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 ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 0 years ago

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 α. 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,

Preview: (hide)
link

Comments

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

Cyrille gravatar imageCyrille ( 0 years ago )

Question Tools

1 follower

Stats

Asked: 0 years ago

Seen: 243 times

Last updated: Sep 25 '24