AP Photo: Rick Bowmer

The price of oil has been rising strongly during the past few weeks, with the cost of a barrel of Brent Crudethe type of oil used to determine its price in international markets–soaring from $110 at the end of January to $124 at the end of February, a jump of 12.7 percent over a single month. We’ve seen the effects of that price increase most immediately when we fill our gas tanks, with the cost of a gallon of gasoline rising by 30 cents over that same time frame. According to the Washington Post, gas prices closed out the month by rising for 22 consecutive days.

But oil prices have an effect on the stock markets as well, in ways that can be much more long-lasting. What can be painful at the gas pump can be a positive thing for our portfolios. While higher energy costs can hamper the overall economy, recent research shows that, in the current economic landscape, oil prices and stock prices tend to move in the same direction. And the energy sector accounts for about 13 percent of the corporations in the S&P 500, so a jump in energy costs is going to result in direct, tangible benefits for a large number of American stocks.

There are other macroeconomic effects as well. For one thing, oil prices usually indicate an inflationary trend. Rising oil prices tend to make everything more expensive, and stocks tend to rise along with that inflation figure. Rising oil prices can also be a sign of a strong economy, which is also good for stocks. Nadeem Walayat, writing for the Market Oracle site, demonstrated that the path of the price of a barrel of oil and the trend line of the Dow Jones industrial average have moved in the same direction more often than not over the past decade.

Oil Shock

The one caveat to that relationship is an oil shock. A sudden spike in oil prices is likely to curb demand for energy from all corners of the economy and create a slowdown in economic activity. There is a huge difference in economic effects between an orderly movement in crude oil prices and a sudden shock. “It is only after oil surpasses a certain undefined and ever changing ‘pain threshold’ that all of a sudden oil turns into a killer of economic activity,” says Simon Maierhofer of the ETF Guide. The current upswing in oil prices has not–at least not yet–risen to the level of an oil shock.

We’ve seen the same type of movement on the downward side as well. In 2008 the price of oil reached at $147 a barrel, at the same time that the S&P 500 was sitting at around 1,400. Oil prices lost about three-quarters of their value over the next year, while the S&P 500 lost half of its value.

It wasn’t always thus; until fairly recently, it was assumed that rising oil prices were not just bad for the economy but for the stock market as well. A researcher named Howard Simons, who serves as a strategist for Bianco Research, plotted the correlation of the one-year rolling average for both the S&P 500 and crude oil prices, and found that prior to the crash of 2008, the relationship between the two was negative more often than not. But since then, the correlation has not just been positive, but strongly positive.

Of course, those effects are on the broader markets. Higher oil prices have different impacts on different companies, of course, and they are of great benefit to companies in the energy business. The SPDR S&P Oil & Gas Exploration & Production ETF, which attempts to replicate the S&P’s oil and gas industry index, has outperformed the Dow Jones Industrial Average by roughly 43 percent over the last three months.

As we are so often told, past performance is no indication of future results. The question for the immediate future is whether the heightened correlation between oil and stock prices is a temporary thing, an artifact of the unprecedented meltdown in the financial sector, or whether there has been some change in their interrelation and we are likely to see the correlation continue.

A Price Peak?

Nevertheless, we may also have seen the peak for oil prices, at least for the immediate time. The price of oil futures has been leveling off or even dropping in the past week, and the government reported on Thursday that America’s oil supplies have increased unexpectedly. And all this is happening at a time when Americans are using less gasoline: The Energy Department said that demand for gasoline over the four weeks ended Feb. 24 was 6.7 percent lower than it had been a year earlier. All these factors could very well drive oil and gasoline prices down in the coming months.

Many stock watchers are already incorporating this vision of the future into their picks and pulling back on stocks in the oil and gas industry. This week analysts at Tudor Pickering Holt, an energy investment bank in Houston, downgraded their outlook on several stocks, including the oil and gas companies Plains Exploration, BG Group, Concho Resources and Laredo Petroleum.

These decisions were fueled in part by the fact that when Brent Crude has gone over $120 a barrel–which has happened twice previously in the past five years“macro deterioration and/or demand fears led to a precipitous pullback in crude prices,” Tudor reported. It’s possible that, despite the crunch at the gas pump, we’re already seeing the beginning of that pullback.