The long/short strategy is based on features engineered by DLPAL LS software and has generated half the equal allocation buy and hold of FAANG stocks since January 2016 but by holding two long and two short open positions in weekly timeframe.
Edit (03/11/2018): The signals of the long/short FAANG strategy described in this article are now included in our weekly premium reports.
There are many ways of developing and executing these long/short strategies. In this article we look at a strategy for FAANG stocks (FB, AAPL, AMZN, NFLX and GOOGL) in the weekly timeframe based on factors (also known as features, predictors or attributes) engineered by DLPAL LS:
DLPAL LS uses primitive attributes of price action, and specifically the open, high, low and close, to extract features types in an unsupervised learning mode based on general feature clusters. Then, the program uses the extracted features in supervised learning mode to identify long and short candidates in a universe of securities. The long/short identification is based on a set of calculated features and the user has flexibility in ranking the results according to their values… Historical files of features can be generated for backtesting the strategies and for machine learning.
Below is the workspace used to calculate the features for FAANG stocks. This is available from DLPAL LS tools. We used weekly data from 01/03/2000 or latter depending on IPO to 03/09/2018. We requested 114 instances per file so that feature calculation will start on 01/2016 using the available history.
This is an example of how files are generated by the DLPAL LS feature history tool. Four features are appended to the end of each line in historical data files: the long and short directional probabilities, PLong and PShort, respectively, their difference Pdelta and their significance S.
The generated files are then imported in Amibroker: PLong, PShort, Pdelta and S are saved as Volume, OpenInt, AUX1 and AUX2.
The strategy as described below is applied to FAANG stocks but same methodology applies for any other group of stocks. Click here for an example using DOW 30 stocks.
Time-frame: Weekly (adjusted data)
Strategy type: Dollar neutral long/short equity
Universe: FAANG stocks
Backtest period: 01/08/2016– 03/09/2018
Reserved for weekly feature calculation: 01/07/2000 – 12/31/2015
Maximum open positions: 2 long and 2 short
Position size per stock: Equity/4
Position entry/exit: Open of next weekly bar
Commission per share: $0.01
Score: P-delta × S
Buy the top 2 and short the bottom 2 stocks at the open of the next week based on score ranking
Strategy performance (01/08/2016 – 03/09/2018)
|Parameter||Strategy||Buy and hold*|
* Based on equal allocation of 20% at start of the backtest period. No rebalancing.
Below are the equity curves of buy and hold and the long/short strategy.
Below are the equity curve (same as above), underwater equity curve, monthly returns table and Monte Carlo simulation (based on equity curve changes.) Click on images to enlarge.
There is about 2% probability of 15% or higher drawdown according to the simulation.
Weekly execution involves updating weekly data files, ranking stocks according to score and then selecting top two stocks to go long and bottom two stock to go short (Open positions are closed or kept open based on results.) Below is an example of the workspace used:
The results for next week are shown below after sorting for P-delta × S:
TS is the profit-target and stop-loss file, P-long and P-short are the long and short probabilities for a position in the corresponding ticker, P-delta is the difference (P-long – P-short), a measure of the directional bias and S is the significance of the result (for weekly data 0 means low or no significance.)
This is the final result after clicking L/S P-delta × S 50/50 to rank the stocks and remove entries with 0 significance S.
If you have any questions or comments, happy to connect on Twitter: @priceactionlab
Hedge funds can receive a free fully functional demo of DLPAL LS valid for one month. For more details and information on how to order a demo click here.