Gas Prices lagging Oil prices

Given the importance of oil prices in determining gas prices [1] a frequent question that seems to arise is how soon after oil price changes are changes actually seen at the gas pump?

It takes 3 to 6 months for oil to make it through the refining process to end up as gasoline at your gas station. However, watching both oil and gas prices daily it seemed to me that oil price changes turned up in gas prices much more quickly than this. A Pricelock Blog [2] indicates this...

"The lag between US DOE gas prices and crude is roughly five days, if one uses a weekly average for both."

My own results seem to bear this out. My thought was that if oil prices really do influence gas prices, then you should see a statistical correlation [3]. In this case a positive correlation, they should move together in the same direction. If oil prices go up then gas prices should go up, and gas prices should also follow oil prices downward. If the gas prices change on a delayed basis then using correlations you should be able to determine the actual lag. You just need to determine what delay actually gives the best correlation. In Googling searches related to this I unfortunately found out this isn't an original idea. There is something already called lagged correlation*. Some software packages appear to have builtin support. Oil price/Gas price lag appeared on Google to even be a example of it's use in classroom exercises. So I'm not even the first to think of that.

I used US Energy Information data for oil [4] and gas [5] prices.

Again, this is my own determination of lagged correlation written in java using the Apache POI [6] (Excel spreadsheet type stuff) package and the commons math [7] package. Given the homemade construction of that, I just wrote it how I thought it should work, you might wonder about the accuracy of the determined correlations. I would say this is a reasonable concern. However, I am reasonably happy about the results. They seem, for the most part, to be intuitively correct. The best correlation is with a one week lag. After that the correlations get steadily worse. The one thing that somewhat concerns me is that the correlations don't get worse faster as the lag increases. This might be because even the six month lag I test with is not all that long compared to the 25 years of data in the spreadsheets I'm testing with. I should test with shorter periods to make sure the results remain consistent except hopefully bigger drops in correlations with greater lag times. But for the immediate now, since I got the answer I exprected, I'm just going to assume it must be right.


* The usage of the term "lagged correlation" seemed a little imprecise. It was said to mean the same thing as autocorrelation. However, reading about autocorrelation that looks to have only one set of data, you lag it, and then correlate it against itself. Apparently looking for periodicity? In other places lagged correlation was said to be the same as cross-correlation. I didn't find a good Wikipedia entry or definition page for the sense I'm using lagged correlation in. Although, some pages certainly did seem to be using it about the same way as I am. As already mentioned math packages were mentioned that seemed to compute it. Anyhow, you are free to google up your own understanding. Just, let me know if it turns out to be something I can patent.


[1] Gasoline and Diesel Fuel Update
[2] Explaining the Relationship Between Crude Oil Prices and Pump Prices | Pricelock Blog
[3] Correlation and dependence - Wikipedia, the free encyclopedia
[4] Cushing, OK WTI Spot Price FOB (Dollars per Barrel)
[5] U.S. Retail Gasoline Historical Prices
[6] Apache POI - the Java API for Microsoft Documents
[7] Math - Commns Math: The Apache Commons Mathematics Library