![]() ![]() ![]() You will lose points if you do not use the file name PolyRoot.java for you program. (An alternative for more accuracy is to take the output of that discount.rate function and take one step of Newton-Raphson, which should do much better. Excel should show you a value that is close to zero (less than the. If greater accuracy matters to you, that could be a problem. You're correct that FinCal::discount.rate does essentially the same thing as RATE, but it looks like it rounds all its rates off to three significant figures without saying anything about it, even in the help as far as I can see. You can also use more general internal rate of return functions for this problem, by supplying the vector of cash flows corresponding to the annuity. eff ectively incorporate Microsoft Excel spreadsheets into the software. Where the second line is extracting the real roots of the polynomial equation in terms of (1+i), and the one you want is the one greater than 1 (1.0427750), from which you subtract 1. Book sale: save up to 25 on individual print and eBooks with free delivery. You can write a function to supply to uniroot: > f uniroot(f, interval=c(1e-9,1), 10, 800/100, tol=1e-6)$rootĪlternatively, you can use polyroot, but you need to find the real root that's between 0 and 1 (in the following I use 1+i rather than i because it's simpler, and so need the root between 1 and 2): > res Re(res) X L A 12 MATRI X i nst al l at i on MATRIX add-in for Excel is a zip file composed of the following files: MATRIX.XLA Excel add-in file MATRIX.HLP Help file MATRIX.CSV Function information (only for XNUMBERS add-in) FUNCUSTOMIZE. roots is increased, the function POLYROOTS(J22) is applied to the entire region. In vanilla R, both the uniroot and the polyroot functions can be used to solve for the rate, but it takes a bit of fiddling around:Ĭonsider the following in Excel: =RATE(10,-100,800) Excel function wizard T U T O R I A L F O R M A T R I X. Abstract The Microsoft Excel spreadsheet is a formidable educational. There are several ways to approach this in R. Having checked, the RATE function in Excel is the internal rate of return, specifically one for an annuity. In the HTML table its easy using, but this doesnt take those multiple spaces into the Excel cells. xla is an addin which supports matrix and linear arithmetic calculations in Excel workbook.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |