Oil vs gas

October 5, 2009

(This article was first published on Quantitative thoughts » EN, and kindly contributed to R-bloggers)

Recently, friend of my, got investment advise from his broker – long gas, because the price of gas is very low compared to oil. The broker didn’t indicate neither profit target or stop loss…
I got hooked on the idea.

First of all, I ran linear regression on monthly prices of oil and gas from 01-12-1993 to 01-09-2009. I was skeptical about ‘oil vs gas’ idea, but after seeing this graph it became interesting. R-Square is high 0.7385. Check this out: (the prices are adjusted with log())


The spread between oil and gas indicates, that it was very high back in September.


Finally, I took two funds: USO (oil’s ETF) and UNG (gas’s ETF) to see how does it look on real time (ok ok daily) data. As we can see, in late September the spread reached a new high. The problem is, that data set is very limited and we can see only ~3 years.

And the last one – green stands for oil’s log(price) and blue one for gas’s log(price).


To leave a comment for the author, please follow the link and comment on their blog: Quantitative thoughts » EN.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)