A hybrid LSTM forecasting, clustering, and reinforcement learning framework for commodity portfolio optimization

Forecasting commodity prices and constructing optimal portfolios remain challenging due to the nonlinear dynamics, high volatility, and regime shifts characterizing global commodity markets. Conventional statistical approaches often fail to adequately capture such complex temporal dependencies. To address these limitations, this paper presents a hybrid framework that integrates Long Short-Term Memory (LSTM) networks for commodity price forecasting and Proximal Policy Optimization (PPO) to enable adaptive, risk-aware portfolio allocation. Unlike conventional two-stage frameworks, where forecasts are passed as fixed inputs to a static optimizer, the proposed approach incorporates LSTM forecasts as state features for the PPO policy, which learns to weight them against realized risk through reward feedback. In addition, clustering techniques including K-Means and Deep K-Means are employed to group commodities exhibiting similar historical dynamics, thereby enhancing pattern extraction across heterogeneous assets. Performance is assessed using risk-adjusted measures, including the Reward-to-Risk (R2R) ratio and the Conditional Value at Risk (CVaR), allowing for a systematic evaluation of return-risk trade-offs. For benchmarking purposes, the Twin Delayed Deep Deterministic Policy Gradient (TD3) algorithm is also considered. Experimental results show that the proposed PPO-LSTM framework outperforms baseline PPO and TD3 models, as well as naive benchmark strategies equal-weighted and market index portfolios, achieving an improvement of 17.04% in final returns and 69.6% in R2R, and a slightly lower mean maximum drawdown in the tested evaluation period. These results indicate that a tightly integrated forecasting-optimization framework can improve risk-adjusted performance and reduce tail-risk exposure in non-stationary commodity markets, based on historical backtesting.

Authors

Institutions

Publication Details

Journal
Social Sciences & Humanities Open
Published
2026-11-02
DOI
https://doi.org/10.1016/j.ssaho.2026.103823
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
article

A hybrid LSTM forecasting, clustering, and reinforcement learning framework for commodity portfolio optimization

Malek Sarhani, Abdelkader O. El Alaoui, Saïd Ouatik El Alaoui, Kenza Elkarnighi
1 links
Social Sciences & Humanities Open
Stock Market Forecasting Methods
article

A hybrid LSTM forecasting, clustering, and reinforcement learning framework for commodity portfolio optimization

Malek Sarhani, Abdelkader O. El Alaoui, Saïd Ouatik El Alaoui, Kenza Elkarnighi
article en

Abstract

Forecasting commodity prices and constructing optimal portfolios remain challenging due to the nonlinear dynamics, high volatility, and regime shifts characterizing global commodity markets. Conventional statistical approaches often fail to adequately capture such complex temporal dependencies. To address these limitations, this paper presents a hybrid framework that integrates Long Short-Term Memory (LSTM) networks for commodity price forecasting and Proximal Policy Optimization (PPO) to enable adaptive, risk-aware portfolio allocation. Unlike conventional two-stage frameworks, where forecasts are passed as fixed inputs to a static optimizer, the proposed approach incorporates LSTM forecasts as state features for the PPO policy, which learns to weight them against realized risk through reward feedback. In addition, clustering techniques including K-Means and Deep K-Means are employed to group commodities exhibiting similar historical dynamics, thereby enhancing pattern extraction across heterogeneous assets. Performance is assessed using risk-adjusted measures, including the Reward-to-Risk (R2R) ratio and the Conditional Value at Risk (CVaR), allowing for a systematic evaluation of return-risk trade-offs. For benchmarking purposes, the Twin Delayed Deep Deterministic Policy Gradient (TD3) algorithm is also considered. Experimental results show that the proposed PPO-LSTM framework outperforms baseline PPO and TD3 models, as well as naive benchmark strategies equal-weighted and market index portfolios, achieving an improvement of 17.04% in final returns and 69.6% in R2R, and a slightly lower mean maximum drawdown in the tested evaluation period. These results indicate that a tightly integrated forecasting-optimization framework can improve risk-adjusted performance and reduce tail-risk exposure in non-stationary commodity markets, based on historical backtesting.

Social Sciences & Humanities OpenVol. 14
Université Ibn-Tofail (MA), International University of Rabat (MA), Al Akhawayn University (MA)
Climate action
Openalex Percentile: Top 13%
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