Rotation

FAA: A Lookback in Time…

In the spirit of wrapping up the FAA model investigation, I thought I would extend the backtest further back to 1926. Data used are all monthly total return series from proprietary databases and they are the best estimates that I have to work with. Looking back so far offers a LOT of insights. One will be able to stress test how the specific strategy performed in different environments.

I employed 7 different asset classes: commodities, emerging market equities, US equities, US 10 year bonds, US 30 year bonds, short term treasuries and European equities. For benchmarking purposes, I constructed a simply momentum portfolio that holds the top 3 assets, an equal weight portfolio, and a traditional sixty-forty portfolio. Lookbacks for momentum are 4 months, in line with what Keller and Putten used.

FAA-Long-SS FAA-Long-Performance

One very interesting aspect I found from this extended backtest is to see how the strategies performed during the Great Depression. While equal weight and sixty forty suffered large draw downs, FAA and relative momentum did comparatively well.  Below is a deeper analysis into the Great Depression. As you can see, momentum strategies in general provided a great buffer against drawdown.

Depression

 

GD-PERF

The main reason for this is that during the drawdown period, the FAA strategy were all loaded with bonds:

GD-Holdings-FAA

 

 

When I am researching trading systems, I really like to break down its components apart and analyse it as much as possible. It is only by understanding how they fit together will you be able to judge its future viability. When it will work and when it won’t work. And since these days TAA strategies have become so pervasive, it begs to questions whether we are taking appropriate precautions to its future performance.

Advertisements

Flexible Asset Allocation

In my last post, I broke down the individual components to look at the performance of each factor. Although by themselves, the correlation and volatility factors weren’t that attractive, as a whole combined together, its a different story.

I’ve always been a proponent of simplistic approaches in system design as adding too many nuts and bolts to ensure sophistication only brings over-fit. In my opinion, when you are designing the alpha portion of your portfolio, you should look to design multiple simplistic strategies that are different in nature (uncorrelated). Take these return streams and overlay a portfolio allocation strategy and you will find yourself with a decent alpha generator with >1 risk return. Ok back to FAA…

Keller and Putten in their FAA system combined the signals of each factor by a simple meta rank function. This ranking function took the following form:

where m, c and v represents the factor rank of momentum, correlation and volatility respectively. Each factor is then given a weight. The meta ranking function is than ranked again and filter based on absolute momentum to arrive at the assets to invest in. Note that any assets that don’t pass the absolute momentum filter will be invested in cash (VFISX). When coding the meta ranking function, I found that there are times when some assets share the same final meta rank. This caused problem for some rebalance period when the assets to hold will exceed top N. I consulted with the authors and they revealed that “with rank ties, we select more than 3 funds.” Below is a replication of the strategy; it is tested with daily data as oppose to monthly data used by the authors.

FAA-perf faa-perf1

The model results are pretty decent. One aspect I may change would be the use of the cash proxy in the volatility ranking factor. By including the theoretical risk free rate that is suppose to have volatility of zero will skew the results to bias cash.

A reader commented on a little error in coding I made in the last post. Don’t sweat, it doesn’t change the performance one bit. I’ve modified the code and placed everything including the current code in to the FAA dropbox folder. Should you have any questions please leave a comment below.

Thanks for reading,

Mike

Alternative Momentum Factors

Keller and Putten in their 2012 paper, “Generalized Momentum and FAA”, went on to combine multiple momentum ranking factors to form portfolios rebalanced monthly. I won’t go in to detail about their strategy as you can find a good commentary at Turnkey Analyst.

Here I took apart each ranking factors and constructed portfolios to see their individual performance. I thought this may be a good way to visualize the performance of each factor alone.

There are four portfolios, rebalanced monthly.

1. Relative Momentum- holds top n performing funds

2. Absolute Momentum- holds funds with positive momentum

3. Volatility Momentum- holds the n lowest volatility funds

4. Correlation Momentum- holds the n lowest average correlation fund; average of all pairwise correlation

Performance

Equity Performance

</pre>
############################################################
#Flexible Asset Allocation (Keller & Putten, 2012)
#
############################################################
rm(list=ls())
con = gzcon(url('http://www.systematicportfolio.com/sit.gz', 'rb'))
source(con)
close(con)
load.packages("TTR,PerformanceAnalytics,quantmod,lattice")

#######################################################
#Get and Prep Data
#######################################################
setwd("C:/Users/michaelguan326/Dropbox/Code Space/R/blog research/FAA")

data <- new.env()
#tickers<-spl("VTI,IEF,TLT,DBC,VNQ,GLD")

tickers<-spl("VTSMX,FDIVX,VEIEX,VFISX,VBMFX,QRAAX,VGSIX")
getSymbols(tickers, src = 'yahoo', from = '1980-01-01', env = data, auto.assign = T)
for(i in ls(data)) data[[i]] = adjustOHLC(data[[i]], use.Adjusted=T)

bt.prep(data, align='remove.na', dates='1990::2013')

#Helper
#Rank Helper Function
rank.mom<-function(x){
 if(ncol(x) == 1){
 r<-x
 r[1,1] <- 1
 }else{
 r <- as.xts(t(apply(-x, 1, rank, na.last = "keep")))
 }

 return(r)
}
#######################################################
#Run Strategies
#######################################################

source("C:/Users/michaelguan326/Dropbox/Code Space/R/blog research/FAA/FAA-mom.R")
source("C:/Users/michaelguan326/Dropbox/Code Space/R/blog research/FAA/FAA-abs-mom.R")
source("C:/Users/michaelguan326/Dropbox/Code Space/R/blog research/FAA/FAA-vol.R")
source("C:/Users/michaelguan326/Dropbox/Code Space/R/blog research/FAA/FAA-cor.R")
source("C:/Users/michaelguan326/Dropbox/Code Space/R/blog research/FAA/FAA-bench.R")
models<-list()
top<-3
lookback<-80

#run models
models$mom<-mom.bt(data,top,lookback) #relative momentum factor
models$abs.mom<-abs.mom.bt(data,lookback) #absolute momentum factor
models$vol<-vol.bt(data,top,lookback) #volatility momentum factor
models$cor<-cor.bt(data,top,lookback) #volatility factor
models$faber<-timing.strategy.local(data,'months',ma.len=200) #faber
models$ew<-equal.weight.bt(data) #equal weight benchmark
#report
plotbt.custom.report.part1(models)
plotbt.transition.map(models)
plotbt.strategy.sidebyside(models)
<pre>

The source codes can be downloaded in my DB folder,  can’t guarantee they are error free. Please leave comment of email me if you should find any mistakes.

Thanks for reading,

Mike

Implied Volatility as an Asset Class

When M.Faber published a model for asset allocation, there has been significant increase in interest in the area on the internet.

With this post, I hope I can add value to the existing allocation framework by introducing another asset class into the mix which I believe can help improve existing TAA models.

In one of the previous posts, I made the point that the VIX timed the market pretty well in the sense that it spiked whenever the S&P declined. Although it is fundamentally created to measured the implied market volatility, I believe it can be used to improved TAA models in time of stress.

A few ETF products has sprang up lately which offers investors the tool to take advantage of the movements in the VIX. They are…

VXX- iPath S&P 500 VIX Short-Term Futures ETN

VXZ- iPath S&P 500 VIX Mid-Term Futures ETN

Playing around with concepts in my head, I hypothesized that given its inverse relationship with the S&P, it may be a good candidate to incorporate in a momentum based TAA model.  The idea is summarized in the following short picture.

The picture is my way of visualizing the past 6 month return on the S&P 500(SPY, Red), Bonds (SHY, Orange), Gold(GLD, Green) and Implied Volatility (VXX, Blue). You can see that in the recent European crisis, we will mostly be in Gold and VXZ if assuming we are holding the top two funds.

In the following simple backtest, I attempt to quantify this with some evidence. In both backtests, I am allocating funds to the top 2 performing assets (50% capital for each). I am rebalancing weekly and I am using 6 Month ROC to calculate the return.  (Please go to bottom to see assumptions)

Notes: The test was done on the less than 9 years of data. The VXX history started in late 2009 so conclusions should be drawn carefully as past performance is not indicative of future returns.

Amibroker Code:

#include <kpi.afl>;
Filter =1;
SetOption("PortfolioReportMode",0);
SetOption("CommissionAmount",0.0);
SetOption("InitialEquity", 100000);
Maxposition = 2;
SetOption("MaxOpenPositions",Maxposition);
SetPositionSize( 100/Maxposition, spsPercentOfEquity);
SetOption("UsePrevBarEquityForPosSizing", True);
SetBacktestMode(backtestRotational);
SetOption("WorstRankHeld",Maxposition);
EnableRotationalTrading();
BuyPrice = C; 

/////////////////////////////////////////////////

rs3                     = ROC(Close,120); 

/////////////////////////////////////////////////
averagescore		= 1000+rs3;
PositionScore		= IIf(Year()>=2003 AND DayOfWeek()==5,averagescore, scoreNoRotate); //DayOfWeek()==5

Cross-Sectional and Time-Series Momentum

A lot of white papers explain momentum as a cross-sectional result. What this means is that future outperformance of a stock is predicated by its outperformance relative to its peers. (MCD vs GE) This is the standard way of doing it, ranking a universe of stocks based on ROC or some other measure.

The other one is time series momentum. This is not a new concept. The idea is that a securities past performance predicts its own future return. From this, auto-correlation is used. The main advantage is that time series momentum can measure and analyze all asset classes because it relies only on its own past price.

The reason I introduced these two different explanation for momentum is that both offer promising fundamental concepts that can be used to build robust strategies. I leave it to the reader to explore further.

Futher Reading:

http://pages.stern.nyu.edu/~lpederse/papers/TimeSeriesMomentum.pdf

http://www.eurojournals.com/irjfe_50_14.pdf

http://web.mit.edu/lewellen/www/Documents/Momentum.pdf

http://pages.stern.nyu.edu/~lpederse/papers/TSMOM_Slides.pdf

SE

Monthly Sector Rotation Part 3

Consistency is really important in trading. For this post, I finally was able to construct the rolling risk adjusted return of the strategy through excel. This may not mean a lot to you but for a backtest that stretched more 20 years, the equity curve really doesn’t reveal much. The graph below plots the rolling 1 year risk adjusted return of the strategy which was calculated by dividing rolling 1 yr return by the standard deviation of those return.

As you can see the strategy is pretty stable in its return during bull markets. During the crash/bear period of 87’, 90’, 00’ and 08’, the strategy performed well compared to the market index in the sense that it was able to get the investor to stay in cash preventing from large drawdowns. This is one of the most important aspect of the system as with the implementation of the moving average, anything that dips below it moves the investor back into cash until otherwise.

This strategy is by no way tradable. It is merely displayed to proof a point that relative strength rotational models works.

SE

Monthly Sector Rotation Part 2

I posted a sector rotation system a couple of days ago. In this post I would like to check the parameter stability of the system just to see if the performance was due to “luck”.

 

From the above, I did a 3d optimization in Amibroker. I varied the top held rank and the cut of off rank from 1 to 9 to see visually the parameter performance of each combination. As you can see, anything to the left of the red lines are better. When we hold more than top 5 positions, we will no longer get the advantages of better performance through investing in high momentum sectors. On the other hand, if our entry and exit were the same (ie enter top 5 rank; exit when fund drops below top 5), there are going to be whipsaws as funds may change rank monthly. Therefore it smoothly return when they are different.

In a later post, I hope to display parameter consistency through displaying rolling performance metrics for this model. I believe that its pointless if we just use the above optimization technique to choose the parameter to trade. Rather I think its better to find a parameter set which offers consistency in return.

SE