Monday, December 23, 2013

Unveiling Market Aware Sector Switching


My for my next set of backtesting, I decided to switching things up. Instead of using different asset classes, I decided to see what my algorithm could do by using different market sectors instead. I used a group of securities which represent different sectors of the S&P 500 markets. Finding a list of ETF for this purpose was easy because there are already a group of ETFs which breaks down the sectors called “Spiders.” The following tickers are listed with the market segments they represent:

XLE : Energy
XLF: Financial
XLI: Industrials
XLK: Technology
XLU: Utilities
XLV: Health Care
XLY: Consumer Discretionary
XLP: Consumer Staples.

I ran my stock picking algorithm over these stocks with the available data and here is a chart of the results.

 
 
I still need to “dial in” the algorithm for each of the individual stocks, and add in the “bear market” awareness indicator as well; however, what is encouraging to me about these results is that the algorithm seems to be able to successfully select from different groups of stocks with similar results.
I am a firm beliver in diversification, and I think this could be a way to further diversify a portfolio.
 

Saturday, December 21, 2013

Some more Tweaking


As I alluded to in my last post, I've been looking into some ways in which I might be able to improve the performance of my stock picking algorithm.
As I was looking into some of the performance data around the time period of the 2008 crash, it seemed that the crash skewed some of the calculations towards an overly defensive position even when the new bull market trend was starting to establish itself (at least it appear to visually on the chart). I also noticed that some assets tend to behave a little differently than others and move in different patterns. For example if we look at GLD ( a gold ETF) and BLV (long term bonds ETF),they tend to behave differently:



Up to now, I've been using the same algorithm to evaluate all the stocks. I began to wonder if I could tweak the algorithm to take the behavior of individual securities into account. I changed some of the time horizons over which I am calculating the momentum scores. I noticed that by changing some of the time horizons, I could “dial in” the performance of different classes. Based on these observations, I made some changes to the algorithm and I also tweaked some of the holdings. I reran the back test several times and here are the results:



We observe from the above chart that I have a slightly different performance from making these changes. The performance gains are noticable for the time periods during and immediatelly preceeding bear markets which happened in 2008-09 and a short one in 2011.
Like I mentioned above, I have modified some of my stock selections to obtain this new graph. The following are the picks for evaluation duing the non-bear market time periods:
  • EFA-Global 
  • EEM- Developing Markets
  • VNQ- real Estate
  • GLD- Gold
  • BLV- Long Term Bonds 
  • PXI-Energy
  • SPY- S&P 500 
  • CLF-Natural Resources
 
The following are the securities to evaluate during the bear market:
  • BEARX-Inverse S&P mutal fund
  • VGPMX- Precious metals fund
  • BLV-Long Term Bonds
There are still a couple of places in the graph were we have some volatility which I would like to see if I could flatten out around February 2010 and again in February 2011, but I am not sure if I will be able to find some legitimate indicator which would be able to know about that only looking at historical data before the event. I will keep looking though!

Sunday, December 15, 2013

Dec Picks and analysis

Its Dec 15th so it's time to re-run the strategy and select the picks for the next month. Here are the picks for this month:

 
SPY-S&P 500
PXI-Energy
EFA-Global
 
 Let's see how well we predicted the best winners based on last months picks. Here are the performance rankings for the last 30 days:
 
Ticker %Gain/Loss
BLV -0.003
SPY* -0.007
EEM -0.015
PXI* -0.034
GLD -0.038
VNQ -0.044
EFA* -0.176
 
 
We observe from the above chart that it's a bit all over the board this month. The strategy picked the 2nd, 4th, and last place performers for the month.
 Let's compare the overall performance against benchmarks. The Market Aware Asset Strategy now has an overall performance of 1.75%, the S&P buy and hold has 4.34%, and the balanced is 2.59%. The Market Aware Asset Strategy has lost some ground compared to our benchmarks.
Admittedly, for 2 months in a row the asset switching strategy has underperformed the S&P. I have stop and ask myself what is the probability of this happening twice in a row if this strategy is so great. Let’s look at some of the historical back testing data and see if there is any information from which we can draw. Looking at the data, there does appear to be some time periods in which the S&P makes some significant advances, but the strategy appears to miss out on at least a portion of those gains. For example, if we look at the time period from Feb 09 until March 10th, the S&P rebounds over 40% but the Switching strategy only gains 28%.  

 

The other thing I observe from the back-testing data is that despite the S&Ps dramatic advance over that time period, the Market Switching strategy still beats the S&P over the longer term. I may have to readjust my expectations regarding the time horizon. I suppose I could just be content the 28% gain for in a little over a year, however it is a little disappointing to be missing out. Looking at the transaction data from the stock picker, it appears that it was still “stuck” in a somewhat defensive posture for quite some time after the crash, until the strategy picked up the new trends. This might be something I need to live with, but I’m going to do a little more research to see if I can make the algorithm a little more responsive identifying the change in the trend. I still think the current algorithm beats anything I currently have going, so I’ll keep running it until I have something better.