Skip to main content
QUICK REVIEW

[Paper Review] Predicting the direction of stock market prices using random forest

Luckyson Khaidem, Snehanshu Saha|arXiv (Cornell University)|Apr 29, 2016
Stock Market Forecasting Methods117 citations
TL;DR

The paper uses Random Forest ensembles with technical indicators to classify stock movement direction, showing robust OOB convergence and strong 1–3 month predictive accuracy across multiple datasets.

ABSTRACT

Predicting trends in stock market prices has been an area of interest for researchers for many years due to its complex and dynamic nature. Intrinsic volatility in stock market across the globe makes the task of prediction challenging. Forecasting and diffusion modeling, although effective can't be the panacea to the diverse range of problems encountered in prediction, short-term or otherwise. Market risk, strongly correlated with forecasting errors, needs to be minimized to ensure minimal risk in investment. The authors propose to minimize forecasting error by treating the forecasting problem as a classification problem, a popular suite of algorithms in Machine learning. In this paper, we propose a novel way to minimize the risk of investment in stock market by predicting the returns of a stock using a class of powerful machine learning algorithms known as ensemble learning. Some of the technical indicators such as Relative Strength Index (RSI), stochastic oscillator etc are used as inputs to train our model. The learning model used is an ensemble of multiple decision trees. The algorithm is shown to outperform existing algo- rithms found in the literature. Out of Bag (OOB) error estimates have been found to be encouraging. Key Words: Random Forest Classifier, stock price forecasting, Exponential smoothing, feature extraction, OOB error and convergence.

Motivation & Objective

  • Motivate forecasting stock price direction as a classification problem to reduce investment risk.
  • Leverage ensemble learning (Random Forest) to handle noisy, nonlinear stock data.
  • Assess predictive performance using out-of-bag error, ROC, and standard classification metrics across multiple horizons and datasets.

Proposed method

  • Preprocess time series data with exponential smoothing to reduce noise.
  • Extract technical indicators (RSI, stochastic oscillator, Williams %R, MACD, PROC, OBV) as features.
  • Test linear separability via convex hulls and apply PCA to visualize in 2D.
  • Train a Random Forest classifier with bootstrap aggregating and random feature selection.
  • Evaluate using OOB error, accuracy, precision, recall, specificity, and ROC AUC.

Experimental results

Research questions

  • RQ1Can Random Forests reliably predict the direction of stock price movement (rise or fall) a fixed number of days ahead using technical indicators?
  • RQ2How does the Random Forest performance (OOB error, accuracy, ROC AUC) compare across different stocks and prediction horizons (1–3 months)?
  • RQ3What is the impact of the number of trees on OOB error and convergence in this context?
  • RQ4Are the selected features (technical indicators) sufficient and robust for direction prediction across datasets like Apple, GE, and Samsung?

Key findings

  • RF achieves high directional accuracy across datasets: Apple 1 month 86.84%, 3 months 93.97%; GE 1 month 84.72%, 3 months 92.54%; Samsung 1 month 84.71%, 3 months 92.54%.
  • ROC AUC is above 0.9 for all three datasets and horizons, indicating strong discrimination between rise and fall predictions.
  • OOB error decreases as the number of trees increases, demonstrating convergence and reduced overfitting with more trees.
  • The model’s robustness is supported by multiple metrics (accuracy, precision, recall, specificity) across 1–3 month horizons.
  • Ensemble margin analysis connects forest strength with lower generalization error via Chebyshev-based bounds.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.