Skip to content
All library documents

Calculating Sharpe Ratios for Portfolios with Cash Flows

Article Quant Q&A · Author: Jason p

Summary

The document explains how to estimate a portfolio’s Sharpe ratio when deposits or withdrawals affect its recorded value. It recommends measuring portfolio value at regular intervals, adjusting each ending value for cash flows, and calculating returns relative to the prior period’s ending value. It then uses log returns to compute the average return and population standard deviation, so the ratio is less affected by the amount of cash added or withdrawn.

The adjustment is approximate when flows occur within a measurement interval: the result can depend slightly on whether a withdrawal happens before or after a large market move. More frequent observations can reduce that timing effect, at the cost of more data handling. The answer also distinguishes this volatility-adjusted measure from an internal rate of return, and notes that a conventional Sharpe calculation subtracts the risk-free return. It does not explain how to adjust the benchmark, despite that being part of the original question.

Key ideas

  • Adjust periodic portfolio values for cash flows before calculating returns.
  • Use the previous period’s ending value as the return denominator.
  • Log returns support the suggested average-to-volatility Sharpe calculation.
  • Cash-flow timing within a measurement period can still affect the estimate.
  • A standard Sharpe ratio accounts for the risk-free return.

Tags

Full text
# Adjust calculation of Sharpe ratio when portfolio is subjected to cash outflows


# Adjust calculation of Sharpe ratio when portfolio is subjected to cash outflows












I have a portfolio with cash and marketable securities, a benchmark, and a desire to calculate its Sharpe ratio. However, this portfolio has cash outflows. Sometimes securities are sold to produce the cash outflows. When calculating historical statistics, these statistics are affected by these instances of sold securities.

How can I adjust my calculation of these historical statistics to not be affected by these transactions? I want my statistics to be reflective of the portfolio manager's actions of asset allocation and have their actions diminished by cash outflows of the portfolio.

Should I adjust the benchmark in the same manner my portfolio was affected? For example, the cash outflow decreased the net (net of performance in the markets) market value of the portfolio by 5% two days ago. Should I decrease the benchmark by the change in the benchmark performance minus 5%?

## Answer by demully (score 2)

https://quant.stackexchange.com/a/47338

If you just wanted the IRR (ie the compound returns adjusting for cashflows, but with no vol-adjustment) that's just a simple Excel formula (=XIRR).

To get the Sharpe, you need to calculate the end-value of the portfolio at the end of every day, week or month. More frequent can sometimes be marginally more accurate; but takes proportionately more effort and processing.

From these, you calculate: return = (end value - cashflows)/prior-end.

Ln(1+x) these returns, to give you log-returns

Sharpe Ratio = avg(log-return) / stdevp(log-return)

This ratio will not be affected by how much you might have added or withdrawn in the prior month. It might be very slightly affected if eg you measure this monthly, you withdrew funds on the first vs the last day of the month, and there was a big market move in between the two. But these effects are nearly always relatively immaterial (and can be solved looking at this on a higher frequency if you think they're problematic).

Strictly speaking, you should subtract the riskless interest payment on the prior-end value as well to give you a "proper" Sharpe. But this is academic pedantry; few bother in reality.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.