Scott Minerd, managing partner at the global investment and advisory firm Guggenheim Partners, has a message for investors.

"This is the rally to sell, not to buy into," Minerd told CNN correspondent Paula Newton on CNNMoney's "Markets Now" on Wednesday.

Minerd said a recession could hit in about two years. He cited two historical patterns: A narrowing of what's called the yield curve, the gap between short and long-term Treasury rates, and a move toward what economists consider full employment.

But there are still opportunities to gain in the market, Minerd said.

"That penultimate year before a recession often has the best return for equities, on average in the area of 15 or 20%," he said.

The recent surge in earnings, he added, and relatively low interest rates mean that "we probably have some more room to run in stocks."

"I think for people that are in the market, they should stay in," Minerd said. But "you're kind of getting late in the game," to start buying, he said.

Related: The US economy just hit a milestone

Last year's tax cuts and more government spending could stimulate the economy in the short term, but all that deficit-financed help from Washington could also speed the demise of the recovery.

For years, the economy has recovered slowly but steadily from the Great Recession, which ended in 2009. At 106 months old through April, the recovery is tied for the second-longest economic expansion in American history.

But it won't set any records for speed. It took far longer than many hoped for unemployment to get back to healthy levels, and wages have only recently begun to accelerate meaningfully.

"Markets Now" streams live from the New York Stock Exchange every Wednesday at 12:45 p.m. ET. On Wednesday, Newton filled in for the program's regular hosts, CNNMoney editor-at-large Richard Quest and CNNMoney anchor Maggie Lake.

Related: Watch 'Markets Now' here every Wednesday at 12:45 p.m. ET

Each week, the 15-minute show features interviews with markets experts who share insightful commentary on the news. You can watch "Markets Now" at CNNMoney.com/MarketsNow from your desk or on your phone or tablet.

Last week, hedge fund manager Kyle Bass told Quest that he believes demand for oil is about to go up.

Can't watch at 12:45 p.m. ET? Don't worry. Interview highlights will be available online and through the Markets Now newsletter, delivered to your inbox every afternoon.

— CNN's Matt Egan contributed to this report.