Developing A Trading Strategy For FANG stocks

The development of a trading strategy for FANG stocks was based on applying portfolio backtest validation during the identification phase. This was done for the purpose of reducing data-mining bias. This article outlines the steps followed and the results.

This article is organized as follows

  1. Objective of the strategy development
  2. Strategy development procedure
  3. Performance results
  4. Comments

1. Objective of the strategy development

The objective of this exercise is to develop a strategy for trading FANG stocks that has minimum data-mining bias in the daily timeframe. Only one class of short-term indicators is used to minimize data-mining bias due to selection. The short-term indicators, or predictors of price, are price patterns with formations extending from 2 to 9 daily bars. In addition, since FB started trading on May 18, 2012, there are not enough data for out-of-sample valuation tests. Instead, we impose the requirement that each pattern that is identified in one of the four securities is also profitable in each of the other three securities. This form of validation is stricter than out-of-sample validation and reduces Type I error.

The profitability of all price patterns will be tested with a profit target and stop-loss of 2% to also minimize “local” curve-fitting to price data. Note that the standard deviation of daily returns is about 2% in the case of GOOGL. The other three stocks have much higher standard deviation of daily returns: 2.67% for FB, 3.6% for AMZN and 3.92% for NFLX. Therefore, the 2% profit target and stop-loss choice is quite conservative and minimizes curve-fitting due to exits. Of course, there is always curve-fitting due to selection bias and that will be hopefully minimized by portfolio backtests.

2. Strategy development procedure

Price Action Lab software was used for the identification of the price patterns in each of the four stocks. The workspace setup is shown below:

WKS

It may be seen from the workspace that each pattern, long or short, must have at least 20 trades in the stock history, less than 8 consecutive losers, profit factor of at least 1.50 and 66% win rate. Note that the option “Find Common Pattern Only” was checked. When this option is selected, the program finds patterns in each security that satisfy the performance criteria specified on the workspace but are also profitable in a percentage of the other securities at a minimum profit factor. In this case we have set the minimum profit factor to 1 and the percentage to 99 so that the patterns are profitable in all stocks.

The results sorted for highest number of trades are shown below:

WKSRES

Each line on the results corresponds to a price pattern that satisfies the performance parameters specified by the user.  Trade on is the entry point, in this case the Open of next bar. P is the success rate of the pattern, PF is the profit factor, Trades is the number of historical trades, CL is the maximum number of consecutive losers, Type is LONG for long patterns and SHORT for short patterns, Target is the profit target,  Stop is the stop-loss and C indicates % or points for the exits, in this case it is %. Last Date and First Date are the last and first date in the historical data file.

Price Action Lab found a total of 104 patterns that fulfilled all the criteria specified on the workspace, 68 long and 36 short.

The next step involves specifying a generic ticker”XYZ”  for all patterns using the “Change File Name” Option. The new results are shown below:

WKSRESD

The distinct price patterns are saved after clicking “Save Distinct Only”. The results are shown below:

WKSRESD1

There are 100 distinct patterns, 65 long and 35 short. Next, Amibroker system code is generated and the system is tested in that platform on all four stocks.

3. Performance results

Below are the results from 05/18/2012 to 04/26/2016:

AMI_2012

Sharpe is 3.2 and CAR 62%. Below is the buy and hold rerun for equal weights of 25%:

AMI_BH_2012

Sharpe for buy and hold is 1.25 and CAR is 44.5%. The buy and hold return is negative for 2014 (-0.5%) and also year-to-date (-8.5%.). In comparison, return for the strategy in 2014 was 203% and 15% year-to-date.

4. Comments

It should be obvious that the strategy should perform well in the backtest period because the patterns were also selected from that period. Therefore, it is possible that the strategy is an artifact of data-mining bias. The probability of this was minimized by selecting patterns that passed a portfolio backtest and by using predictors from of the same class. The Sharpe ratio of 3.2 for the strategy is high and the t-statistic in a period of about 4 years is about 6.2, which is high. But a high t-statistic is no guarantee that data-mining bias was minimized. However, this particular process of strategy development has certain advantages over a process that relies on out-of-sample tests only due to lower data-snooping bias. The intention in this article was to describe a process that can be used as a starting point. Obviously, this process of development can be applied to any group of stocks but as their number increases, it becomes more computationally intensive.

Subscribe via RSS or Email, or follow us on Twitter.

Charting and backtesting program: Amibroker
Strategy discovery program: Price Action lab

Disclaimer

Copyright Notice

This entry was posted in Strategy Synthesis, Trading Strategies and tagged , , . Bookmark the permalink.

3 Responses to Developing A Trading Strategy For FANG stocks

  1. Bruce Herbert says:

    Two thumbs up!

    What a great piece, after many years using PAL, this is a great example of the work I believe are missing from your vast repository of documentation. As a fundamental process which may seem to be very easy and logical to the developers of PAL can be lost with their audience.

    Please don't stop here.

    Thanks,

    Bruce.

  2. Wouter says:

    Nice blog!
    Best, Wouter

Leave a Reply