Hi All,

Sharing my attempt to exploit the combination of two classic anomalies in factor investing, namely Small Caps and Low P/E Ratio, using the QC Algorithm Framework.

Universe: At the start of every year, find Small Cap stocks (market cap between $300M and $2B) with P/E Ratio in the 1st percentile.

Alpha: Go Long for a year.

Portfolio: Equally Weighted portfolio (investing the same amounts in each security).

Execution: Immediate Execution with Market Orders.

In the main.py script, I've included a parameter to control for rebalancing. It defaults to False but you can enter an integer to control for the number of days (calendar days) to rebalance the portfolio during the year to go back to equal weighting.

Also, in the Universe module (SmallCapsLowPERatioUniverseSelection.py script), you could modify the way I defined Market Cap and Low P/E Ratio at the end of the script.

The algo will also output some log information to check the stocks selected for the year and their P/E Ratio.

Season's Greetings!

Emilio Freire

InnoQuantivity.com

Author