Money is still moving into the stock market — and it looks like the trend is here to stay for a while, Wharton School finance professor Jeremy Siegel told CNBC on Friday.

The S&P 500 and the Nasdaq closed at record highs on Friday after better-than-expected economic growth offset a mixed batch of corporate earnings.

"This is an upward trending market. You can't go against it in this short run," Siegel said on "Closing Bell."

"There is no threat, I think, to this bull market, certainly as you can see on the near term," he added.

On Friday, the Commerce Department announced first-quarter domestic gross product expanded by 3.2%, higher than had been expected. It was also the first time since 2015 that first-quarter GDP topped 3%.

However, companies like Exxon Mobile and Intel released quarterly reports that missed expectations. The results overshadowed stronger-than-expected numbers from companies like Ford Motor and Amazon.

The rose 0.5% to 2,939.88 and the tech-heavy Nasdaq closed up 0.3% at 8,146.40 on Friday. The Dow Jones Industrial Average closed 81.25 points to 26,543.33 and closed 1.5% below its all-time high.

Siegel said the markets have been moving up over the last two or three years by a couple of points — "very narrow."

That said, "it takes something really big to get that jolt downward and certainly we haven't had anything like that," he noted.

What's needed to "spark a really big rally" is a trade deal between the U.S. and China, he said.

After a year of escalating tariffs and trade war rhetoric, both the U.S. and China have been signaling more recently that progress is being made toward an agreement.

"Look at how many of the firms have warned, 'Oh there's a slowdown in China,'" Siegel said. "That would brighten that outlook dramatically."

— CNBC's Fred Imbert contributed to this report.