(Free42,DM42) NPV and IRR

06122020, 08:58 AM
(This post was last modified: 06182020 07:02 PM by Werner.)
Post: #1




(Free42,DM42) NPV and IRR
Update: replaced by this newer version that also includes MIRR
Solver program. CF0 is separate CFj is an nx2 matrix with the Cash flows (j=1..n) in column 1 and their frequency in column 2 CFj may also be a nx1 matrix, implying all Nj=1 uses subroutine Ni to calculate ((1+i)^N  1)/i: Code: @ X Y Code: 00 { 140Byte Prgm } example: create the 7x2 matrix [[1000 1] [2000 2] [3000 3] [4000 4] [5000 5] [6000 6] [7000 7]] Start the solver: ShiftSOLVER, NPV store the matrix in CFj store 100000 in CF0 store 0 in NPV press IRR% > 2.0417694... hope you like it Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE 

06122020, 04:04 PM
Post: #2




RE: (Free42,DM42) NPV and IRR
Regarding the solver: many times it just works correctly, but with the above example, if you specify 2 guesses (1 and 2) for IRR%, it still returns the correct answer, but mentions 'Extremum'? How can the same result, with he same input, be regarded as a root or an extremum, depending on the guesses?
Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE 

06122020, 07:14 PM
Post: #3




RE: (Free42,DM42) NPV and IRR
(06122020 04:04 PM)Werner Wrote: Regarding the solver: many times it just works correctly, but with the above example, if you specify 2 guesses (1 and 2) for IRR%, it still returns the correct answer, but mentions 'Extremum'? How can the same result, with he same input, be regarded as a root or an extremum, depending on the guesses? Hello Werner, With guesses 0.01 and 0.02, my program returns 0.020416943595, and if I press "IR" one more time, I get "Sign reversal", so I don't know what's goin' on in your program ... An extremum is impossible, I think, if first cash flow negative and the others positive ... 

06152020, 01:16 PM
Post: #4




RE: (Free42,DM42) NPV and IRR
Investigated a little further..
and, of course, what looks like the same result isn't. Supplying guesses 1 and 2 produces IRR%=2.04169...67997, which does not evaluate NPV to zero. Since the guesses do not span a root, it is possible that the algorithm stays in the positive part. Supplying guesses 2 and 3, for instance, results in IRR%=2.024169..68027, and the resulting NPV *is* zero. Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE 

06152020, 02:49 PM
(This post was last modified: 06152020 02:50 PM by Pekis.)
Post: #5




RE: (Free42,DM42) NPV and IRR
(06152020 01:16 PM)Werner Wrote: Investigated a little further.. With Emu42, answer is the same in my program (IRR=0.020416943595), wether with[0.010.02] or [0.020.03] as guesses. Excel gets IRR = approx. 0.0204169435970961 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)