A Methodologically Rigorous Benchmark of Linear Regression,RNN, and LSTM for S&P 500 Forecasting:Identifying Sources of Performance Inflation in Financial DeepLearning
Authors: Hari Sitaula, Joseph Opitz
Organizations: Department of Mathematical Sciences, Montana Technological University, 1300 W Park St, Butte, MT 59701, USA.
This study examines one-day-ahead forecasting of the S&P 500 closing level using a 2006-2025 dataset that includes fundamental price data, macroeconomic indicators, and engineered technical features. We benchmark three model families, namely linear regression, vanilla recurrent neural networks (RNN), and long short-term memory networks (LSTM), within a unified preprocessing and chronological evaluation pipeline. A central contribution of this work is a methodological audit of common practices in the deep-learning-for-stock-prediction literature. We identify three sources of result inflation that frequently appear in published methodologies: wavelet-denoised evaluation targets, the absence of a naive persistence baseline, and best-of-N replicate reporting. We then re-evaluate all model families under a corrected protocol that controls for each. Performance is reported using root mean squared error, mean absolute percentage error, and the Pearson correlation coefficient, averaged across N = 30 independent replicates per configuration. We compare models on accuracy, stability across replicates, and architectural depth sensitivity, using the naive persistence forecast (predicting today's close as tomorrow's close) as a primary baseline against which all candidate models must demonstrate improvement.
Figures & tables
Figure 1: S&P 500 closing level from 2006 to 2025 with shaded regions indicating major market stress periods, including the Global Financial Crisis (2007–2009) and the COVID-19 market crash (2020).
Figure 2: Correlation heatmap of OHLC variables and next-day target values over the training sample. The high pairwise correlations among Open, High, Low, and Close motivate the removal of Open, High, and Low from the feature set.
Model
RMSE
MAPE (%)
R
Naive Persistence
53.16
0.817
0.9973
OLS
54.83
0.848
0.9971
Ridge
55.08
0.859
0.9971
Lasso
54.63
0.864
0.9971
Elastic Net
55.19
0.876
0.9971
Bayesian Ridge
54.78
0.848
0.9971
Table 1: Out-of-sample performance of linear regression models on the held-out test set under the no-denoising protocol. RMSE is in S&P 500 index points; MAPE is reported as a percentage; R is unitless. Bold indicates the best mean value per column, excluding the naive baseline.
Figure 3: Actual versus predicted S&P 500 closing levels on the held-out test set for the Lasso regression model. The predicted series tracks the actual series closely in level but does not improve on the naive persistence baseline in RMSE.
Figure 4: Diagnostic plots for the best linear regression model (Lasso) on the held-out test set. Left: residuals over time, centered near zero with no obvious concentration in specific market regimes. Middle: residual distribution, approximately symmetric around zero. Right: predicted versus actual closing levels, with the dashed line indicating perfect prediction. Together these diagnostics indicate no obvious functional misspecification within the linear family, though the model does not improve on the naive persistence baseline in RMSE.
Neurons
Optimizer
LR
Batch
Avg. RMSE ± Std.
Avg. MAPE (%) ± Std.
Avg. R
10
Nadam
0.001
8
54.48±0.51
0.850±0.011
0.9971
30
AdamW
0.001
16
54.06±0.56
0.843±0.010
0.9972
50
Nadam
0.1
16
55.75±0.78
0.868±0.015
0.9970
100
Nadam
0.1
16
55.63±0.82
0.863±0.015
0.9970
150
RMSprop
0.001
4
55.37±0.91
0.857±0.014
0.9970
200
RMSprop
0.1
4
56.81±1.40
0.881±0.022
0.9969
Table 2: Single-layer LSTM: average out-of-sample performance across 30 replicates under the no-denoising protocol. RMSE is reported in index points; MAPE is reported as a percentage. Bold entries indicate the best mean value per column. Naive persistence baseline RMSE is 53.16 for reference.
Figure 5: Actual versus predicted S&P 500 closing levels on the held-out test set for the best single-layer LSTM (30 neurons). The predicted series tracks the actual series closely in level but does not improve on the naive persistence baseline in RMSE.
Figure 6: Distribution of out-of-sample RMSE across 30 independent replicates for each single-layer LSTM configuration. The horizontal dashed line indicates the naive persistence baseline at 53.16 index points.
Architecture
Optimizer
LR
Batch
Avg. RMSE ± Std.
Avg. MAPE (%) ± Std.
Avg. R
[10,5]
AdamW
0.001
4
55.44±0.77
0.865±0.015
0.9970
[20,10]
Nadam
0.001
8
55.42±0.75
0.871±0.017
0.9970
[50,20]
AdamW
0.001
16
55.21±0.79
0.862±0.015
0.9971
[100,50]
Nadam
0.1
16
57.41±1.14
0.904±0.021
0.9968
[150,100]
AdamW
0.001
16
54.41±0.50
0.847±0.009
0.9971
[100,50,20]
Nadam
0.001
16
56.09±0.97
0.884±0.021
0.9970
Table 3: Multi-layer LSTM: average out-of-sample performance across 30 replicates under the no-denoising protocol. RMSE is reported in index points; MAPE is reported as a percentage. Bold entries indicate the best mean value per column. Naive persistence baseline RMSE is 53.16 for reference.
Figure 7: Actual versus predicted S&P 500 closing levels on the held-out test set for the best multi-layer LSTM ( [150,100] ). The predicted series tracks the actual series closely in level but does not improve on the naive persistence baseline in RMSE.
Figure 8: Distribution of out-of-sample RMSE across 30 independent replicates for each multi-layer LSTM configuration. The horizontal dashed line indicates the naive persistence baseline at 53.16 index points.
Neurons
Optimizer
LR
Batch
Avg. RMSE ± Std.
Avg. MAPE (%) ± Std.
Avg. R
10
RMSprop
0.01
4
56.78±0.70
0.891±0.013
0.9969
30
Nadam
0.1
8
56.69±0.93
0.890±0.016
0.9969
50
Nadam
0.1
16
56.27±0.83
0.881±0.014
0.9970
100
Nadam
0.1
8
57.18±1.66
0.897±0.024
0.9970
150
Nadam
0.1
16
58.79±7.06
0.922±0.100
0.9967
200
Nadam
0.01
8
56.16±2.73
0.888±0.045
0.9970
Table 4: Single-layer RNN: average out-of-sample performance across 30 replicates under the no-denoising protocol. RMSE is reported in index points; MAPE is reported as a percentage. Bold entries indicate the best mean value per column. Naive persistence baseline RMSE is 53.16 for reference.
Figure 9: Actual versus predicted S&P 500 closing levels on the held-out test set for the most stable single-layer RNN (50 neurons). The predicted series tracks the actual series closely in level but does not improve on the naive persistence baseline in RMSE.
Figure 10: Distribution of out-of-sample RMSE across 30 independent replicates for each single-layer RNN configuration. The horizontal dashed line indicates the naive persistence baseline at 53.16 index points. Note the elevated variance for the 150-neuron configuration, indicating training instability at this size.
Architecture
Optimizer
LR
Batch
Avg. RMSE ± Std.
Avg. MAPE (%) ± Std.
Avg. R
[10,5]
RMSprop
0.001
8
56.12±0.61
0.880±0.011
0.9970
[20,10]
RMSprop
0.001
16
55.61±0.66
0.868±0.011
0.9970
[50,20]
RMSprop
0.001
16
55.27±0.83
0.864±0.015
0.9971
[100,50]
Nadam
0.001
4
54.71±0.61
0.849±0.009
0.9971
[150,100]
Nadam
0.001
4
55.04±0.69
0.861±0.014
0.9971
[100,50,20]
AdamW
0.001
16
53.97±0.31
0.837±0.004
0.9972
Table 5: Multi-layer RNN: average out-of-sample performance across 30 replicates under the no-denoising protocol. RMSE is reported in index points; MAPE is reported as a percentage. Bold entries indicate the best mean value per column. Naive persistence baseline RMSE is 53.16 for reference.
Figure 11: Actual versus predicted S&P 500 closing levels on the held-out test set for the best multi-layer RNN ( [100,50,20] ), the overall best-performing neural configuration in this study. The predicted series tracks the actual series closely in level but does not improve on the naive persistence baseline in RMSE.
Figure 12: Distribution of out-of-sample RMSE across 30 independent replicates for each multi-layer RNN configuration. The horizontal dashed line indicates the naive persistence baseline at 53.16 index points. The three-layer [100,50,20] configuration produces both the lowest mean RMSE and the tightest replicate distribution of any configuration in the architecture survey.
Model
Configuration
RMSE
MAPE (%)
Δ vs. Naive
Naive Persistence
—
53.16
0.817
0.00
Lasso
—
54.63
0.864
− 1.47
Single-layer LSTM
30 units
54.06
0.843
− 0.90
Multi-layer LSTM
[150,100]
54.41
0.847
− 1.25
Single-layer RNN
50 units
56.27
0.881
− 3.11
Multi-layer RNN
[100,50,20]
53.97
0.837
− 0.81
Table 6: Cross-family comparison of best-performing configurations under the no-denoising protocol. RMSE in S&P 500 index points; MAPE in percent. Improvements over naive computed as (Naive RMSE) − (Model RMSE); negative values indicate the model is worse than naive.
Figure 13: Cross-family comparison of best-performing configurations under the no-denoising protocol. Each bar shows the mean out-of-sample RMSE for the top configuration of each model family; the horizontal dashed line marks the naive persistence baseline at 53.16 index points. No family’s best configuration falls below the baseline.
Ensemble
Architecture
RMSE
dˉ
DM stat.
p -value
Verdict ( α=0.05 )
Naive persistence
—
53.16
0
—
—
—
LSTM ensemble
[30]
53.90
+79.5
+1.35
0.178
not rejected
RNN ensemble
[100,50,20]
53.71
+58.5
+1.15
0.250
not rejected
Table 7: Ensemble forecasting and Diebold–Mariano test results. Test set length T=966 trading days. Mean loss differential dˉ has units of squared index points. The DM statistic is HLN-corrected. p -values are two-sided.
Machine Learning Research Group, Department of Engineering Science, University of Oxford · Oxford-Man Institute of Quantitative Finance, University of Oxford
National University of Singapore Singapore · National University of Singapore Asian Institute of Digital Finance Singapore · Nanyang Technological University Singapore