Assume you're short AAPL. Say you sold short at 24.28 as of 2016-01-01 and cover 2021-09-13 on 149.74. So your return is (24.28-149.74)/24.28 or -517%.

If you get the daily returns of AAPL and just reverse the sign, then do a cumulative return, you instead get -90.2%. Obviously the correct number is -517% since as your short underperforms the position gets bigger since you need more cash to cover your position. So is it wrong to use cumulative returns in this context?

import pandas as pd
price_data = yf.download(['AAPL', 'SPY'], '2010-01-01')
y = price_data.loc['2016-01-01':]['Adj Close']['AAPL'].pct_change().dropna()
np.exp(np.log(1 + y.values).cumsum())[-1] - 1
  • $\begingroup$ Is there a reason you're using simple returns and then treating them as log returns in the final calculation? $\endgroup$ Sep 13 '21 at 15:56
  • $\begingroup$ It's just to compound the returns. You can also just do: (1 + y.values).cumprod() - 1 $\endgroup$
    – hani
    Sep 13 '21 at 16:04
  • $\begingroup$ Oh yes, they're equivalent - my mistake! $\endgroup$ Sep 13 '21 at 16:28
  • $\begingroup$ Among more material things, are you comparing price-only return with total (dividend-adjusted) return here? $\endgroup$ Sep 13 '21 at 22:45

Negating periodic returns for a long position is not equivalent to the cumulative returns on a short position. Short positions have opposite absolute gains, not relative gains.

Take this example:

I start with a position of \$100. If the instrument gains \$5 (a 5% return), a long position makes \$5 and ends with a value of $105. If I have a short position, I lose \$5 and have a end total of \$95. If, on the second day, the instrument gains another \$5, the long position gains another \$5, which is a 4.7% return (5/105), but the short position loses \$5, which is a 5.26% loss (5/95).

The difference is that the starting value is different between long and short positions. So if an instrument goes up in value twice, the long position will have a smaller "return" than a short position, because the starting value after the first period will be higher (e.g. 105 vs 95 in the example).

Or, mathematically, if $r > 0$:

$\begin{aligned} (1+r)(1+r) - 1 &= (1 + 2r + r^2) - 1\\ &= 2r + r^2 \\ &> 2r - r^2 \\ &> 1 - (1 - 2r + r^2) \\ &> 1 - (1-r)(1-r) \\ \end{aligned}$

It's one of the reasons that short ETFs are not recommended for long-term investing, since they must be rebalanced in order to match the proper multiple of daily returns, and losses can have a higher magnitude than the equivalent positive return.

  • $\begingroup$ So looking at your example the compound return in general is $-1+(1+s r_1)(1+s r_2)\cdots(1+s r_n)$ where s=1 if you are long and s=-1 if you are short, r are the daily percent changes in the stock price. $\endgroup$
    – noob2
    Sep 13 '21 at 22:18
  • $\begingroup$ @noob2: Would you care to look at my question quant.stackexchange.com/q/67909/6686? Thank you. $\endgroup$
    – Hans
    Sep 14 '21 at 0:30

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.