×

THIS is how to play the summer market slowdown

When the summer heats up, the market cools down.

August has historically been the worst month of the year for the S&P 500. According to data analytics platform Kensho, the index has fallen 0.8 percent on average in August since 1987.

But there are pockets of strength if you know where to look.

A safe strategy is to stay defensive. Utility stocks typically do a good job of dodging the August slump.

Look at names like Sempra Energy, Dominion Resources and CenterPoint Energy. They posted gains during the month more than 75 percent of the time and returned 2.5 percent or more on average. An added bonus: They pay dividends.

But while utilities have been a good bet in past Augusts, technology has not.

The sector consistently underperforms the broader markets. The S&P 500 IT Index has traded lower more than half the time in August, losing half a percent on average over the last 25 years.

Yahoo, Google and Oracle typically get hit as the summer winds down. Yahoo has been incredibly volatile over the years in August, plunging more than 30 percent in 2001 during the dotcom crash and rallying nearly 10 percent last August. Narrowing the data to 10 years, these three names are still underperformers—they trade negative at least half the time.

Lastly, something interesting has happened to gold near the end of the last five summers.

On Wednesday, the precious metal sat at 5½-year lows and continued to fall, but gold has finished August in positive territory four of the past five years. Over that short five-year period, gold has produced a 6 percent return on average, according to Kensho.

Miners Newmont, Barrick Gold and Goldcorp have also seen outsized returns during August, often rebounding from slumps in July. Newmont has rallied in August every year since 2010, returning nearly 10 percent on average. Barrick Gold, which has lost nearly 80 percent of its market value since the start of 2010, has rebounded hard in the month of August, seeing double-digit gains three times and losing ground just once (less than 1 percent in 2014).

Using Kensho analysis to go back 10 years, gold has still been a good bet, though not as consistent. It trades positive 60 percent of the time in August and returns 1.6 percent on average, outperforming the S&P 500's average loss of 0.2 percent.

If history is any guide, August is the month to brace for broad market losses—but there are may also be opportunities if you know where to look.

Reuters contributed to this report.

Disclosure: NBC Universal, the parent of CNBC, is a minority investor in Kensho.