Below failed algorithm is an attempt to make use of random forest for prediction of daily price changes using historical data as features. Random forest was trained monthly and was used to trade SPY daily using historical data (SPY, VIX, LQD and RECPROUSM156N) from past 7 years. The usefulness of the attached algorithm is the framework for using machine learning for trading, e.g. use of fetch_csv, batch_transform for creation of datasets for a machine learning method. Additionally, I just wanted the users here to learn from my failures (publication bias and all).
I'd like to acknowledge the Random Forest example posted by Gus (https://www.quantopian.com/posts/simple-machine-learning-example). Also the features used were inspired by Florent's Robotus algorithm (https://www.quantopian.com/posts/robotus-buying-and-selling-based-on-market-sentiment).