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%?


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.

  • 1
    $\begingroup$ Example: at the beginning of the month the account was valued 2000, during the month you withdrew 500 (cashflow = -500), at the end of the month the account was worth 1700. Return, by this method is R = (1700-(-500))/2000 - 1 = 10%. This method assumes that the cash flows occur near the end of the period, other assumptions (for ex: in the middle, probably more reasonable, see simple Dietz method), are also possible. $\endgroup$
    – Alex C
    Aug 27 '19 at 12:04
  • $\begingroup$ So, to calculate a Sharpe ratio for a 60 day period using daily frequency, I should: average 59 returns using return = ln(1+((day 2 - cashflow)/day 1)) which should then be the numerator in the Sharpe formula and the denominator being the standard deviation of those same returns (disregarding riskless interest payment). In my example, the reference "day 2" or "day 1" was the market value of the portfolio on the respective day and the reference "cashflow" is the inflow or outflow that may have been observed over this day 1 to day 2 time frame. $\endgroup$
    – Jason p
    Sep 3 '19 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.