This notebook is a new version of an earlier post - How to Get an Allocation: Writing an Algorithm for the Quantopian Investment Management Team. The original version used the Sentdex Sentiment Analysis dataset. This version uses the AlphaVertex PreCog 500 dataset for trading signal and uses the Optimize API to place orders.
The following notebook and backtest walk through the research and implementation of a market neutral strategy that trades a large, dynamically selected universe of stocks. Of course, not all market-neutral strategies will get an allocation. This notebook demonstrates the research and development of an algorithm meeting many of the criteria used by our investment management team during the allocation process.
The project uses the following tools:
- Blaze, to study and interact with partner data.
- Pipeline, to dynamically select stocks within the Q1500US universe to trade each day.
- Alphalens, to analyze the predictive ability of an alpha factor.
- Optimize, to move the portfolio from one state to another.
- The Interactive Development Environment (IDE), to backtest the strategy.
- Pyfolio to understand the performance and risk analysis of the backtest.
This specific example also uses the Alpha Vertex PreCog 500, EventVestor Earnings Calendar, and EventVestor Mergers & Acquisitions datasets.
The end result of this project was a long-short strategy with the following attributes preferred by the Quantopian Investment Management Team:
- Large, dynamic universe.
- Equal long/short exposure.
- Only trades stocks in the Q1500US.
- Low position concentration.
- Beta is 0.
- Low volatility.
- High amount of daily turnover.
Clone the notebook, investigate other datasets, and make your own market neutral strategy with the above criteria.
Note: This pipelines in this notebook were run using premium data for some of the EventVestor datasets. You can run the backtest up to 2 years ago with the free data.