Appendix: Stock Screening
This appendix provides a stock screener tool that will allow you to put everything we have learned in this book into practice. It addresses the most pressing issue for market participants: idea generation. We will build a screener across all the constituents of the S&P 500 index.
The sequence of events is as follows:
- Download all the current constituents of the S&P 500 from its Wikipedia webpage.
- Batch download OHLCV prices data from Yahoo Finance. We will drop the level to process each stock individually.
- Calculate the rebased relative series.
- Calculate regimes—breakout, turtle, moving averages (Simple Moving Average (SMA) and Exponential Moving Average (EMA)), and floor/ceiling—on both absolute and relative series. ...
Get Algorithmic Short Selling with Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.