It's less than 100 days until Americans head to the polls for the presidential election.
The stock market could be a crucial barometer as to who takes the White House in November, according to Ryan Detrick, senior market strategist at LPL Financial.
"When you get within three months of the election which is about next week or so, how stocks do has a really good track record for who might win," Detrick told CNBC's "Trading Nation" on Tuesday. "If the S&P 500 is higher, the incumbent party tends to win. And if the S&P 500 is lower the incumbent party tends to lose."
Detrick said this three-month metric has correctly predicted the outcome of a presidential election since 1984. Since the late 1920s, it has been right 20 out of 23 times.
His theory even proved correct in 2016, a year in which the polls showed Democratic nominee Hillary Clinton decisively in the lead.
"Everyone thought Hillary Clinton would win except the stock market. We had weakness into that. The Dow was down nine straight days ahead of that election, and then copper, more of an industrial metal President Trump liked, had a record 14-day win streak directly ahead of that election," said Detrick.
As for this time, Detrick notes that it is an atypical year and an unconventional presidency.
"2020 is a year that has spun everything on its head. Think about this – gold is making all-time highs as we speak, the S&P made all-time highs earlier this year. You have to go back to 1979, the last time we saw both of those asset classes making new all-time highs," he said.
A Trump win may largely depend on whether the coronavirus pandemic is contained with a vaccine or therapeutics and whether the economy can continue its recovery, one he sees as more a "square root sign" rather than a "V" shape.
"If the economy is strong and the stock market is strong, that tends to support the current administration and if it's weak, obviously that's a headwind and that's what history has told us," said Detrick. "But still, stocks are strong. That probably means President Trump has a little bit of a better chance to win than some of the recent polls would suggest. We're still three months away, though."
The U.S. presidential election is scheduled to take place Nov. 3.