The stock market's recent wild swings reveal that the so-called Trump rally was never about President Donald Trump, CNBC's Jim Cramer said Wednesday.

"It was just an asset class doing much better around the globe," Cramer said on "Squawk on the Street." And now "it's readjusting around the globe."

U.S. stocks started off 2018 sharply in the green, with the Dow Jones industrial average seeing its best January since 1994, while the S&P 500 saw its best January since 1997.

But equities lost most of those gains beginning Friday and continuing Monday. The Dow, after wild swings, rose 567 points Tuesday and was trending higher early Wednesday.

Some analysts on Wall Street had claimed the stock market's gains in January and last year were in anticipation of Trump's pro-business policies, including tax cuts and deregulation. Others had said U.S. stocks were simply matching a trend seen all around the world.

"Did Japan experience a Trump rally? No." said Cramer, host of "Mad Money." "It was just an inflation worldwide of stocks. And now we're resetting."

For his part, Trump has always taken credit for the rising stock market, tweeting at least 60 times about it since winning the 2016 election. In fact, he tweeted Wednesday, questioning why it took a hit.

In the "old days," when good news was reported, the Stock Market would go up. Today, when good news is reported, the Stock Market goes down. Big mistake, and we have so much good (great) news about the economy!