Metaheuristic tuned LSTM forecasting and dandelion optimizer portfolio allocation test mean variance concentration in S&P 500 large cap equities

Classical Markowitz mean-variance portfolio optimization is capable of striking headline returns, but its reliance on sample estimates of expected return and covariance is widely thought to make it acutely sensitive to estimation error, raising the practical question of how much confidence to place in its long-only, fully-invested maximum-Sharpe solution. This study examines that question for a structurally important universe: 25 large-capitalization S&P 500 constituents. A Long Short-Term Memory network, tuned independently by the RIME algorithm and the Mountain Gazelle Optimizer (MGO), produces the multi-step price forecasts used to rank assets each month; the Dandelion Optimizer (DO) then allocates capital across the top-ranked names by jointly optimizing the Sharpe ratio, Sortino ratio, Maximum Drawdown, and variance, subject to full investment and no short-selling. Champion selection between the two tuning metaheuristics was unambiguous: RIME-LSTM beat MGO-LSTM on mean RMSE (20.84 vs. 24.57 USD) and, via a dense, paired Diebold-Mariano test, by a wide statistically significant margin ( p ≈ 1.9 × 10⁻⁸); a per-ticker breakdown of the same test, however, shows this pooled result is driven by sample size rather than a uniform per-stock advantage (RIME significantly better on 9 of 25 stocks, MGO on 9, no significant difference on 7). ARIMA produced the lowest mean error overall, but its error was concentrated in a small set of persistently trending names (Eli Lilly, Caterpillar, Meta) rather than spread evenly across the panel. Because Table- 4 -level accuracy differences do not by themselves establish which forecaster should drive portfolio construction, Phase 2 was run twice—once ranking assets with RIME-LSTM and once with ARIMA—over an 18-roll, 2025–2026 rolling-window backtest. Under RIME-LSTM ranking, the Dandelion Optimizer and Markowitz were statistically indistinguishable (Sharpe 1.121 vs. 1.104, bootstrap p = 0.948); under ARIMA ranking, the Dandelion Optimizer’s Sharpe ratio (1.205) exceeded Markowitz’s (1.018), again not significantly ( p = 0.594). Markowitz’s concentration, measured both by its largest single-asset weight and by the Herfindahl-Hirschman-based effective number of holdings, was consistently higher than the Dandelion Optimizer’s under either ranking signal (mean effective holdings 2.4–3.7 of 15 for Markowitz vs. 7.8–8.0 for the Dandelion Optimizer), and was itself lower under ARIMA ranking than under RIME-LSTM ranking—indicating that concentration severity depends on which signal selects the investable universe, not only on the allocator. During revision, a second reproducibility issue was identified and corrected: package-version drift in a shared, non-isolated Python environment altered the walk-forward portfolio results (though not the forecasting results) between the original analysis and this revision; all reported portfolio figures are from a frozen environment independently confirmed bit-for-bit reproducible across repeated runs. Gibbons-Ross-Shanken tests did not reject mean-variance efficiency for any strategy (all p > 0.31), and Breusch-Pagan and Koenker tests rejected homoskedasticity of the one-step-ahead forecast errors for 14 to 22 of the 25 stocks (8 to 21 under the robust test), depending on the model. Together these results indicate that classical mean-variance optimization’s practical reliability in a large-cap, index-heavyweight universe such as the S&P 500 depends materially on which forecasting signal informs asset selection, and is not reliably worse than a variance-penalized alternative such as the Dandelion Optimizer in this setting. The full pipeline, statistical-testing code, frozen dependency manifest, and every setting used to produce these results are released alongside this paper.

Authors

Institutions

Publication Details

Journal
Discover Artificial Intelligence
Published
2026-11-26
DOI
https://doi.org/10.1007/s44163-026-02825-5
Primary Topic
Stock Market Forecasting Methods
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Metaheuristic tuned LSTM forecasting and dandelion optimizer portfolio allocation test mean variance concentration in S&P 500 large cap equities

Mansur Beştaş
Discover Artificial Intelligence
Stock Market Forecasting Methods
article

Metaheuristic tuned LSTM forecasting and dandelion optimizer portfolio allocation test mean variance concentration in S&P 500 large cap equities

Mansur Beştaş
article en

Abstract

Classical Markowitz mean-variance portfolio optimization is capable of striking headline returns, but its reliance on sample estimates of expected return and covariance is widely thought to make it acutely sensitive to estimation error, raising the practical question of how much confidence to place in its long-only, fully-invested maximum-Sharpe solution. This study examines that question for a structurally important universe: 25 large-capitalization S&P 500 constituents. A Long Short-Term Memory network, tuned independently by the RIME algorithm and the Mountain Gazelle Optimizer (MGO), produces the multi-step price forecasts used to rank assets each month; the Dandelion Optimizer (DO) then allocates capital across the top-ranked names by jointly optimizing the Sharpe ratio, Sortino ratio, Maximum Drawdown, and variance, subject to full investment and no short-selling. Champion selection between the two tuning metaheuristics was unambiguous: RIME-LSTM beat MGO-LSTM on mean RMSE (20.84 vs. 24.57 USD) and, via a dense, paired Diebold-Mariano test, by a wide statistically significant margin ( p ≈ 1.9 × 10⁻⁸); a per-ticker breakdown of the same test, however, shows this pooled result is driven by sample size rather than a uniform per-stock advantage (RIME significantly better on 9 of 25 stocks, MGO on 9, no significant difference on 7). ARIMA produced the lowest mean error overall, but its error was concentrated in a small set of persistently trending names (Eli Lilly, Caterpillar, Meta) rather than spread evenly across the panel. Because Table- 4 -level accuracy differences do not by themselves establish which forecaster should drive portfolio construction, Phase 2 was run twice—once ranking assets with RIME-LSTM and once with ARIMA—over an 18-roll, 2025–2026 rolling-window backtest. Under RIME-LSTM ranking, the Dandelion Optimizer and Markowitz were statistically indistinguishable (Sharpe 1.121 vs. 1.104, bootstrap p = 0.948); under ARIMA ranking, the Dandelion Optimizer’s Sharpe ratio (1.205) exceeded Markowitz’s (1.018), again not significantly ( p = 0.594). Markowitz’s concentration, measured both by its largest single-asset weight and by the Herfindahl-Hirschman-based effective number of holdings, was consistently higher than the Dandelion Optimizer’s under either ranking signal (mean effective holdings 2.4–3.7 of 15 for Markowitz vs. 7.8–8.0 for the Dandelion Optimizer), and was itself lower under ARIMA ranking than under RIME-LSTM ranking—indicating that concentration severity depends on which signal selects the investable universe, not only on the allocator. During revision, a second reproducibility issue was identified and corrected: package-version drift in a shared, non-isolated Python environment altered the walk-forward portfolio results (though not the forecasting results) between the original analysis and this revision; all reported portfolio figures are from a frozen environment independently confirmed bit-for-bit reproducible across repeated runs. Gibbons-Ross-Shanken tests did not reject mean-variance efficiency for any strategy (all p > 0.31), and Breusch-Pagan and Koenker tests rejected homoskedasticity of the one-step-ahead forecast errors for 14 to 22 of the 25 stocks (8 to 21 under the robust test), depending on the model. Together these results indicate that classical mean-variance optimization’s practical reliability in a large-cap, index-heavyweight universe such as the S&P 500 depends materially on which forecasting signal informs asset selection, and is not reliably worse than a variance-penalized alternative such as the Dandelion Optimizer in this setting. The full pipeline, statistical-testing code, frozen dependency manifest, and every setting used to produce these results are released alongside this paper.

Discover Artificial IntelligenceVol. 6(1)
Bitlis Eren University (TR)
Stock Market Forecasting Methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon