The term “Halloween” always comes with “tricks or treat” in general. In the stock market, based on investors behavior Halloween indicator formed. Sometimes, it refers to the “Sell in May and Goes Away” Strategy. According to the analysis of Bouman and Jacobsen in 2002, the Halloween indicator effect is strongest in Europe since the 17th century and the effect has appeared in most of the countries. Before going into the depth, let’s have a look at the definition of Halloween Indicator.
What is the Halloween or Sell in May and Go Away Indicator
Though factors behind “sell in May and go away” strategy is still not quite clear, investors’ sentiment plays a significant role in it. November is the Halloween month for everyone in the world and in the stock market also Halloween phase begins from Nov and ends in May. It is believed that the price action is generally high in May. According to research, investors sentiment works best in the period of Nov to May and after May the price generally declines to some extent. Therefore, it is advisable to buy shares on Nov and sell them on May as per the strategy.
Halloween Indicator Data
Let’s have a look at the collected data of “sell in May” strategy. In order to clear the strategy’s effect, an image is attached below:
This is an overall collected data based on the strategy. According to the information, foreign flows into India have been much higher during the period of Nov to April in comparison to May to Oct. This strategy was seen in the last 9 to 10 years. As per the data, India stands at Rs. 22,306 cr. in comparison with an outflow of Rs. 4,618 cr during the months of May to Oct in the year 2017.
A ready to use Amibroker AFL code for the Halloween Indicator on Sell in May and Go Away follows. To backtest the sell in May and go away system, enter the formula within the AFL Editor, then press “Backtest.” You can even wish to restrict the analysis to a watchlist which includes simply your choice of symbols with the use of the “filter” environment within the analysis window.
SetPositionSize( 50, spsPercentOfEquity ); // 50% allocation size
SetOption(“MaxOpenPositions”, 2 ); // 2 positions max
SetTradeDelays( 1, 1, 1, 1 ); // trade next day
// buy in October if close is above 50-day moving average
Buy = Month() == 10 AND C > MA( C, 50 );
// sell in May and go away
Sell = Month() == 5;