Factor models and long short equity strategies are an elegant way to translate quantitative predictions into trades. The general idea is to pick a metric, rank all stocks on this metric, and then buy and sell according to ranking. For more information on factor modeling and long short equity, please see the Quantopian Lecture Series.
Here we use the Pipeline API to implement a traditional value factor, one of the most common. We demonstrate our process in a notebook, and an algorithm will also be attached in the comments.
This is a case study and part of the Quantopian Lecture Series.
Strategy taken from "130/30: The New Long-Only" by Andrew Lo and Pankaj Patel (https://www.math.nyu.edu/faculty/avellane/Lo13030.pdf)