I am implementing a Random Forest classifier algorithm on Python for predicting future stock returns (one month). My goal is to foresee whether the cumulative returns in a month will be negative or positive and the magnitude of the movement. The label of the classification is:

  • -2 if the cumulative returns are negative and lower than a given threshold
  • -1 if the cumulative returns are negative but over the threshold
  • 1 if positive but lower than the threshold
  • 2 if positive and over the threshold

In doing so, I am using a list of features (predictors) taken from the literature:

  • Past $n$ returns
  • Some T-Bill rates
  • Financial and economical indicators such as Oil price, Gold price, treasury securities yield
  • Term and default spreads
  • Exchange rate
  • Returns on majour indices
  • Technical indicators: Volume, Volatility, Trend, Momentum

At the end I end up with more than 100 features and I apply a feature importance to select the best 20 features. However, both the in-sample and out-of-sample accuracy remain around 25% (as in the case of a random choice).

My question is whether there exist in literature better features or maybe strategies that may improve the predictive power of the model for the horizon I'm considering.

  • $\begingroup$ I am not sure if you are trying to predict monthly returns for individual stocks (N forecsasts every month) or for an index (such as the S&P 500) (one forecast every month). $\endgroup$
    – nbbo2
    Jun 14, 2020 at 15:28
  • $\begingroup$ I am trying to predict individual stock returns, so N forecasts every month (in particular now I am concentrating on ETFs but the model is built to be as general and flexible as possible). $\endgroup$
    – Matteo
    Jun 14, 2020 at 15:38
  • $\begingroup$ Binning like this does not make sense to me and can be highly problematic. It matters if you’re a cent below the threshold or a billion dollars below the threshold, yet you would regard those as the same. $\endgroup$
    – Dave
    Jan 1, 2022 at 4:27


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.