Tuesday, August 9, 2011

Forecasting recessions

John Hussman has a Recession Warning Composite that I am attempting to replicate/improve. The underlying data seems to be easy enough to get from FRED using the quantmod package in R. I don't quite understand the index Hussman is using for commercial paper, so I used the '3-month AA financial commercial paper index' from FRED.


The PMI index requires scraping a table from the ISM website, which is easy enough to do with the XML package.

Here's my code so far, please leave a comment and let me know what you think:

4 comments:

  1. great article, a question though. why not use the pmi from fred?

    http://research.stlouisfed.org/fred2/series/NAPM

    ReplyDelete
  2. That would be a much more reasonable way of doing things, wouldn't it!

    I'll update my post, and put the screen-scraping code to another use...

    Thank you!

    ReplyDelete
  3. Very cool. In Section 4, shouldn't the comment be 10 Year Treasuries?

    ReplyDelete
  4. Of course. Thanks for catching that!

    ReplyDelete

Sociable