NEW YORK (TheStreet) -- I was talking to Jim Cramer today about the strange connection between oil prices and stock prices, a relationship that makes no intuitive sense but needs to be respected because it has become so strongly entwined.

Jim chalks the connection up to algorithmic programs now running rampant throughout our markets, noting that intuitively, nothing could be more wrong about a market that "enjoys" seeing oil rally.

He notes that there has been an "oil dividend" delivered by the lower price of oil in the past several months, with gasoline prices down almost 20 cents a gallon in the last nine weeks. This should help those retail companies that rely upon consumer spending. It all should make sense –- lower gasoline prices put more money in consumers’ pockets and gives them more discretionary income to spend at Walmart  (WMT) and Macy's (M) . Yet, he saw that the big move up in oil on Tuesday was accompanied by a big move up in consumer stocks.

I noted to Jim that in my long career trading oil it was not always this way. Back when I began my trading in the 1980s, there was a definite inverse relationship between the oil market and the stock market. But that changed after the turn of the century and we started talking about a "risk trade" where investment capital would flow in and flow out of all the many markets in tandem, in oil, bonds and commodities all at the same time.

It may not make sense, but as an investor it is critical to be aware of these relationships.

I talk more with Jim about the relationship between oil and stocks in the video above.

At the time of publication, the author held no positions in any of the stocks mentioned, although positions may change at any time.

Follow @dan_dicker

This article is commentary by an independent contributor, separate from TheStreet's regular news coverage.

Dan Dicker has been a floor trader at the New York Mercantile Exchange with more than 25 years of oil trading experience. He is a licensed commodities trade adviser.

Dan is currently President of MercBloc LLC, a wealth management firm and is the author of "Oil's Endless Bid," published in March of 2011 by John Wiley and Sons.

Dan Dicker has appeared as an energy analyst since 2002 with all the major financial news networks. He has lent his expertise in hundreds of live radio and television broadcasts on CNBC, Bloomberg US and UK and CNNfn.

Dan obtained a bachelor of arts degree from the State University of New York at Stony Brook in 1982.

More from Opinion

Elon Musk's Latest Twitter Tirade Is the Dumbest Thing on Wall Street

Elon Musk's Latest Twitter Tirade Is the Dumbest Thing on Wall Street

Elon Musk's Twitter Tirade Is the Dumbest Thing on Wall Street

Elon Musk's Twitter Tirade Is the Dumbest Thing on Wall Street

Why Google's Search Momentum Won't Be Badly Hurt by New EU Rules

Why Google's Search Momentum Won't Be Badly Hurt by New EU Rules

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Time to Talk Tesla: What Happened This Week, Elon?

Time to Talk Tesla: What Happened This Week, Elon?