Building Systematic Trading Strategies – Part I

This series of posts is to give a broad overview about building quantitative strategies. This post is not about the intricate details on how to build an infrastructure to simulate such strategies or how to implement technically, but it should just serve as a primer for all those aspiring to build quantitative portfolios.

The Idea

Every strategy starts off with an idea. Unlike a qualitative assessment (say, Apple’s stock is going to increase in the next month) that involves an analyst’s research on primarily following a few stocks, a quantitative strategy is more involved and needs to subscribe to the following rules.

  1. It should be a general rule that can be applied to broad set of stocks (what we call, Universe)
  2. The strategy should not suffer from forward bias. In simple words, it means you cannot use future data to predict future data. The strategy can however use all data up to that time, to predict future directions.
  3. One should be able to express the rule in a mathematical form.
  4. The output of the rule should be a set of dollar amounts that can be assigned to each stock in the Universe

Say we have a simple idea that stocks that have gone up recently will come down and vice-versa. This behavior pattern is what is popularly called Mean reversion anomaly.  Let us how we “quantify” this idea.

Quantification of the idea

There are different ways on how we can “quantify” this idea. There is no such correct way in building an idea. Most of it involves trial and error,  and to see how different factors impact an idea.

Let us start with the mean reversion idea.  One way to state it mathematically is below

Amount Invested for Stock I and Day D  (weight[i,d] )=  – 5 day returns of Stock I on Day D ; for all Top 500 stocks by volume (returns5[i,d]).

In this expression we quantify “recent returns” as  the last 5 day returns. The universe is the top 500 stocks traded by volume in  US equity markets.

weight[i,d] = -returns5[i,d]

One immediate concern with this strategy is that we observe, the sum of dollar invested will not equal our notional value that we plan to invest. So to normalize to the notional we can do the following operation.

weight[i,d] = (weight[i,d]*notional value)/ (absolute sum of all weight[i,d])

That is it! This is the hello world version of a quantitative strategy. Lets see how it performs

Following up lets look at ways to improve the idea and make it more tradable!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s