We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.
BOOK YOUR FREE STRATEGY SESSION NOW >>Traders have been fascinated by the “Sell in May and go away” saying for years.
In today's video, we'll try to understand if this sort of trading rule can actually be effective or if it's just a myth...
So we translated it into code, developed some variations of a strategy that sells in the month of May, and tested them on the S&P 500.
Are you curious to see the backtest results?
Then watch this video!
Hey everyone and welcome back! One of the coaches of Unger Academy here, and today we’re going to talk about the famous phrase "Sell in May and go away".
Very often we happen to hear conflicting opinions on these so-called unwritten rules of trading. As always, it is necessary to test an idea from the past, since this is obviously the only data we have to evaluate the actual validity of these rules. And that's exactly what we’re doing here at Unger Academy.
Now a lot is said about the famous phrase "Sell in May and go away". But what does this phrase really mean? And also, does it really work as so many say or is it just one of the many stories that are peddled to us common retail traders? Well today’s video aims at answering these questions.
This is a chart of the S&P 500, a future that certainly needs no further explanation. It is the most traded in the world and it is also the instrument for which we have the most historical data. This will be of great help if you want to test a "monthly" approach, which will therefore make few entries year by year.
Let's move now to the MultiCharts editor, where as you can see I've already coded a few lines so as to make short entries only in the month of May to understand if the idea of selling in May really makes any sense or not.
So here are two inputs set, which are the stop loss set at $2,500... I recommend you use a very large stop when you use daily bars or high timeframe bars because otherwise there could be some errors in the backtest calculation. Another input is called MyMonth, so "my month" trivially, which is clearly set to May, so month 5, the fifth month of the year.
And then on lines 3 and 4 you can see the entry and exit conditions of the strategy. Specifically at line 3 we tell the system to sell with limit orders at the first useful bar at the highest of the previous session only if the current month is the 5th of the year, that is to say if the current month is May. So, basically, you're applying a reversal approach, which we know can work pretty well on this market, to the trading window of the month of May, which is the one indicated by the unwritten rules of trading.
In line number 4 you’ll see the exit conditions. "Bars since entry" is a MultiCharts keyword that is used to count the bars, and in this case, we set a condition that the "bars since entry" must be greater than zero in order to close the trades at the end of the session. This means that we close our positions at the end of the second trading day, namely the trading day after our entry.
In line 6, so the last one of this script, you can see the stop loss command previously set at $2,500. Now let's see how this strategy has done in the past years.
Now we're back to MultiCharts and here you’ll see a few examples of trades that the strategy makes. The trading window is from May to early June, so basically the whole month of May. And we enter on the highest of the previous bar, of the previous candlestick. As, for example, in these cases here, where the strategy tries to make reversal entries within the month of May. Every year in May.
Let's also look back a little further to see if there are any trades. July, June... Here's another May, ok. In short, the strategy makes the trades you want and then you just have to go and see the backtest. And here, unfortunately, the troubles begin. You can see that the equity line speaks for itself. It loses, you could say, not constantly, but certainly in the last two years, between 2020 and 2021, this strategy has suffered the pains of hell, you know, because every trade made was at a loss.
Obviously short selling a market of this type is a very difficult thing, which very often requires additional rules. But here is the first test at your disposal, going back to 1999, and certainly that’s a lot of available data... As you can see in the first 15 years, the strategy was still in profit, even though with a very bad equity, and then it… well, it simply started to lose.
So, let's try to modify the script and reverse the entry orders. Maybe using trend-following entries instead of reversal entries in the month of May could be more rewarding. To do so we can go back to the editor. It will be very simple. In this case, we're going to sell on the lowest of the previous bar, so we simply have to change the function from "Highest" to "Lowest", so it's calculated on the lowest, of course. And we also change the order type, which will be stop instead of limit.
So let's compile the strategy and see what results it produces. And lo and behold, these are the results, which as you can see persist along the same lines, if not worse. Because here are the losses, a total loss of $21,000 with a negative average trade of $130 in 160 trades.
So it really seems that trading this market with short positions doesn't work at all. But what if we interpret this "sell in May" in a different way? Maybe in this case, to sell doesn't mean going short and exploiting the downward movements of this market but rather to close the long trades before the beginning of May.
Let's make this test and see whether the results are more satisfactory. So back to the Power Language Editor we go. And in this case, we're going to create a strategy that trades only long positions, so it is opposite to the previous one. Here are the inputs that we need: the stop loss, the initial two months in which the strategy trades, and the maximum number of days to stay in the market.
Again, the conditions of the strategy are written in lines 3 and 4. So we've got two trading windows, which are this one from March to May and another one that goes from October to December, so after the summer months that are generally the most downward, and obviously May itself.
We'll buy at the lowest of the previous bar with limit orders. And after at most 3 days, we close the positions. In this case, too, I added a stop loss of $2,500.
So let's take a look at how this strategy works, and as you can see, things have definitely changed. Of course, it's a very optimized strategy, very filtered you know because we're going to identify only the best trading windows for this particular filter, and so I recommend being very careful when trying to filter this type of strategy which already has very stringent conditions.
From 1999 this system would have earned $120,000 with a maximum drawdown of about $30,000. Definitely better than the results we got before we made these last edits.
This is just a starting point and the results obtained don't look very good either when we work on the short side and when we work on the long side. Certainly, the long side is much easier because this market has mostly risen in the last twenty years and so it is obvious that the short side is definitely the most difficult, while the long side will always have an advantage in this market.
So, obviously, there are no optimal results. This kind of strategy is, as previously said, very dangerous because the number of trades is very low. Also, there have been only 370 trades since 1999, so in 20 years of trading, 370 trades are too few and not enough to validate the efficacy of this strategy.
So, unfortunately, with a bitter taste in our mouth, we're here to say that the concept of "Sell in May and go away" has certainly tickled the minds of traders around the world, but in terms of numbers, there is nothing that actually confirms the fact that May is a much more bearish month than the average of the other months.
And with that, the video has come to an end and we really hope that this has been incredibly helpful to you.
Don’t forget to give us a Like, subscribe to our channel and click on the notification bell so you won't miss the release of all our new videos coming out.
Below you'll also find a link to a completely free webinar by the 4-time world trading champion Andrea Unger, who will explain step-by-step how to approach systematic trading.
Thanks so much for watching! Will see you soon! Bye-bye!
We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.
BOOK YOUR FREE STRATEGY SESSION NOW >>Andrea Unger here and I help retail traders to improve their trading, scientifically. I went from being a cog in the machine in a multinational company to the only 4-Time World Trading Champion in a little more than 10 years.
I've been a professional trader since 2001 and in 2008 I became World Champion using just 4 automated trading systems.
In 2015 I founded Unger Academy, where I teach my method of developing effecting trading strategies: a scientific, replicable and universal method, based on numbers and statistics, not hunches, which led me and my students to become Champions again and again.
Now I'm here to help you learn how to develop your own strategies, autonomously. This channel will help you improve your trading, know the markets better, and apply the scientific method to financial markets.
Becoming a trader is harder than you think, but if you have passion, will, and sufficient capital, you'll learn how to code and develop effective strategies, manage risk, and diversify a portfolio of trading systems to greatly improve your chances of becoming successful.