Algorithmic Trading Tips 11.

SELL IN MAY AND GO AWAY?

HOW TO PROFIT FROM SEASONAL PATTERNS.

Every year, the old adage “Sell in May and go away” is widely discussed in the financial media. But is this adage reality or just a myth? And can this simple seasonal strategy work at all if everyone knows it? Using Tradesignal; traders, portfolio managers and analysts can examine these and other seasonal pricing anomalies quickly and safely to improve their investment decisions.

Empirical evidence for summer weakness.

In 1964 the Financial Times wrote about the “Sell in May” effect, it took decades for the academic world to study this phenomenon, which says shares should be avoided during the summer months. The most comprehensive study on this subject was published in 2002 (The study can be downloaded here.). The research duo Sven Bouman and Ben Jacobsen examined a total of 37 international stock market indices of different industrialised and emerging countries and calculated the respective performance and risk figures for the period from November to April (winter period) and the period from May to October (summer period) in order to compare them.

The results were clear: 36 of the 37 examined stock markets revealed a significant “Sell in May” effect, that is the performance of a buy-and-hold investor was worse than that of the investor, who did not hold any shares in the months of May through October and re-boarding in November to stay invested until the end of April. Also, from a risk perspective, the winter period turned out to be a better choice over the summer period: The standard deviation was lower for the “sell in May” strategy compared to the passive buy-and-hold approach.

Seasonal indicator in the practical test.

To ensure the extent to which the seasonal pattern still works today, every trader should create their own analysis. One possibility here is the application of an indicator, which enables you to visualize such a seasonal pattern in no time at all. Figure 1 shows the seasonal pattern of the Dow Jones Industrial Average on the basis of the last 10, 20, 30 and 40 years. The result confirms the formation of a major high between late April and mid-May and the subsequent sideways or downward movement of the stock markets in the summer months. At the same time the formation of a seasonal low typically can be observed at the beginning of October. However, interestingly, is the fact that this pattern has not undergone any great variations with time.

FIG. 1: SEASONAL PATTERN FOR DOW JONES INDUSTRIAL AVERAGE.

The old adage “Sell in May and go away” is reflected in reality. In the last decades, the Dow Jones performed significantly weaker between May and September than between October and April.

 

Trading strategy code in Equilla.

Whether you want to use this information as a filter for other trading signals or for adjustment of the position size to the seasonal trend – using Tradesignal the implementation of the “Sell in May” strategy into a program code and the subsequent evaluation is a simple task. For this purpose, just copy and paste the following code as a new trading strategy and store it for later use. The process is explained in detail in our Trading Tips video.

The following program lines contain the instructions for the long entry at the beginning of October and getting out again in early May. Of course, further components such as a trend filter or an initial stop can be implemented – for our present purpose it was intentionally waived.

CODE 1: SELL IN MAY TRADING STRATEGY.

This simple code contains the instruction for long entry in early May while the exit takes place in early October.

 

Let’s take a look at how the equity curve of this primitive seasonal approach would have developed in the past for the DAX. Figure 2 shows impressively that staying away from the stock market during the summer months on balance represented a good decision. On the basis of the equity curve you can see that this simple trading rule has outperformed a passive buy- and-hold investment in the DAX over the last 20 years both in terms of performance and on the basis of volatility.

FIG. 2: SELL IN MAY STRATEGY APPLIED TO GERMAN XETRA DAX INDEX.

The simple “Sell in May” strategy has beaten a passive buy-and-hold approach for the DAX in the last 20 years.

This statement is also true for other benchmarks like the S&P 500. Especially in bear market phases the long exit by the end of April turned out to be an excellent timing signal, since the majority of the drawdowns could be avoided by following the “Sell in May” approach – the summer months of 1990, 2001, 2002 and 2008 serve as good examples here.

Admittedly one thing may not be concealed at this point: No seasonal pattern is set in concrete! While skipping the summer months has been of beneficial in strong downward phases, in certain bull market years, the flip side of the coin is evident: An investor who followed the “Sell in May” strategy in the years 1993, 1997 or 2005 and 2012 missed significant gains.

What does the performance report say?

Finally let us analyze the results. By clicking on the performance button Tradesignal provides a detailed insight into dozens of key figures such as:

  • Net profit / loss
  • Hit rate
  • Profit Factor
  • Maximum Drawdown

 

For the DAX, the “Sell in May” approach can be summarized as follows: Since 1991, 22 trades were carried out – 19 of which ended with a positive result. Excluding transaction costs, a net gain of around 12000 points total was generated, the largest drawdown was around 3100 points. Figure 3 shows an excerpt of the performance report – this time for the Dow Jones Industrial Average since 1950.

FIG. 3: PERFORMANCE REPORT FOR THE DOW JONES INDUSTRIAL AVERAGE.

The “Sell in May” strategy has achieved a hit rate of almost 75 percent since 1950.

With a hit rate of 75 per cent, the seasonal strategy was successful. The report also includes another important message: The “Sell in May” strategy generated four false signals in a row in the late seventies – proof that the seasonal approach by no means has to work every year.

 

Conclusion.

The reasons for the “Sell in May” or Halloween effect still aren`t exactly clear, but one cannot be dismissed out of hand: In the past, the famous adage of selling at the beginning of May and reentering the stock market in October very often proved to be the right decision. However, it must be noted that the assessment of these seasonal strategy greatly depends both on the chosen market and the investment period. Basically, this price anomaly is a kind of loss limiting approach, which also has its price if the market rises over the summer. With Tradesignal almost all price patterns and trading approaches can be translated in clear, rule-based strategies and tested so that wrong decisions can be eliminated. By the way, if you need any help, just contact our support team and we would be pleased to contribute to your success