flow. The value of the portfolio at the end of each sub-period is adjusted for the external flow which takes place immediately before. External flows into the portfolio are considered positive, and flows out of the portfolio are negative. where is the time-weighted return of the portfolio, is the initial portfolio value, is the portfolio value at the end of sub-period , immediately after external flow , is the final portfolio value, is the net external flow into the portfolio which occurs just before the end of sub-period , and is the number of sub-periods. If there is an external flow occurring at the end of the overall period, then the number of sub-periods matches the number of flows. However, if there is no flow at the end of the overall period, then is zero, and the number of sub-periods is one greater than the number of flows. If the portfolio is valued immediately before each flow instead of immediately after, then each flow should be used to adjust the starting value within each sub-period, instead of the ending value, resulting in a different formula: where is the time-weighted return of the portfolio, is the initial portfolio value, is the portfolio value at the end of sub-period , immediately before external flow , is the final portfolio value, is the net external flow into the portfolio which occurs at the beginning of sub-period , and is the number of sub-periods. Explanation Why it is called "time-weighted" The term time-weighted is best illustrated with continuous (logarithmic) rates of return. The overall rate of return is the time-weighted average of the continuous rate of return in each sub-period. In the absence of flows, where is the continuous rate of return and is the length of time. Example 2 Over a period of a decade, a portfolio grows by a continuous rate of return of 5% p.a. (per annum) over three of those years, and 10% p.a. over the other seven years. The continuous time-weighted rate of return over the ten-year period is the time-weighted average: Ordinary time-weighted rate of return Example 3 Consider another example to calculate the annualized ordinary rate of return over a five-year period of an investment that returns 10% p.a. for two of the five years and -3% p.a. for the other three. The ordinary time-weighted return over the five-year period is: and after annualization, the rate of