Stocks are hitting record highs again as investors cheer a U.S.-China trade detente and high hopes for a rate cut as soon as this month.
But while Wall Street bets on those two market-moving developments, a better glimpse of the 's next move could lie in the historical data, according to Ryan Detrick, senior market strategist at LPL Financial.
The S&P 500's first-half rally puts it in good company, he says — of the 20 times stocks have rallied by more than 10% in the first six months of the year, the S&P 500 has had an average return of 7.5% in the final six months.
However, the greater the gains from January to June, the higher the chances of a sharp pullback in the second half, Detrick told CNBC's "Trading Nation " on Tuesday.
"Where it gets a little worrisome is when you're up 15% for the year or more, so really stretched like we were, that's when … the average correction peak to trough [is] about 12%," he explained.
The S&P 500 rallied by more than 17% in the first six months of the year, the 10th time in the past seven decades that it has gained by more than 15% over that stretch. In those years, the index has pulled back an average 12.1% in the second half, and by as much as 34% during the market crash of 1987.
"Let's not get too comfortable here," said Detrick. "During this scary third quarter that we're in right now, it makes sense that we could get some type of a correction — maybe even as much as a double-digit correction here when all is said and done."
Even if stocks do pull back sharply before year's end, the possibility of a rebound back to highs is still a high possibility, says Detrick.
"We all saw that scary fourth quarter, and then sure enough three to four months later, we're making new all-time highs. Why is that? Well, people get so bearish and so scared, so fast," he explained. "That contrarian in us thinks this rally still has a ways to go."
In the case of a correction, Detrick would use the sell-off as a buying opportunity to rotate into cyclical stocks and emerging markets.
"Those are two groups we think can really do well off a well-deserved break," said Detrick.
Cyclical sectors, such as industrials and consumer discretionary, have outperformed the broader market so far this year. The EEM emerging markets ETF has lagged on trade war concerns, though could stabilize and bounce on any progress in the U.S.-China negotiations.