Exercise

A Dog on a Leash? (Part 1)

The Heating Oil and Natural Gas prices are pre-loaded in DataFrames HO and NG. First, plot both price series, which look like random walks. Then plot the difference between the two series, which should look more like a mean reverting series (to put the two series in the same units, we multiply the heating oil prices, in $/gallon, by 7.25, which converts it to $/millionBTU, which is the same units as Natural Gas).

The data for continuous futures (each contract has to be spliced together in a continuous series as contracts expire) was obtained from Quandl.

Instructions

100 XP
  • Plot Heating Oil, HO, and Natural Gas, NG, on the same subplot
    • Make sure you multiply the HO price by 7.25 to match the units of NG
  • Plot the spread on a second subplot
    • The spread will be 7.25*HO - NG