Oil vs gas

October 5, 2009
By

(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())

Photobucket

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

Photobucket

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.
Photobucket

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

Photobucket

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

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: 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.