Wildebeests | MMMM: Minerals, Metals, the 'Merican economy, and Mathematica

Archive for March 2010

In recent weeks rail freight data has been looking more positive for intermodal freight, while carloads are stagnating. There seems to be a school of thought that because the amount of coal being shipped is well down in previous years, we should ignore coal and only examine rail carload volumes ex-coal. I haven’t read a well argued justification for this; arguments seem to be framed solely at producing a set of data that conforms to a certain narrative. In any case there are many other categories of rail freight that are not looking good at the moment; so why stop at coal if you want to massage data?

If coal freight movements are down, doesn’t it follow that coal consumption and power generation are probably down? Isn’t a decline in electricity usage indicative of a struggling economy? Unfortunately there is a 3-4 month lag in obtaining information about energy usage, but as on November 2009 the trend was consistent with many other metrics.

Electricity Usage

And coal remains a significant contributor to our energy consumption:

Energy Consumption

So why should we ignore coal?

· · ·

Mar/10

28

Interpreting Year-on-Year Economic Data

Week after week, economic data gets released and the mainstream media pundits and blogosphere go to work giving us interpretations of the data. The majority of the time the analysis seems to be relative rather than absolute. By that I mean that data is normally discussed in terms of how it compares to the previous month or previous year. That is fair enough because we want to know if things are getting better or worse, what sort of trajectory the economy is on, and whether we are heading in the right direction. In most cases, due to the seasonal fluctuations in the economy, comparisons to the previous year are the most valid unless the data has been seasonally adjusted. When year-on-year [YOY] or month-on-month [MOM] data is displayed in charts it frequently seems to get misinterpreted by pundits, the most common mistakes being to interpret less bad data as good, and to interpret a slowing down in a decline as a “V” shaped recovery. For some reason economists seem to be the worst offenders. I’m not sure whether that is due to them wanting to be positive or to them genuinely misinterpreting the data (mathematical illiteracy ?).

In the figure below I have some underlying L shaped data and below it the MOM and YOY changes in the data.

case1

The shaded region marked “A” is where those pundits inclined to bullishness would typically be pointing to the data as indicating a recovery. Yet when an economy has been in decline, the first signs of MOM or YOY upturns simply indicate a lessening of worseness as we clearly see in the underlying data. It is mathematically impossible for underlying data to “bottom out” without this V shape in the MOM and YOY data. Even when the V shape in the MOM and YOY data is complete (region marked “B”) this is still not indicating a recovery, it merely indicates a bottoming of the underlying data.

An example of this type of data, complete with erroneous conclusions, can be found here:

treasury tax receipts

In the next example there is some underlying data which recovers after a downturn. Region “A” is the same as in the previous chart: less worse underlying data producing V shaped MOM and YOY data.

case2

In the region where the underlying data is actually recovering (not highlighted but evident in the chart) we see positive numbers in the MOM and YOY data. As the underlying data approaches a full recovery, region “C”, the MOM and YOY data begins to decline. The decline in the MOM and YOY data is not bad news, it just means the rate of change in the data is decreasing as the underlying recovers to the point prior to the decline. Mathematically it must do this.

An example of this type of data can be found here (Note that I’ve been unable to find the original article that is referenced in this link). The article contains this chart which plots 3 sets of difference data:

Westpac China indices

The change in the leading indicator and the change in the coincident indicator in the chart indicate that the underlying leading and coincident indicators suffered a drop but have now nearly recovered to the values prior to the drop. The declines, while remaining positive, are not bad news, they are a mathematical artifact of the type of chart being used. The third line in the plot is some kind of diffusion index which seems to be substantially more volatile than the other two lines. There is no “underlying” for diffusion indices. They are difference data to begin with and rescaled so that 50 is analogous to zero on MOM and YOY charts. This index has headed below 50. Despite the lack of an underlying set of data, diffusion indices should be interpreted in the same way as MOM and/or YOY difference charts. A fall below zero in coming months for the two difference indicator lines would indicate a downturn. How you react to a fall below 50 for the diffusion index depends on what  is known about the index. Given the data displayed in the chart, this “lurch” below 50 could simply be another example of the wild volatility of this index. Certainly more information is needed before drawing any conclusions.

At some point, maybe not for a couple of years the way this “recovery” is shaping, lots of economic data will start to exhibit this “region C”. What’s the bet that this is accompanied by some hand wringing and concerns from pundits. When those concerns eventuate they will be just as unfounded as the exuberance we see about the V shaped signals in current and recent data.

What I hope readers take out of this is that V shapes in difference charts, i.e. charts showing MOM or YOY data, that occur following a period of decline, don’t necessarily equate to a recovery in the underlying data. If the V is in the negative half of the chart then it simply corresponds to a period of decreasing worseness. It is best to consider both MOM or YOY difference charts with their underlying data before drawing conclusions.

· · · · · ·

Mar/10

26

Rail Freight and Port Data have Bottomed

Intermodal rail freight began to increase over the last few weeks which has led to some up-beat comments and optimism about the recovery. While the data is heading in the right direction I think the punditry is getting a bit ahead of itself on this subject.

The Association of American Railroads [AAR] publishes a weekly news release that includes data about rail freight. The data is divided into two categories: intermodal and carloads. Intermodal is the containers that you see in shipping ports. Carloads is bulk stuff which the AAR further breaks down into Grain, Farm Products ex Grain, Metallic Ores, Coal, Crushed Stone Sand & Gravel, Nonmetallic Minerals, Grain Mill Products, Food & Kindred Products, Primary Forest Products, Lumber & Wood Products, Pulp Paper & Allied Products, Chemicals, Petroleum Products, Stone Clay & Glass Products, Coke, Metals & Products, Motor Vehicles & Equipment, and Waste & Scrap Materials.

It follows from what we know about intermodal freight that there should be some sort of correlation between container activity at our ports and intermodal rail freight, i.e. containers coming and going from ports have to be transported. I don’t have data on container movements by road, but below is a chart showing intermodal rail freight and total container movement at the ports of Los Angeles and Long Beach. In order to identify trends and remove seasonality, the data shown is a 52 point moving average of the weekly intermodal freight data and a 12 point moving average of the monthly port data.

Intermodal Rail Freight and Container Movements

We see that the trends in both sets of data agree fairly well, and also that both data indicate a bottoming late in 2009. This is good news in so far as it indicates a recovery, but is well short of the sort of data you’d expect to support some of the more exuberant comments being made about the economy. For a more sobering set of data we have a look at the carloads in the next chart, again a 52 point moving average of the weekly data.

Carload Rail Freight

Again this shows a bottoming occurred late in 2009 but as yet there is nothing to get excited about. Of course if this data doesn’t fit your narrative you can always choose to focus only year-on-year or other types of differences.

Carload Rail Freight - Year on year

When we take annual differences, something done in so much of the data that is being presented at the moment, we see that an ordinary set of data can be turned into something upbeat. According to the YOY data in this chart we have been experiencing a “V” shaped recovery since about May 2009.

————

March 29. I’m not convinced that coal should be removed from the rail data but for those who are interested here is the chart of carloads ex-coal. This data mirrors the small up-turn in the intermodal data.

Rail Freight ex-coal

· · ·

The International Copper Studies Group released their preliminary data for 2009 this week. Copper closed the year with a refined copper surplus of 365,000 metric tons, up from the 224,000 metric ton surplus in 2008. The final year surplus arose from a large drop in demand in the second half of the year after the market was in deficit in the first half of the year when China was stockpiling.

Copper usage in EU-15 countries, Japan, and the United States decreased by 20%, 26% and 19%, respectively.

As I have mentioned previously, amidst this backdrop of a surplus, production is predicted to increase 4.3% per year over the next 4 years. In recent weeks wire services have carried stories with bullish quotes from analysts about expectations of higher copper prices due to a forecast deficit in 2010. It is notable that no information ever accompanies these stories outlining where the demand is going to come from to create the deficit other than vague sweeping statements about global growth.

If demand for copper globally increase by 4.3% this year then that balances the expected increase in supply. Another 2% growth in demand is needed to balance the current surplus. To put that sort of growth into perspective, the percent usage growth in recent years has been 7.1 %, -0.1 %, 2.2 %, 6.6 %, -0.9 %, 0.1% so a deficit in 2010 would require booming growth in usage like occurred in 2007.

2009 was a strange year in that the collapse in demand from the developed world was matched by the increase in demand by China. But Chinese demand dropped off in the second half of the year as prices rose. There seems no reason to believe that China would embark on another stockpiling drive at current prices. Some sort of increase in demand from the EU, Japan and the USA will be expected in 2010 but enough to take copper into deficit? (Bear in mind also that US copper usage has been in decline for a decade so the new normal for US copper usage is lower than the good old days)

In summary, despite copper being in surplus and stockpiles rising the copper price remains strong, essentially decoupled from the physical supply/demand fundamentals. Whether that is sustainable depends on what you believe is driving market sentiment. However, to predict that copper will be in deficit in 2010 requires some heroic assumptions that look to me like too much of a stretch. I am not considering buying any copper stocks until the price gets down toward the $2.50 range.

Hat tip to Josh Hoyt of Metallic Conversion Corp for useful discussions.

A couple of days ago I had a post about retail sales. It was titled “Yet Another Article on Retail Sales” because by the time I got around to writing it pretty much everyone had offered their two cents worth. Having said that, I didn’t see any real dollar numbers anywhere else, only nominal dollars. The content for the article can be generated automatically, which comes in handy if you are doing something else at the time that the numbers get released by the US Census Bureau. So in this article I outline some steps to automatically generate the tables and plots when retail sales numbers are released. The tables and plots can be emailed to you, if you are somewhere remote, or emailed to a blog. All you need to do is examine the processed numbers and add your two cents worth with some content.

Step 1 is to download the data. I downloaded seasonally and non-seasonally adjusted retail sales survey data, and CPI numbers. These numbers can be accessed from the US Census Bureau and the Bureau of Labor Statistics. Alternatively you can download them both straight from the St Louis Fed, i.e. from the FRED®. (more…)

·

It is relatively common to see economic data plotted with shaded bands highlighting periods of recession. It would be nice to have this feature built into Mathematica, actually it would be nice to have banded plots built into Mathematica. In the meantime here is how you do it.

Firstly have a read of an earlier article about creating banded plots.

Next, head to the National Bureau of Economic Research and get a list of official recession dates. Take those dates and make them into Mathematica date lists.

recession data

Next, take some data and pick out the segments that match recessions. This may not be straight forward because economic data is normally reported at the end of the month whereas the recession dating is from the first of the month. You could subtract a day from all the recession dates. Alternatively a work around is shown below where end of month data is converted, for the purposes of matching, to start of the next month:

tmp = data;
tmp1 = Cases[tmp, x_ /; MemberQ[#[[All, {1, 2, 3}]], x[[1, {1, 2, 3}]] /. {a_, b_, c_} -> {a, b + 1, 1}]] & /@ recessions;
tmp1 = DeleteCases[tmp1, {}];

The result is a set of lists, which are subsets of your data, that match recessions periods. You then plot them as described in the article about making banded plots. The advantage of doing it this way is that in addition to making shaded bands you can also control the color of the line, i.e. set a specific color in the banded region. Here is what the end result looks like:

recession band

An easier way however is simply to Prolog some rectangle primitives that match recession dates. Firstly, for those not aware, the x axis scale in DateListPlot is in absolute time (seconds). So make a list of absolute time recessions:

absoluteRecessions = AbsoluteTime /@ # & /@ recessions

Once you have that list make a list of “recession rectangles”:

recessionBands1= Rectangle[{First@#, yMin}, {Last@#, yMax}] & /@ absoluteRecessions

or make a function to generate the rectangles:

recessionBands2[yMin_, yMax_] := Rectangle[{First@#, yMin}, {Last@#, yMax}] & /@ absoluteRecessions

Save the list recessionBands1 because you can use it anytime by using a rule replacement to stick in the minimum and maximum y values. Here is the result:

DateListPlot[data,
ImageSize -> 600,
Prolog -> {Yellow, recessionBands /. {yMin -> -4.5, yMax -> 2.5}},
PlotRange -> All
]

If you choose to use a function recessionBands2 to make the bands then just stick in the minimum and maximum y values:

DateListPlot[data[[All, {1, 7}]],
ImageSize -> 600,
Prolog -> {Yellow, recessionBands[-4.5, 2.5]},
PlotRange -> All
]

recession bands2

That’s the end, but below I’ve pasted in the recession date lists and rectangles to save you all some time. (more…)

Mar/10

13

Yet Another Article on Retail Sales

Much was written about the retail sales numbers released Friday. The tables below show the data with comparisons to one, two, and three years ago. Real retail sales are in January 2005 dollars. Note that since February inflation numbers are not yet in I have assumed zero inflation.

NSA Retail sales

NSA Real Retail sales

NSA quarterly Retail sales

SA Retail sales

I frankly didn’t understand a lot of the enthusiasm in the commentary on the retail sales number. This might be due to residual relief after a horrible 2009 but it is unclear to me how anyone, based on the numbers, could conclude that things are going along well. The real data is what people should be focusing on, Table 2 above. To put this into perspective graphically, the chart shows real retails sales, the 12 month moving average, and the trajectory sales were on had no crash occurred.

Real Retail Sales

Retails sales and many other metrics indicate we are in a recovery phase, i.e. declines have stopped. Nevertheless the data indicates this phase is very anemic, kind of like a patient on life support. Rather than cheer leading a monthly rise, which may end up being entirely due to inflation by the way, people should ponder what may happen if life support is switched off, i.e. a) interest rates start to rise; and/or b) mark-to-fantasy accounting is abolished; and/or c) government stimulus is withdrawn. None of those things is likely to occur soon because unlike the MSM the doctor realizes the patient would not survive.

Mar/10

11

Tax Receipts

Tax receipts rose in February year-on-year but as I’ve said before difference data can sometime lead to faulty conclusions. Year-on-year is certainly the most appropriate comparison but YOY plots seem to make some pundits conclude that a recovery is occurring when only stabilization is taking place. It needs to be remembered that February 09 had the lowest monthly tax receipts in 14 years, therefore an increase would have been expected in February 2010. Nevertheless, like many other data at the moment, the indication is of stabilization, i.e. things have stopped getting worse, as shown in the chart below.

US Monthly tax receipts

Copper 101

What I’d like to do in this article is give a brief survey of copper mining, production and usage. This is not intended to be an exhaustive survey, but instead more like my previous article giving a brief overview of iron ore.

Broadly, the three types of copper deposits you’ll read about in company reports are copper sulfide porphyry deposits, iron oxide copper (sulfide) gold deposits [IOCG], and deposits that are largely copper oxide. Porphyry deposits usually contain some molybdenum, silver and gold. Freeport-McMoRan’s Grasberg mine is an example of a large porphyryr deposit. Copper content of the ore of 0.5% or below would be considered low, whereas above 2% would generally be considered on the higher side. The content of copper and other metals effects the cash cost of mining the ore. For example if the copper content is low you have to dig more ore to recover a given amount of copper and that costs money. It follows then that additional revenue from molybdenum and/or gold makes a project more profitable. IOCG, as the name suggests contain gold, and often contains uranium as well. The large BHP Billiton Olympic Dam project is a IOCG deposit.
(more…)

· · ·

When the Chicago Fed released the latest National Activity Index (CFNAI) they added a new definition for the end of a recession. Previously in the guide to their index they had stated:

“A CFNAI-MA3 value above +0.20 following a period of economic contraction indicates a significant likelihood that a recession has ended.”

That line still exists but an additional line was recently added:

“A CFNAI-MA3 value above -0.70 following a period of economic contraction indicates an increasing likelihood that a recession has ended.”

I’ve written a couple of articles in which I said that it didn’t look mathematically possible for the index to get to +0.2 in the foreseeable future — the index was being weighed down heavily by the housing and consumption component. So my first reaction was to conclude that since the index wasn’t going to confirm an end to the recession, they decided to redefine how to interpret the index.

In late 2002 the Chicago Fed wrote a paper discussing, among other things, what value should be used to identify the end of a recession. Back then they concluded:

“A more lax recovery threshold of +0.00, or return to trend growth, would have identified the end of the 1990-91 recession earlier. Had this threshold been in effect, the recovery would have been signaled in April 1992, or 19 months prior to the +0.20 threshold date. On the other hand, the weaker recovery threshold would also have generated false signals. In particular, a +0.00 threshold would have prematurely (by 11 months) signaled the end of the 1973-74 recession. Overall, then, the CFNAI-MA3 with a recovery threshold of +0.20 was able to identify all of the recoveries, signaling four out of the five recoveries within the first five months. Its identification of the erratic 1990-91 recovery, however, did not come until 32 months after the actual trough.”

(more…)

Related Posts with Thumbnails

· · · ·

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Theme Design by devolux.nh2.me