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.