Why It Does Not Pay To Sell In May
“Sell in May and go away” is a popular phrase in investing: the idea is to exit stocks in May and then buy them back in November. But even though that might work out sometimes, history suggests it isn’t the best strategy for building long-term wealth. Here’s why.
Why would investors want to sell in May?
In theory, the phrase makes sense. The summer months (May – October) are generally worse for stocks than the winter months (November – April). Big traders tend to take vacations in the summer, so there’s often less trading volume. And that can lead to a summer lull in stock prices.
With less trading volume, you could also see bigger price drops as it doesn’t take as much sell pressure to move the needle. (The same can be said for the upside, though, which is one reason we get Santa Claus rallies).
So is it wise to give your stocks a summer vacation?
For long-term investors, probably not. I asked ChatGPT to write some code to backtest the results in TradingView for the S&P 500 index (SPX). The index dates back to 1871 in TradingView, so that’s how long I tested it. The strategy works like this:
- Sell the SPX on the first trading day of May (into US dollars).
- Buy back into the SPX on the first trading day of November.
Before any trading fees, a $1,000 investment in the “sell in May” strategy would be worth about $55,000 today. And while that sounds like a lot, it’s only about 2.7% growth on average per year. But if you’d simply bought the index and never sold it, you’d have about $866,000 to your name – around 4.5% growth per year. That’s nothing spectacular, either, but it still suggests (in this case) that “time in the market is better than timing the market”.
Here’s the code for the strategy if you want to try it out for yourself in TradingView (and this video explains how to do it).
//@version=4 strategy("Sell in May, Buy in November", shorttitle="SiM_BiN", overlay=true, pyramiding=0) // Input for the investment instrument you want to trade symbol = input("MSFT", title="Symbol") // Fetch the investment instrument's price data price_data = security(symbol, "D", close) // Calculate the month of the bar's opening date month_open = barstate.isfirst ? na : month // Define the buy and sell conditions sellCondition = month_open == 3 and barstate.isnew buyCondition = month_open == 9 and barstate.isnew // Plot the investment instrument's price data on the chart plot(price_data, title="Price", color=color.blue, linewidth=2) // Close positions and place orders if (sellCondition) strategy.close("Buy", comment="Close Buy") if (buyCondition) strategy.entry("Buy", strategy.long) // Highlight the buy and sell signals on the chart bgcolor(sellCondition ? color.new(color.red, 80) : na, offset=1) bgcolor(buyCondition ? color.new(color.green, 80) : na, offset=1) // Plot buy and sell markers on the chart plotshape(buyCondition, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small) plotshape(sellCondition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)