There’s an old investing saying that, in one of its forms, goes:

Sell in May and go away
Don’t come back till St Leger Day.

The idea is that stock markets tend to underperform during the summer months when folks have better things to occupy their time, like getting drunk at the Henley Regatta and scoffing strawberries at Wimbledon. And then when the final classic horse race of the season is over in September, get what’s left of your cash back into shares, ready for a winter rally.

With the vast bulk of share trading now being done by the big investing institutions who really aren’t the least bit affected by summer distractions, it really doesn’t sound like that makes much sense in these modern days, but are there any statistics to back it up?

A poor success rate

The broker Tilney Bestinvest has looked at the FTSE All Share between 1 May and the second week in September, since the day of the stock market Big Bang deregulation back in 1986 up until 2015. It found that 19 of the 29 summers examined would have made profits for investors who didn’t sell and go away. A strategy that only works around a third of the time really isn’t much of a strategy at all — much better, I think, to base your stock market investing on rational analysis than on rhyming couplets!

On top of that, I think there are sound reasons to think that summer 2016 would be a very bad time to choose to stay away from the stock market. I see all sorts of indications that bearish sentiment is coming to an end and plenty of bargains might not be around much longer. Last year, you’d have lost about 10.5% during the summer months if you’d invested in the FTSE 100 while the oil price slump was in full swing and fears of a meltdown in China were growing almost daily. But that shouldn’t make you hold back this year.

What should you buy?

It’s those very reasons, or at least the reversal of them, that make this summer an enticing time to stay in. Oil has picked up from $30 lows and is trading at around $43 per barrel. Everyone knows production will have to be frozen eventually as producing nations are having their pips squeezed by low prices. As a result, shares in BP are up 17% from their February low, and at Royal Dutch Shell we’ve seen a 42% recovery since January’s low — and there will surely be further gains if oil picks up some more.

I reckon there are some great bargains in the banking sector too, with Lloyds Banking Group and Barclays on forward P/E ratios of just 8.8 and 10.5 respectively. With share prices so low, Lloyds’ dividend should yield as much as 6.5% if you buy now, with Barclays’ dividend set for rebuilding over the coming few years.

Then there are dividend payers whose yields are looking solid — there’s a well covered 5.8% from Barratt Developments on the cards, 5.9% from SSE, 5.1% from Centrica… and many more. How about top-class growth shares? On a forward P/E of 28, ARM Holdings hasn’t been this cheap in years.

Roll up, roll up

No, this is not the time to be walking away from the stock market, not when the FTSE has opened the doors to its Grand Summer Sale!

Ignoring the seasons, and just buying great shares and holding them for the long term, could set you on your way to a cool million. But don't take my word for it, get yourself a copy of The Motley Fool's 10 Steps To Making A Million In The Market report. It takes you through all you need to know, one step at a time.

What you'll learn, more than anything, is that the secret to long-term financial success is to spend less than you earn, invest your savings in shares, and perhaps most importantly of all... keep a cool head when all around are losing theirs.

What's more, it won't cost you a single penny of your savings to get yourself a copy, so just click here now for your completely free report!

Alan Oscroft owns shares of Lloyds Banking Group. The Motley Fool UK has recommended ARM Holdings, Barclays, BP, Centrica, and Royal Dutch Shell. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.