Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Picking Liquid Stocks With Over 1000 % Return Since 2005

Introduction

Can one pick stocks and hope to beat the SPY index?

The following strategy and backtest answers this question affirmatively, at least for the period from 2005 until 2019.

Warning: 2005 until 2019 was a bull market. As we see later, this is a precondition for the strategy to work
Note: The title refer's to the backtest/strategy presented here picking stocks rather than anyone trading this strategy since 2005 and getting this return.

Strategy

  1. Filter top k stocks by AverageDollarVolume.
  2. Additionally compute (mean stock return - mean index return)/(eps + mean stock return std)
  3. If score from point 2 is higher than a threshold hold the stock.
  4. Every day make adjustments to the portfolio.

Caveats

  • When in bear market, the score from 2 would lead to false positives which will lead to losses.
  • May buy/sell too frequently which will lead to high costs. Currently instead of entry/exit conditions, a hold condition is used. Using different entry/exit conditions may be beneficial.
  • There are periods (days) when we are not holding anything. Holding SPY index in those period might be beneficial.
  • Instead of allocating the portfolio equally among stocks one can try to use weights related to past stock performance.
  • order_percent_change is used to buy stocks, which is not optimal. This is because it may lead to minor corrections (e.g. buying/selling 1-2 shares only) which are inconsequential but still incur costs.

Previous work

The strategy improves upon a previous post in two ways:
- additional selection criterion based on comparison of long term returns with SPY returns make sure we won't select complete lemons. For example AverageDollarVolume could be associated with higher selling than buying
- we use more than one stock, which provides extra protection against individual stocks
- the strategy tested uses less than 5 stocks because the criterion with high AverageDollarVolume and out performing SPY index is very restrictive.

Disclaimer

This presentation is for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation for any security; nor does it constitute an offer to provide investment advisory or other services by the author or anyone else. Nothing contained herein constitutes investment advice or offers any opinion with respect to the suitability of any security, and any views expressed herein should not be taken as advice to buy, sell, or hold any security or as an endorsement of any security or company. This disclaimer was adapted from Quantopian's own disclaimer.