So many tailwinds for this market, says Cramer

The Ebola epidemic. An earnings miss from Microchip Technology dragged on tech sector. Falling oil prices.

There were many headwinds facing the stock market only a few days ago, and yet many of those challenges have been either addressed or downplayed, sending stocks higher, CNBC's Jim Cramer said Wednesday.

Jim Cramer
Adam Jeffery | CNBC
Jim Cramer

Stocks were mainly flat during mid-morning trade on Wednesday, pausing after the S&P 500's biggest jump in a year on Tuesday, and following several volatile sessions of losses last week.

"Who would have thought, I mean, the rather remarkable things that have occurred," Cramer said on "Squawk on the Street."

The spread of Ebola in the United States, for example, seems to have been contained. After Microchip's dismal quarter, other tech companies came out with relatively strong results. But a reversal in oil prices was key, Cramer said.

"When all was said and done, the thing that needed to happen most was the one that was most bizarre and counterintuitive. You needed to see oil bottom," Cramer said. "First of all, a lot of hedge funds were in oil, but secondly there were a lot of covenants that would be triggered. There would be a lot of problems in the oil patch and a lot of companies would literally have to go bankrupt if that thing went to $70."

With oil at $80 a barrel, though, it's high enough for businesses to turn a profit and low enough to help consumers, Cramer said.

Read MoreBrent above $86 as buyers slowly return

Looking forward, though, Cramer said third-quarter earnings reports will continue to move markets.

Cramer also thinks the 1,943 retracement level on the S&P 500 index is needed to reverse a bearish trend, meaning the index will need to close above that level to signal a move higher.

DISCLOSURE: When this story was published, Cramer's charitable trust did not own Mirochip Technology or oil.