When an insider buys their company's stock, it often means something. Employees of a company often know better than anyone when that company has something good coming which will translate to a rise in public stock price. If an algorithm could know when some employee of a company bought stock in their company, that algorithm could use that as a buying signal.
The insider trading data is actually available online at EDGAR. Insiders are required to report to EDGAR within two days of buying stock in their company. This data is then made publicly available online. I extracted data about insider purchases from EDGAR for the top 3% of stocks in the dollar volume universe. In my algorithm below, I import the data and buy the stocks with the most recent insider buys over a certain frame. There's a more detailed explanation of all this in the code.
Surprisingly (at least to me), this strategy doesn't do that well. Even after messing around with the parameters, I couldn't find any variations that significantly outperformed the market. Maybe I'm missing something. Give it a try, clone my algorithm, and let me know what you think.