Finally, we will utilize random forests to model our data. Although we expect that the ensemble to be able to utilize the information from additional lags and the rolling average, we will start with only 20 lags and the return percentages as inputs. Thus, our initial regressor is simply RandomForestRegressor(). This results in a model that does not perform very well. Its MSE is 19.02 and its Sharpe value is 0.11.
The following figure depicts the trades that the model generates:
Trades of random forest model