The basic idea behind this strategy was that machine learning techniques could be used to identify what regime a stock is currently in and use that to predict future price movements.
I took several window sizes (roughly multiples of 30 trading days) into the past and computed the normalized trend line, the volatility around the trend line, and the classical volatility of the stock over these windows.
This set of data is then clustered via k-means clustering to identify a set of regimes.
Vectors are made from the current regime of each lookback window size and passed into a Random Forest. The y vector here is either a the return realized N (30) days into the future, or some categorization based on return bucketing. The distinction between these is whether the Random Forest is used as a regressor or classifier.
Based on the output of the Random Forest, we choose to go long/short/flat the stock.