Paper: arXiv 2511.12129

Authors: Hongyang Yang, Xiao-Yang Liu, Qingwei Wu

Abstract

Stock recommendation is vital to investment companies and investors. However, no single stock selection strategy will always win while analysts may not have enough time to check all S&P 500 stocks (the Standard & Poor’s 500). In this paper, we propose a practical scheme that recommends stocks from S&P 500 using machine learning. Our basic idea is to buy and hold the top 20% stocks dynamically. First, we select representative stock indicators with good explanatory power. Secondly, we take five frequently used machine learning methods, including linear regression, ridge regression, stepwise regression, random forest and generalized boosted regression, to model stock indicators and quarterly log-return in a rolling window. Thirdly, we choose the model with the lowest Mean Square Error in each period to rank stocks. Finally, we test the selected stocks by conducting portfolio allocation methods such as equally weighted, mean-variance, and minimum-variance. Our empirical results show that the proposed scheme outperforms the long-only strategy on the S&P 500 index in terms of Sharpe ratio and cumulative returns. This work is fully open-sourced at \href{“https://github.com/AI4Finance-Foundation/Dynamic-Stock-Recommendation-Machine_Learning-Published-Paper-IEEE"}{“GitHub”}.

Complexity vs Empirical Score

  • Math Complexity: 6.0/10
  • Empirical Rigor: 8.0/10
  • Quadrant: Holy Grail — high math complexity, high empirical rigor

Why this score: The paper employs moderate-to-advanced machine learning methods (ridge regression, random forest, GBM) and rolling-window cross-validation, but its empirical rigor is high due to detailed backtesting on S&P 500 data over 27 years, portfolio allocations, and open-source code.

Research Flowchart

  flowchart TD
  A["<b>Research Goal</b><br/>Develop a practical ML scheme for dynamic stock recommendation<br/>outperforming the S&P 500 index"] --> B["<b>Data Collection</b><br/>S&P 500 Stock Data<br/>Quarterly Log-Returns<br/>Representative Indicators"]
  
  B --> C["<b>Rolling Window Modeling</b><br/>5 ML Methods:<br/>Linear Regression, Ridge Regression,<br/>Stepwise Regression, Random Forest,<br/>Generalized Boosted Regression"]
  
  C --> D["<b>Model Selection</b><br/>Select model with lowest<br/>Mean Square Error (MSE)<br/>per period"]
  
  D --> E["<b>Stock Ranking</b><br/>Rank stocks based on<br/>predicted returns<br/>Top 20% selected dynamically"]
  
  E --> F["<b>Portfolio Allocation Testing</b><br/>Equally Weighted<br/>Mean-Variance<br/>Minimum-Variance"]
  
  F --> G["<b>Key Findings</b><br/>• Outperforms S&P 500 index<br/>• Better Sharpe Ratio<br/>• Higher Cumulative Returns<br/>• Fully open-sourced on GitHub"]

Cited References (24)

  1. Value Investing: A Look at the Benjain Graham Approach (1996)
  2. SCREENING FOR STOCKS USING THE JOHN TEMPLETON VALUE APPROACH (2001)
  3. The Use of the P/E Ratio to Stock Valuation (2012)
  4. Ls-decomposition for robust recovery of sensory big data (2017)
  5. Parallel Architectures for Improving the Performance of a GA Based Trading System (2012)
  6. The implied cost of capital: A new approach (2011)
  7. Security Analysis, Fifth Edition (1988)
  8. The Intelligent Investor: a Book of Practical Counsel (1959)
and 16 more
  1. Regression-Based Earnings Forecasts (2013)
  2. Deep Learning for Multivariate Financial Time Series (2015)
  3. A LSTM-based method for stock returns prediction: A case study of China stock market (2015)
  4. Investigation Into The Effectiveness Of Long Short Term Memory Networks For Stock Price Prediction (2016) — link
  5. Improving Factor-Based Quantitative Investing by Forecasting Company Fundamentals (2017) — link
  6. The Elements of Statistical Learning, 2nd Edition (2009)
  7. R: A Language and Environment for Statistical Computing.
  8. An Introduction to Statistical Learning with Applications in R (2013)
  9. Least Angle Regression (2004)
  10. Classification and Regression by randomForest (2002)
  11. Generalized Boosted Models: A guide to the gbm package (2007)
  12. Mean-Variance Investing (August 10, 2012)
  13. MATLAB Financial Toolbox: Portfolio Object (2017)
  14. Digesting Anomalies: An Investment Approach (2014)
  15. Fourth-order tensors with multidimensional discrete transforms (2017) — link
  16. Our codes

0 of 24 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2518 linked papers.