Blog Archives

Backtesting Part 2: Splits, Dividends, Trading Costs and Log Plots

September 16, 2011
By
Backtesting Part 2: Splits, Dividends, Trading Costs and Log Plots

Note: This post is NOT financial advice!  This is just a fun way to explore some of the capabilities R has for importing and manipulating data.   In my last post, I demonstrated how to backtest a simple momentum-based stock trading strategy ...

Read more »

Correlations among US Stocks: Is it really time to fire your adviser?

September 15, 2011
By
Correlations among US Stocks: Is it really time to fire your adviser?

Note: This post is NOT financial advice!  This is just a fun way to explore some of the capabilities R has for importing and manipulating data. The Financial Times says it's time to "Fire your Adviser" because correlations among US stocks ar...

Read more »

Backtesting a Simple Stock Trading Strategy

September 13, 2011
By
Backtesting a Simple Stock Trading Strategy

Note: This post is NOT financial advice!  This is just a fun way to explore some of the capabilities R has for importing and manipulating data.   I recently read a post on ETF Prophet that explored an interesting stock trading strategy in Ex...

Read more »

25+ more ways to bring data into R

August 26, 2011
By
25+ more ways to bring data into R

The rdatamarket post on the Revolutions blog and this post on Decision Stats reminded me about my list of Data APIs/feeds available as packages in R on Cross-Validated (which is a great site that you all should use).  Many of these packa...

Read more »

Because it’s Friday: Spurious correlation edition

August 26, 2011
By
Because it’s Friday: Spurious correlation edition

If the Flight of the Concords taught me anything, it's that you can't trust Australians. This morning I was poking around the DataMarket site, when I noticed something suspicious about Australian sheep production: I decided to investigate further: ju...

Read more »

Graphically analyzing variable interactions in R

August 23, 2011
By
Graphically analyzing variable interactions in R

I studied Ecology as an undergraduate, which meant I spent a lot of time gathering and analyzing field data. One of the basic tools we used to look for relationships in a large set of variables was correlation and scatterplot matrices. Each of these ...

Read more »

Recession forecasting II: Assessing Hussman’s Accuracy

August 22, 2011
By
Recession forecasting II: Assessing Hussman’s Accuracy

In my last post on recessions, I implemented John Hussman's Recession Warning Composite in R. In this post I will examine how well this index performs and discuss how we might improve it. If you would like to follow along at home, be sure to run the ...

Read more »

Using the google prediction API from R

August 10, 2011
By
Using the google prediction API from R

Google has a "black box" prediction API that they provide for use with creating recommender systems or filtering spam. Furthermore, they provide an R package for interfacing that API, but try as I might I cannot get it to work under windows. Here are ...

Read more »

Scraping web data in R

August 10, 2011
By
Scraping web data in R

In my last post, I went through a lot of effort to scrape the PMI index off the ISM website.  It turns out that was unnecessary effort, as commentator "senne" pointed out that this index is available from FRED, with the symbol NAPM. &nbs...

Read more »

Forecasting recessions

August 9, 2011
By
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...

Read more »