Showing posts with label Tactical. Show all posts
Showing posts with label Tactical. Show all posts

Sampling Universes with EAA

In this post several universes will be sampled using the Elastic Asset Allocation model. The universes under review are:
- CXO Advisory's 8 assets simple momentum universe
- Stefan Solomons 12 assets tactical allocation universe
- ETFdb.com's most popular ETFs
- CXO's on steroids: a 300% leveraged universe


The backtests are performed using monthly Yahoo! Finance total return data with EAA in Equal Weigted Hedged mode with monthly reforms. So each month assets are (re-)alloced according to the below simplified formula:
wi zi = ( ( 1 ci ) ri ) eps , wi sim zi = ((1-ci) cdot ri ) ^ eps,  if ri > 0 else wi = zi = 0
ETFs are extended using mutual fund data to attain a backtest period of 20 years (1995 - 2014)*.

CXO Advisory's 8 assets simple momentum universe

The line-up for CXO's is DBC, EEM, EFA, GLD, IWM, IYR, SPY and TLT. Since the liquidity of CXO's original IWB is way lower than that of its bigger sibling SPY, the latter was used. IEF is deployed as c(r)ash protection fund (CPF), but is kept outside the regular allocation basket. The maximum number of assets for capital allocation is limited to 3+1.

CXO: equity curve with key performance indicators

A Primer on Elastic Asset Allocation According to Keller & Butler

In a brand new 2014 paper "A Century of Generalized Momentum; From Flexible Asset Allocations (FAA) to Elastic Asset Allocation (EAA)" Wouter Keller and Adam Butler reveal a new methodology for rotational tactical asset allocation. While FAA (see paper or post) was build on the concept of generalized momentum by assigning ranks to returns, volatilities and correlations, the EAA concept adds a new level of generalization by moving from ordinal ranking to cardinal "elasticities". Admittedly the full EAA methodology can appear rather daunting, but with some simplifications the concept becomes quite accessible in the end. So hang in there, you'll soon be all right ;-)


EAA main formula

EAA controls the optimal portfolio asset allocation through an ingenious exponential scoring function of estimates for return (ri), volatility (vi) and index correlation (ci) as well as applying a portfolio concentration exponent: the non-negative elasticities wR, wV, wC respectively wS.
wi zi = ( ri wR ( 1 ci ) wC vi wV ) wS wi sim zi = { left ( { ri^wR cdot { (1-ci)^wC } } over { vi^wV } right ) } ^ wS , if ri > 0 else wi = zi = 0, for i = 1 ... N
where for each asset i in an N-sized portfolio:
- wi is the normalized proportional optimal portfolio weight, where the summation of weights is equal to 100%
- zi is the generalized momentum score
- ri is the average return (total or excess*) calculated over the last 1, 3, 6 and 12 months
- vi is the volatility of total return measured over the last 12 months
- ci is the correlation of total returns with the equal weighted universe index measured over the last 12 months.

The four geometrical weights wR, wV, wC and wS are called "elasticities" due to their relative impact on the three terms (ri, vi, ci) of the EAA scoring function. Remember from math class:
- x 0.5 = x x^0.5 = sqrt{ x }  and
- ( x 0.5 y ) 2 = x ( 0.5 2 ) y 2 = x y 2 ( x^0.5 cdot y )^2 = x^( 0.5 cdot 2 ) cdot y^2 = x cdot y^2 .
So when applying exponential values ranging between 1 to 0 the scoring effect is mitigated, while values ranging from 1 to 2 amplify the effect of the said term on the score. Note that with wS = 0 the EAA function will return zi = 1 for each and every asset, independent of ri, vi or ci (provided ri > 0). Put differently, with wS = 0 the asset allocation is equal weighted (apart from the safety net offered by a cash proxy fund, see below).

Different from FAA the proportionality with zi allows the weights wi to be not equal. Next to its exponential scoring function, EAA utilizes an optimal top quantile (TopN) of the portfolio size (N) and a C(r)ash Protection routine (CP) by allocating a proportional fraction of portfolio capital to a cash proxy fund (CPF) for every asset with non-positive return. In accordance with the concept of tactical asset allocation the portfolio is rebalanced at the end of each month.

During a stock market crash, like in 2008, the C(r)ash Protection kicks in. Note the unequal weights too (last column).
    

Harvesting Momentum: Let's Kick Tires With AmiBroker [ Part III - Final ]

The previous posts in this series covered a basic Tactical Asset Allocation approach with with signals taken from the daily and the weekly time frames. This final post will be dedicated to portfolio rotation based on monthly and quarterly time frame. Only two asset class universes will be covered. Multi asset class universes are going to be the subject of a future post.


Taking the monthly time frame into consideration basically means rotation decisions are made once a month, after the close of the month. For the quarterly time frames this comes to only 4 re-balancing opportunities per year: at the end of each quarter. However, usually the re-balancing frequency is way lower.

For backtesting once again the source code provided in the opening post will be used, basically allowing the DIY retail investor to engineer his own alpha. Even if you don't have access to thinkorswim or Amibroker, the strategy at hand can be fairly easy implemented using Excel, since momentum is the only metric taken into consideration for re-balancing decisions.

Monthly Periodicity

The typical US stock market year has 252 trading days (= 12 months with 21 days on average). So for the previously used 85 days/17 weeks lookback period, momentum calculated over a 4 month period (= 4 x 21 days) is suitable. Applied to the base pair (SPY-TLT) this 4 month lookback period renders the following results.

Portfolio Equity SPY - TLT (4 months), drawdown periods in red

Harvesting Momentum: Let's Kick Tires With AmiBroker [ Part II ]

In Part I of this series the frame work for a basic Tactical Asset Allocation strategy was discussed using two ETF's representing stocks (first SPY, later MDY) and bonds (TLT). Following on the daily signals of the first post, the continuation of this series will be all about the higher time frames, starting with weekly signals.


Engaging a strategy based on weekly signals might be the way to go for anybody who does not want to be in synch with the crowd, since everyone and his uncle is doing momentum on monthly basis these days. And as it happens, the AFL-code provided in the previous post is just as suitable for weekend traders too.

Weekly Periodicity

As a starting point, the weekly equivalent of 85 days for the momentum calculation is used: 17 weeks without any smoothing.

Portfolio Equity SPY - TLT (17 weeks), draw down periods in red
Profit table SPY - TLT (17 weeks)
SPY-TLT (17w)    2004 - 2013
Total Profit   211     %
CAR   12.05%
MDD (trades)   -16.16%
MDD (system)   -16.16%
Calmar (0%)   0.75
Sharpe (0%)   0.76
Trades   43     
Winners   58.14     %

Harvesting Momentum: Let's Kick Tires With AmiBroker [ Part I ]

Developing indicators and strategies is great, putting them to a stress test by mr. Market is better. But how? As we speak, thinkDesktop does not have the nuts and bolts to perform proper backtesting. After much consideration I decided to invest nearly $500 by buying the AmiBroker Professional suite at the turn of the year. Next I found myself back in primary school, learning to write again ...


Over the last couple of weeks I have been studying AmiBroker’s Formula Language (AFL) like there is no tomorrow. Luckily the "Introduction to AmiBroker" by Howard Bandy (free download) is a great read and AFL has a huge and generous user base, gathered in the AmiBroker User’s List on Yahoo. Last but not least there is Tomasz Janeczko’s extensive UsersGuide with an overwhelming amount of examples.

So this post is all about backtesting. Actually it probably will be the first in a series for presenting some of the backtesting possibilities AmiBroker has to offer. And while we are discovering the AmiBroker Backtester, chances are we might come across some pretty neat portfolio strategies along the way. Stay tuned!

Harvesting Momentum

As stated in previous posts, the "momentum anomaly" is known for centuries. The gist of the momentum anomaly is that assets often continue their price momentum, defined as the change in price over a given lookback period. Momentum works well across asset classes as well as within them. So harvesting momentum really is all about follow the money.

On Seeking Alpha contributor Marc Cohn has published various strategies involving momentum based trading. One of them, "Return Like A Stock, Risk Like A Bond: 15.5% CAGR With 17% Drawdown" utilizes so called "Paired Switching" (see here for SSRN paper) between two exchange traded funds: SPY and TLT. Marc's comprehensive system actually is a TAA strategy in its simplest appearance.