Long Short Equity Strategy

13 min read

By Ishan Shah and Aaryaman Gupta

As the name suggests, long short equity strategy is one where we take both long and short positions in different equities. This strategy is normally used by hedge funds to generate greater risk adjusted returns due to its inherently low risk characteristics.

In this article, you will learn about how this strategy works and how one should approach building such a strategy. You will also see its implementation in Python along with the results of backtesting.

We will cover the following topics:

What is a Long Short Equity strategy?

Long short equity strategy is a popular strategy used by hedge funds where long positions are taken in stocks that have superior return characteristics and short positions are taken in stocks that have inferior characteristics.

The rationale is that the long positions are expected to increase in value whereas short positions are expected to decrease in value.

A portfolio constructed in this fashion helps to protect from losses during the market crash. Therefore, this strategy is known as a market-neutral strategy.

A more sophisticated way to construct this portfolio is to deploy equal amounts of money in long positions and short positions within each sector to form a sector-neutral portfolio.

This approach will help protect the performance of the portfolio from price fall in any of the sectors and makes the portfolio less volatile.

What are the sources of returns?

A hedge fund manager employing a long-short strategy must be skilled in identifying the correct stocks in a long-short portfolio. By actively selecting the stocks in the appropriate long or short positions, a manager can maximize returns from both the positions, while still keeping the portfolio market-neutral.

Short selling skill of a manager is especially important, as it not only hedges the position in case of a crash, but can also help generate returns from the overvalued/poor quality stocks.

In order to generate greater risk-adjusted returns, managers tend to invest in highly diversified portfolios including a large set of stocks from different industries as well as some exposure to global equity markets.

The market exposure of such a strategy is normally low with most funds aiming to keep the long-term beta under 0.5. Finally, the additional source of returns depends on the managers ability to make tactical decisions to modify the portfolio’s net market exposure according to their changing views of the market.

Pros and cons of Long Short Equity strategy

The biggest benefit of this strategy is that it limits the downside risk of the portfolio. Historically, the returns from such a strategy have shown very little volatility as measured by standard deviation.

A typical long-short strategy also has lower maximum drawdowns compared to other portfolios. The reasoning here is that a long-short strategy does not rely only on rising markets to generate returns. Instead, such a strategy sets out to gain returns from both rising and falling markets.

The potential drawback of such a strategy is that hedge funds usually charge high annual management fees of about 2% along with performance fees of up to 20% of the profit.

These fees are on the higher side compared to mutual funds and ETFs which have around 1% to 3% as the expense ratio. Another downside of this strategy is that 50-50 exposure to both long and short positions might lead to a very low return in bull markets.

Working of the Long Short Equity strategy

To understand the working of this strategy let’s take a look at an example. A hedge fund takes a $1000 long position each in Apple and Google, and a $1000 short position each in Microsoft and IBM.

                                    Portfolio (Technology Sector)

Stock Name

Long Position

Stock Name

Short Position













For an event that causes all the stocks in the technology sector to fall, the hedge fund will have losses from long positions in Apple and Google but will have profit from short positions in Microsoft and IBM.

Thus, there will be minimal impact on the portfolio. Similarly, an event that causes all the stocks in the technology sector to rise will also have minimal impact on the portfolio. The hedge fund took this position because they expect Apple and Google’s share prices to rise and Microsoft and IBM’s share prices to fall.

If the view of a fund manager is biased towards the long side, then he can give more weight to the long side of the portfolio such as 70% of the capital to the long side and 30% of the capital to the short side.

However, the impact of the market crash on the portfolio will be higher. But such a construct with higher proportion in long positions would help the portfolio value to appreciate faster in the bull run, like the one seen after the fall due to covid-19.

Steps to build the Long Short Equity strategy

A long short equity strategy is built with the following steps:

  • Step 1 - Define the Universe
  • Step 2 - Bucketing stock
  • Step 3 - Define parameter to long or short security
  • Step 4 - Capital allocation

Let's learn about each step in detail and create our own long short equity strategy.

Step 1 - Define the Universe

Identify a universe of stocks in which we will take positions. The universe can be defined based on dollar-volume, market capitalization, price, and impact costs. Here, we will use market capitalization to identify our stocks.

Step 2 - Bucketing stock

From the universe of stocks, we will bucket stocks based on the sector such as technology, pharmaceuticals, automobiles, financial services, and FMCG. For our example, we will be using the technology sector.

Step 3 - Define parameter to long or short security

This is the key step in the workflow. Here we will rank stocks in the bucket based on previous day’s returns. Stocks that have performed well will be ranked higher and stocks that performed poorly will be ranked lower.  We will use the principle of mean reversion to take our trades. We will go long on stocks with the lower rank and go short on the stocks with the higher rank.

Note: A combination of parameters such as quarterly earnings growth, PE ratio, P/BV, moving averages, and RSI could be used here with different weights on each parameter to create a profitable strategy.

Step 4 - Capital allocation

Allocating an equal amount of capital to each stock shortlisted from step 3 is a popular capital allocation strategy. An equal weight approach helps to avoid a concentration on a particular stock in the portfolio.

Implementing the Long Short Equity strategy in Python

First, let’s start with importing all the necessary libraries. We will be using the yfinance library to import our data. For this strategy, we have selected a bunch of 42 large-cap tech stocks listed on the NYSE.

Next, we will calculate the daily stock returns. Then we will rank the stocks in the order of decreasing returns, i.e., the stock with the highest return will be ranked 1 and so on.

2015-07-07 28.0 5.0 30.0 17.0 6.0 1.0 9.0 26.0 39.0 40.0 ... 42.0 29.0 27.0 21.0 34.0 12.0 32.0 38.0 13.0 15.0
2015-07-08 33.0 11.0 31.0 15.0 24.0 20.0 9.0 38.0 28.0 23.0 ... 7.0 41.0 42.0 2.0 35.0 16.0 39.0 21.0 34.0 30.0
2015-07-09 40.0 26.0 36.0 11.0 17.0 28.0 13.0 24.0 6.0 3.0 ... 35.0 37.0 33.0 7.0 29.0 2.0 42.0 19.0 10.0 38.0

Now we can generate our signals. For the top 21 ranked stocks, we will be taking short positions, and for the bottom 21 ranked stocks, we will be taking long positions.

Since we are taking equal weights across all stocks, we will assign +1 for the long positions, and -1 for the short positions. According to the signal generated, now we will take positions on the market day.

For this, we will be using the shift function. Multiplying the signal with daily stock returns will give individual stock returns for each stock.

The sum of these returns across all stocks divided by the total number of stocks will give us our net strategy returns.

2015-07-07 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 1.0 ... 1.0 1.0 1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0
2015-07-08 1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 ... -1.0 1.0 1.0 -1.0 1.0 -1.0 1.0 -1.0 1.0 1.0
2015-07-09 1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 ... 1.0 1.0 1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0
2015-07-07 -0.024823 0.010742 -0.022720 0.012828 0.017628 0.015200 0.008633 -0.030238 -0.021100 -0.015783 ... -0.007074 -0.043848 -0.052430 0.000603 -0.026328 0.013039 -0.032806 -0.015346 0.025357 0.022008
2015-07-08 -0.020397 -0.001332 -0.016952 -0.008247 0.005959 0.000381 -0.007496 0.001661 0.014113 0.016199 ... 0.012214 -0.018755 -0.005764 -0.012679 -0.000486 -0.017982 -0.028669 -0.004795 0.011545 -0.018987
2015-07-09 0.026734 0.010537 0.010182 -0.010286 -0.021967 0.000953 -0.011269 0.004052 -0.015941 -0.000960 ... 0.017517 0.024528 0.005507 -0.001192 0.011016 -0.018746 0.018707 -0.020432 -0.015753 0.002150

To analyse our returns, we will be using the pyfolio library. As one can see the stock has seen stable annual returns of 6.9%. As expected from the long-short strategy, these returns have come at very low risk.

The low annual volatility and the small maximum drawdown of -4.8% show that this strategy takes very little risk for its returns. The risk-reward ratios like Sharpe Ratio and the Calmar ratio return healthy values greater than 1.

Since the nature of the strategy is such that the portfolio is hedged by taking equal long and short positions, one can see that this strategy can give less volatile stable returns over time.

|          Start date | 2015-07-07 |
|            End date | 2021-06-30 |
|        Total months |         71 |

|                     |   Backtest |
|    Annual return    |       6.9% |
|  Cumulative returns |      49.1% |
|  Annual volatility  |       5.2% |
|     Sharpe ratio    |       1.32 |
|     Calmar ratio    |       1.44 |
|      Stability      |       0.91 |
|     Max drawdown    |      -4.8% |
|     Omega ratio     |       1.27 |
|    Sortino ratio    |       2.07 |
|         Skew        |       0.51 |
|       Kurtosis      |       5.21 |
|      Tail ratio     |       1.09 |
| Daily value at risk |      -0.6% |
Cumulative returns, Sharpe ratio and Drawdown of a Long Short Equity strategy
Cumulative returns, Sharpe ratio and Drawdown of a Long Short Equity strategy

Choice of the ranking scheme for the Long Short Equity strategy

The choice of ranking scheme is the most critical component of this strategy. In our example, we used a 1-day return to rank our stocks. Such a technical factor can be coupled with other indicators like moving averages, volume measures, etc.

It is also a very important decision whether to use momentum or mean reversion when ranking the stocks as different stocks would have different behaviours.

Another popular strategy is to use fundamental factors like the value and performance of the firms using a combination of P/E ratio, P/B ratio, profit margins, earnings growth, and other fundamental factors to come up with a ranking scheme.  

For example, the QMJ(Quality Minus Junk) portfolio of the AQR capital management company, ranks its stocks based on a quality score. This quality score is formed by combining three fundamental factors: profitability, growth and safety. More details about this strategy can be found in their research paper: Quality Minus Junk

Choice of capital allocation for the Long Short Equity strategy

After the ranking is done, the weights that we assign to allocate capital across our stocks can have a huge bearing on the performance of the strategy. In this strategy, we saw the equal-weighted approach where all the stocks were assigned equal weights.

We could have also assigned weights based on the daily returns, such that stocks that move farther from the average returns get bigger weights. Assigning weights based on market capitalization is another popular method to allocate capital, as it reduces exposure to risky small-cap firms. You can read more about position sizing here.

Rebalancing frequency for the Long Short Equity strategy

It is important to determine the period over which a particular strategy will give results. For example, since we were using price data, we were able to predict only for the next day.

However, if we had chosen fundamental factors, our model would have been able to predict weekly or monthly returns as well. The rebalancing frequency has an impact on transaction costs but at the same time it is slow in reacting to adverse movements in some portfolio stocks.

As with all strategies, this strategy also comes with risk. The risk lies in the deviation of the performance of the stocks selected in the portfolio from the expectation.

In the above example, if the securities on the long side see a fall in price and the securities on the short side see price rise, then the portfolio will suffer losses. Prudent risk management is required such as squaring of the stocks on hitting stop loss and keeping profit cap at the individual stock level.

Apart from this, the portfolio must be reconstructed with fresh stocks at regular intervals and the portfolio must hold a large number of stocks. This will help to limit concentration on a stock.

A typical sector exposure and the top 5 long short holding of AQR long-short fund is shown below. As you can see the fund is highly diversified with limited exposure to any particular sector.

Similarly, instead of taking large concentrated holding in a particular stock, it holds small quantities of different stocks in order to avoid exposure to company specific risks.

Also it can be seen that overall the portfolio is somewhat market-neutral with a slight bias towards the long side. This is in fact a latest industry trend, where more and more hedge funds are biased towards the long side to capitalize on rising equity markets.

More details about this trend can be found in the article on Bloomberg: Long-Short Hedge Funds Are Ditching the Shorts to Focus on Longs.

                                                      Sector Exposure (%)





Communication Services




Consumer Discretionary




Consumer Staples












Health Care








Information Technology












Real Estate












                                                       Top Five Long Holdings


% of Net Assets

MSCI International Japan Net Index JPY

Real time




Ahold Delhaize




Royal Mail


                                                       Top Five Short Holdings


% of Net Assets

Ocado Group




Kobe Bussan




Charter Commns


Historical performance of other hedge funds using long-short strategies can be found at EurekaHedge. The Eurekahedge Long Short Equities Hedge Fund Index is an equally weighted index of 907 constituent hedge funds.

The index shows a return of 10.35% in 2021 YTD (as of July 2021) and returns of 17.84% in 2020.

Transaction costs and slippages of the Long Short Equity strategy

Like any algorithmic trading strategy, for practical application, one must take into account the transaction costs that might come associated with it. Often strategies that might seem profitable might not be once you take into account the transaction costs and slippages.

Since in our strategy we are taking new trades daily, there would be a large number of trades and hence a significant amount of transaction costs. On the other hand, trades taken based on fundamental factors would be over a month or a quarter and hence, there will be a lesser number of trades and lower transaction costs.


In summary, a long-short strategy may help to generate less volatile returns in different market conditions but also involves some risk such as correctly predicting the performance of the stocks in the portfolio.

Explore our course on Mean Reversion Strategies in Python to learn more about this strategy along with other mean reversion strategies. Also learn how to backtest and paper trade your strategy before going live.

File in the download:

  • Long Short Equity strategy Python notebook

Disclaimer: All data and information provided in this article are for informational purposes only. QuantInsti® makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information in this article and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis.

AI-Powered Trading Workshop 2024