The correlation is actually the opposite of what most people regard as logical - or, at least, it is not fully the same.
The correlation is that as an economy improves and the stock market goes up and demand for oil goes up, the price of oil goes up. Eventually, the price of oil goes so high that the people can't keep up with it anymore - and so they cut back. That results in the price of oil coming back down - but also less economic activity, so the stock market comes back down, too.
In other words, on a long-term graph, oil goes up with stocks and down with stocks. It is not oil down/stocks up, oil up/stocks down.