Ho hum. The S&P 500 finished Wednesday’s session with a gain of 1.98 points or 0.10% and the illustrious DJIA closed down 0.33 points, which, of course, amounts to 0.00% on the day. It must be late summer, right?

Well, as the Hertz commercials used to say, “Not exactly.” Sure, if you had an early tee time Wednesday morning and didn’t check your phone, your iPad, your new Apple watch, or the TV in the clubhouse at the turn, you would likely have looked at the close and assumed that it had indeed been a dull summer Wednesday in the markets.

But of course, this wasn’t the case. In the span of the time it took you to play the first half of the front nine, the U.S. stock market went into full-on freak-out mode – with the Dow diving nearly 300 points within the first hour!

At issue was the fact that while Chinese officials had pledged that Tuesday’s record devaluation in the yuan was a one-off event and there were no plans to continue pushing the currency lower, the yuan dove hard again overnight. In response, analysts everywhere started flapping their gums about the state of the Chinese economy and the expectations for China to drag down the rest of the world with it.

But Wait, There’s More

And while China got most of the headlines, there was another story that prompted the trading computers to hit the sell button repeatedly when the opening bell rang in New York. Reports indicated that one of the big bank holding companies in Portugal was suddenly in trouble. So naturally, with the play book for the European debt crisis well-worn and kept close at hand, every trader worth their salt knew what to do – sell everything.

As trading began in the U.S. European markets were tanking as bourses in Germany, France, and Italy were all down more than 2%. Therefore it wasn’t surprising to see the U.S. market take a hefty dive when the computers started whirring in Mahwah, NJ.

Sure enough, stocks sold off in the U.S. Moving averages were violated. Trend lines were broken. And support levels snapped like toothpicks. But then, just as things started to get ugly and the S&P 500 was approaching its recent closing lows around 2050, it happened. The short-covering blast, that is.

Wait, What?

Before those new to the currency devaluation game could confirm that renminbi was just another word used for yuan, stocks started to rebound. And as the rebound gathered steam, the uncomfortable dance to the downside, which at one point certainly felt a little like a flush lower, gave way to steady buying.

This wasn’t the usual big, algo-induced spike that took the S&P up 15 points in 15 minutes. No, this was different. This appeared to be consistent buying over a period of hours. Frankly, it looked a little weird.

So what gives? Why would traders go from fear to jubilation in a matter of hours? Why would a market that was supposed to be succumbing to a “death cross” go from down 278 points to flat?

The appearance of a rebound in the oil patch, that’s what.

It’s the Oil Patch, Stupid!

There is an old saying in the market… “At what price value?” In short, this phrase refers to the fact that when something has been falling it eventually (key word) becomes a value play. At some point, the selling becomes stupid and values are ignored. Think March 2009.

With the stock in the “oil patch” having fallen more than 33% since last summer and nearly 20% since this spring, somebody must have thought that the stocks contained in the XLE (Energy Select Sector SPDR ETF) were worth a trade. Because, in short, while the market had been struggling over the last few days, the energy sector appeared to be reversing to the upside. And then by Wednesday afternoon, it looked like the oils might actually be starting to rally.

Energy Select Sector SPDR ETF (NYSE: XLE) – Daily

So, suddenly every fast-money trader and every computer programmed to focus on momentum was busy buying energy names. True, such a move could certainly be attributed to short-covering as opposed to “real buying.” But the bottom line is what looked like a rebound in the oil patch was likely responsible for what I have been classifying on Twitter as “idiotic behavior” in the major indices.

Can It Last?

So, will it last? Who knows? Frankly, the rally in the energy names would appear to be a classic example of a dead-cat bounce. Typically these types of moves tend to be short and sharp – then give way to a resumption of the big picture trend. And in all honesty, I’m not convinced value players are jumping into the oil patch with both feet here!

However, the key is to recognize that the market these days is all about the next hour, the next trade, and what where the algos decide to take the indices next. So yesterday, the focus on the oil patch managed to keep the bears at bay. But again, the question we have to ask ourselves is, can it last?

Don’t be late to the party – Click Here to see what 4500 Wall Street Analysts say about your stocks.