These stocks should lead a late-summer market breakout

Dan Dalton | Getty Images

Despite a slow melt up into record territory this summer, the index has gone 25 sessions without a gain or loss of more than 1 percent. If history is any guide, the benchmark is about to break out of these summer doldrums with certain stocks leading the way.

Below are the best stock sectors to own when the market is moving out of a dull period, according to Kensho, a quantitative tool used by hedge funds.

Since 1985, the S&P traded sideways in a similar fashion as today 18 times. One month later, the index was reliably higher, up on average 1 percent.