I've put together something that shows how you can use macroeconomic indicators (http://www.bloomberg.com/markets/economic-calendar/) in your algorithms through fetcher. Fetcher essentially allows you to load in external data as shown in the algorithm where I import external Initial Claims Data from quandl.
The following uses Initial Jobless Claims (http://en.wikipedia.org/wiki/Jobless_claims) pulled in through fetcher along with a Simple Moving Average test. The basis is this:
- If the simple moving average is decreasing while unemployment claims (IJC) are getting higher, then sell
- If the simple moving average is increasing while unemployment claims are decreasing, then buy
My thinking is that this way, you have two checks to see whether or not the stock is actually trending. If jobs are getting better, the market on the whole should be getting better and vice-versa.
There are a number of different economic indicators like this that you could use through the use of fetcher (fetch_csv).
Hope this helps and feel free to ask any questions