A Black Swan Lands on the Oil Market

We have been looking a volatility by a number of methods now for several years, so we took notice last week of what happened in the oil markets.  We have shown that the distribution of oil futures returns is well characterized by a light tailed LognormalNormal distribution.  This distribution has the property, that although returns ultimately have the tail structure of a Normal distribution, they have varying volatility or standard deviation that is fit very well by a Lognormal distribution.  This allows significant jumps without necessarily invoking extremely heavy tails.  The oil market, like other financial markets is not random.  Periods of high and low volatility tend to cluster together.  Last week we saw the beginning of significant trouble.  We have also shown that extreme returns after a period of low volatility may predict a period of future volatility and declining price.

We now apply that insight to recent events in the oil market.  The graphs below show the price behavior of the one month future oil contract on Nymex.  The data are updated weekly on Wednesdays by the EIA.  We have added the last few days manually.

eiadata=Import["http://tonto.eia.doe.gov/dnav/pet/xls/pet_pri_fut_s1_d.xls"];
oil=Drop[eiadata[[2]],3];
lc1=Select[oil,VectorQ[#[[1]]]&&NumericQ[#[[2]]]&];
lc1a=lc1;(*Join[lc1,{{{2011,8,3},91.93},{{2011,8,4},86.63},{{2011,8,5},86.88},{{2011,8,8},81.31},{{2011,8,9},79.30}}];*)
DateListPlot[lc1a[[All,{1,2}]],PlotRange->All,Joined->True,PlotLabel-> "Price One Month Oil Contract"]
DateListPlot[{#1,Log[#2]}&@@@lc1a[[All,{1,2}]],PlotRange->All,Joined->True,PlotLabel-> "Log Price One Month Oil Contract"]

The graph below shows volatility as a 30 day rolling second LMoment of price log returns as a measure of scale.  The second LMoment should be a more robust measure of scale than standard deviation for distributions which have not converged to a pure Normal distribution.  As can be seen from the plot, the recent events show up with a lag on a sample of the previous thirty days.  It should also be noted on this plot that previous volatility spikes have not demonstrated much in the way of early warning with this measure.

Needs["StatExtras`"];
oillr=LogReturn[lc1a[[All,2]]];
oilvol=Table[LMoment[Take[oillr,{i-29,i}],2],{i,30,Length[oillr]}];
DateListPlot[Transpose[{Take[lc1a[[All,1]],-Length[oilvol]],oilvol}],PlotRange->All,Joined->True,PlotLabel->"Oil Volatility"]

The plot below shows a more sensitive way to detect periods of volatility.  In blue is a plot of the log price of the one month oil future contract.  The red dots represent daily price returns which were outside the {0.02, 0.98} quantile range of all the prices, i.e. the dots represent the highest two percent and lowest two percent of returns.  Clearly they tend to cluster, but there is not much warning as to when a period of high volatility will start and lead to lower prices.  During the week ending May 6, 2011, we saw a significant negative extreme return and in February we had a positive extreme return coinciding with turmoil in Libya.  Now there are several extreme returns in a short time space, after more than a year of relative quiet in the oil market place.  In the past with a price collapse, oil has settled at a price about half the peak price (log difference of ~0.69).  In this case we have not exceeded the previous price peak so we are guessing that if this volatility continues the price will probably drop back to the $70 to $80 range.

August 9, 2011 Oil closed at 79.30, but now will probably follow the stock markets for a while.

Needs["BearWatch`"];
BearWatchLogPlot[lc1a[[All,{1,2}]],{0.02,0.98},PlotLabel->"One Month Oil Future"]
BearWatchLogPlot[lc1a[[All,{1,2}]],{0.02,0.98},PlotLabel->"One Month Oil Future",PlotRange-> {{AbsoluteTime[{2009,1,1}],AbsoluteTime[]},All}]

This Mathematica 8 notebook may be downloaded by clicking on the link below, but it requires some supplementary packages.  If you would like these write to mathestate.

txcolor=RGBColor[181/255,18/255,27/255];
t1 = Graphics[Text[Hyperlink[Framed[Style["Financial Home", {txcolor, Bold, Larger}]], "../map/Overview.html"], {-5, 0}]];
t2 = Graphics[Text[Hyperlink[Framed[Style["Download Notebook", {txcolor, Bold, Larger}]],  "../bs1/BlackSwanOil.nb"], {5, 0}]];


Show[ t1, t2, ImageSize -> 500]
CellPrint[TextCell["\n\n© Copyright " <>ToString[DateList[][[1]]]<>" mathestate    "<>DateString[DateList[],"DateShort"], "Text"]]

© Copyright 2011 mathestate    Thu 6 Oct 2011