Why Matlab's IRR (internal rate of return) is much slower than Excel's
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am converting a financial cash flow model from Excel VBA to matlab. My code is much faster after vectorization, however to my surprise, my matlab code spent most of its time computing the internal rate of return (IRR) of a set of cash flows. (Let's say I have a 10000 x 36 matrix) containing 10000 iteration of cash flow of 36 month. VBA IRR or Excel's spreadsheet function IRR spends about 1 second finding 10000 IRRs (I believe it doing some kind of goal seek.) However, it takes Matlab 14'' to do that. I also try to write my own Matlab IRR function using fzero and loop through 10000 cash flows, but it's on the same scale of time in computing if not slower.
So I am wondering how Excel can do it so fast? Is there a better way to compute IRR in Matlab?
Thanks!
0 Kommentare
Antworten (1)
condor
am 29 Sep. 2014
I have the same problem ... Matlab is soooo slow in computing the irr! Is there any other faster option?
0 Kommentare
Siehe auch
Kategorien
Mehr zu MATLAB Functions in Microsoft Excel finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!