When running an algorithm, have you ever seen the log message “Your order has been partially filled”? If this is the case then you may not have controlled for liquidity risk. Liquidity risk arises when your algorithm is not able to buy and/or sell the securities dictated by a strategy, and it can completely alter the composition of your trading portfolio.
Our answer to the problem posed by liquidity risk are two universes of equities: the Tradeable500US and the Tradeable1500US. By limiting an algorithm’s universe to equities in one or both of these baskets, you can minimize liquidity risk and almost guarantee that your order will be filled.
These stock universes combine the tradability filters proposed here and here and combine these with a sector exposure limit that prevents the universe from being biased towards any one sector in a robust and fast way. We envisage this tool existing as an importable set of equities in the Quantopian backtester that will remove any algorithmic anomalies caused by liquidity risk. To use this tool in a trading strategy, one could set a pipeline screen for the Tradeable500US, and only equities in this universe would be considered by the algorithm. The Tradeable500US could also be used in the research environment to speed up complex computation by limiting the number of equities queried by Pipeline. It would also allow you to limit your interaction to real, traded stocks, as opposed to recent IPOs and depositary receipts, which can confound good analysis.
Before we set this process in stone, we want your feedback in order to make this methodology as robust as possible. Are there any corner cases where an illiquid stock might slip through our filters? The more effective our filter is, the stronger your algorithms will be. Feel free to experiment with universe sizes, sector exposure limits and let us know what works best for your code.