Exchange-Traded Funds List

An exchange-traded fund (“ETF”) is a marketable security that usually tracks an index or a basked of assets. Being traded as a regular stock and typically having higher liquidity and lower fees than mutual funds, it is a very popular investment option.

ETF.com has a great list of the available ETFs in the market, grouped by 1) asset class (e.g. commodities, fixed-income, etc.), 2) investment style (e.g. long-short, small cap, etc.), 3) sector (REIT, utilities, etc.), 4) region, and many other categories. It also provides a list of the ETFs that track main indices (e.g. S&P 500, Russel 3000, etc.).

This is definitely a list worth checking out: http://www.etf.com/channels

 

Trading Strategies 101

Generating alpha is only one out of the three legs required for a complete trading strategy. The alphas generated need to be blended with the risk model and the transaction cost estimates in the optimizer in order to come up with the corresponding orders that need to be placed. An illustration of this process is presented below:

blog_trading

  • For transaction costs, typically investors perform the following calculation:

Transaction costs = Trade Fees + Bid-Ask Spread Cost = x bp + Bid-Ask Spread / 2

where x is the trade fees imposed by the broker

  • The risk model refers to the variance-covariance matrix of the stock returns
  • Alphas refer to the blend of a number of standardized alphas, e.g. momentum variations, mean reversion variations, pairs trading, etc.

The optimizer in then performing the following operations (multi-objective optimization):

  • Maximize alpha exposure
  • Minimize transaction costs
  • Minimize risk

Other objectives and constraints are typically included: neutralizing exposure to beta (for market neutral strategies) and setting caps for trade size, position size, industry exposure, country exposure, etc. We are planning to dig further into the optimization process in future posts.

Mean Reversion using Linear Regression Curves

We presented the concept of mean reversion in an earlier post, in this article we will present a tweaked version of mean reversion that utilizes Linear Regression Curves instead of moving averages.

Moving average is a lagging indicator so essentially the Linear Regression Curves can potentially provide a better fit of the available data. It is helpful to compare the results of both methods nonetheless – same applies to any tweaked versions tested, it would make sense to first compare to the base version.

Linear Regression Curve is essentially a bundle of numerous lines, but the extreme ends of the lines are hidden (upper and lower bounds), while the mid-point is only shown and is connected respectively to other mid-points across the time series.

Back-test implementation of mean reversion on S&P500 stocks using Linear Regression Curves:

  • Estimate the Linear Regression Curve per look-back window
  • In each day compare the closing price with the average value estimated;
  • If the closing price is greater than the average + n * deviation go short  and close when you cross the mean or at a pre-determined time
  • If the closing price is less than the average – n * deviation go long and  close when you cross the mean or at a pre-determined time

Adjusted Momentum Strategy

This is a slightly tweaked momentum strategy that involves the normilization of the stock returns using a risk metric. In this example, we will refer to the use of VIX levels for the risk adjustment of returns. Other risk metrics can be used as well such as Value at Risk (VaR). The concept is similar, we adjust the returns using a risk indicator before we sort the universe of stocks based on the returns.

VIX is the ticker of the CBOE Volatility Index, which is a popular measure of the implied volatility of S&P 500 stock options.

  • Calculate daily returns of S&P500 stocks
  • Calculate average returns per look-back window (e.g. 3-12 months)
  • Roll the average returns calculations one day at a time
  • Divide average returns by the VIX levels of each trading day
  • Sort stocks by adjusted returns – select top n and bottom n stocks
  • Track the returns of the n top and bottom performers for your holding period (e.g. 1-mo)
  • Estimate your historical returns and volatility and compare them to a benchmark – in this case S&P500 index.

Dividing returns by the VIX levels might not produce meaningful values on an absolute scale but on a relative scale and in order to order the stocks, it provides useful information. More specifically, it downgrades the impact of high returns on very volatile days and upgrades high returns on trading days with less volatility. The concept is similar if using any other risk indicators as mentioned earlier.

 

Momentum Strategy using PCA

Create a matrix that includes an index and the constituents: for example S&P500 and its constituents daily returns for the past 5 years.
A typical momentum strategy can be implemented using the following tweaks:
  • Estimate the principle components (in R use library stats and function princomp).
  • Regress each stock against the n most significant principal components.
  • Use the residuals to get a z-score or any other normalize metric for each stock.
  • Set a threshold for the z-score to select stocks to trade (trading trigger).
  • Select the weights based on z-score.
This is a relatively complex strategy since it involves the implementation of principal components analysis, so we are going to present a few frequent questions below:
1. Do you include SPX and 500 constituents and run a PCA or is SPX supposed to be excluded?
2. Is the PCA applied on returns or prices?
3. Then we regress the returns of each stock for our lookback period againsts the n principal components. How do we specify what is the cutpoint and how many principal components to include?
1) SPX should be included.
2) Returns are more meaningful since they’re closer to be stationary than levels.
3) Plotting the cumulative sum of eigenvalues can actually be very useful. The plot will provide a good indication of when most variation is explained.

Volatility Carry Trade

Volatility Carry Trade is a futures trading strategy – the first non-equities strategy presented in this blog so far.

  • Strategy on futures, key concepts: backwardation / contango
  • Vega neutral volatility carry trading strategy (i.e. hedge against volatility)
  • Two different futures contracts are traded: ST and LT; rolling futures on the S&P 500 VIX Index
  • ST is the short term future and LT is the long term future
  • If ST / LT > 1 then in backwardation so buy ST and sell LT
  • If ST / LT < 1 then do a carry trade: sell ST and buy LT

Key terms explained below:

Backwardation:  Futures contract is trading below the expected spot price.

Contango: Futures contract is trading above the expected spot price.

Vega neutral: Position that is not sensitive to volatility fluctuations.

Buy on GAP

Buy on GAP is a pretty straightforward strategy that requires the estimation of previous days lows and the comparison of the opening of each day over a time period to them. It relies on mean reversion and is an intraday strategy since the positions are expected to be closed within the day they were opened.

The strategy suggests the purchase of the 100 stocks out of the S&P500 that have the lowest previous days lows to the current opening price. Computations required:

  • Calculate the previous day close to current day open
  • Calculate the close to close returns and standard deviations
  • Calculate the open to close return for every day
  • Check that the above return is less than the 90-day standard deviation of  close

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!

Mean Reversion Strategy

Mean reversion in equities refers to the assumption that a stock tends to move over its historical price over time. As a result, one needs to estimate the historical average price of a stock over a period of time and then check how it diverges from it in different points in time.

Back-test implementation of mean reversion on S&P500 stocks:

  • Calculate a rolling average and rolling deviation over the historical stock prices
  • In each day compare the closing price with the historical average;
  • If the closing price is greater than the average + n * deviation go short  and close when you cross the mean or at a pre-determined time
  • If the closing price is less than the average – n * deviation go long and  close when you cross the mean or at a pre-determined time

By default and if no pre-determined time is used, all returns yielded should be positive if at any point in time the stock crossed its historical average (especially if using a large data set of historical prices, most likely that happened at some point). It also might make sense to set a closing trigger based on timing as well (e.g. 12-mo period or longer based on personal assessment if the stock has not reverted in the meantime). As always, it might also be a good idea to set a threshold based on losses – i.e. do not allow losses to exceed n % which could again be determined based on a personal assessment. The restrictions could be modeled in the back-testing to see what the impact would be on the generated alpha.

Momentum Trading

Momentum in equities refers to the purchase of stocks that have had high returns in the past (typically over the past 3-12 months) and the sale of those who had poor returns over the same time period. It is an empirically observed tendency for rising prices to rise further and falling prices to fall more. Signals based on a 52-week high have been used by analysts in buy and sell recommendations.

Back-test implementation of momentum on S&P500 stocks:

  • Calculate daily returns of S&P500 stocks
  • Calculate average returns per look-back window (e.g. 3-12 months)
  • Roll the average returns calculations one day at a time
  • Sort stocks by  returns – select top n and bottom n stocks
  • Track the returns of the n top and bottom performers for your holding period (e.g. 1-mo)
  • Estimate your historical returns and volatility and compare them to a benchmark – in this case S&P500 index. Is there persistence in the returns?