This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#~ Title: XIRR Excel function simulation | |
#~ | |
#~ Reference 1: XIRR manual - http://office.microsoft.com/en-gb/excel-help/xirr-HP005209341.aspx | |
#~ Reference 2: How to calculate IRR manually - http://www.s-anand.net/Calculating_IRR_manually.html | |
#~ | |
#~ Step 1: enter zeroes (0) against dates that do not have any cash outflow or inflows. | |
#~ Step 1bis: calculate IRR for these cash flow values using normal IRR function. | |
#~ Step 1tris: or using an iteractive approach as bisection method to find the NPV zeroes. | |
#~ Step 2: multiply this value of IRR by 365 to get annual IRR (since, these are daily cash flows). | |
#~ Step 3: refine using the formula =( 1+ R / 365) ^ 365 - 1), where R is the the value obtained in Step2. |