Posts

Showing posts from December, 2024

Calculating IRR, DPI, RVPI, and TVPI, Part III

Image
In Part I , I used sample data on transactions, prices, and FX rates to calculate market values, cash flows, and DPI, RVPI, and TVPI ratios for Private Equity funds. The resulting view's output was a time series with every cash flow and valuation date, and data calculated in two currencies, the Instrument Currency and the Portfolio Currency. In Part II , I discussed how to calculate IRR (internal rate of return) in SQL using a recursive CTE, and went through an example with code. In this part, I will use SQL Server to calculate the IRRs for the funds using the view set up in Part I . Results will be presented in both currencies, and for the portfolio as a whole, in Portfolio Currency. I will build an inline table-valued function (TVF) with two date parameters to limit the calculation period, if required, to enable reporting a specific time period. An inline TVF has a lot of advantages compared to a multi-statement TVF . When using an inline TVF, SQL Server can treat it much like a...