Trading Strategies in the Peruvian Foreign Exchange Market with Dynamic Optimization: A Hybrid HMM–Deep Reinforcement Learning Approach (#1211)
Read ArticleDate of Conference
July 15-17, 2026
Published In
"Engineering without Borders: Artificial Intelligence, Knowledge, Innovation, and Alliances for a Future from the Americas"
Location of Conference
Santiago (Chile)
Authors
Aradiel Castañeda, Hilario
Mas Azahuanche, Guillermo Antonio
Arteaga Cortez, Humberto Urbano
Castillo Paredes, Omar Tupac Amaru
Reinoso Palacios, Artemio Ruben
Vilchez Inga, César
Carpena Velasquez, Enrique Wilfredo
Abstract
Furthermore, this study develops and evaluates a hybrid architecture for algorithmic trading in the USD/PEN foreign exchange market, where a Gaussian Hidden Markov Model (HMM) infers latent market regimes and a deep reinforcement learning (DRL) agent optimizes Buy/Sell/Hold actions within an MDP formulation. Moreover, a reproducible data pipeline is implemented to integrate heterogeneous financial and macroeconomic sources, producing a consolidated dataset with 4,126 observations and 1,113 variables spanning 2010-02-02 to 2025-12-05, with continuity checks to support stable learning. The inferred regime signal (e.g., bearish/volatile, sideways, bullish) is incorporated as exogenous context to mitigate market non-stationarity and improve policy learning. Finally, out-of-sample benchmarking shows that the RL-based strategy outperforms supervised baselines and Buy & Hold, achieving the highest cumulative return (28.64%) and improved risk-adjusted performance when regime context is included (Sharpe 0.116 for RL+HMM vs 0.081 for RL-only), while remaining robust in adverse periods where the passive benchmark incurs losses (-14.56%). In addition, training dynamics suggest PPO yields more stable convergence than alternative DRL methods in a noisy financial environment. Keywords: USD/PEN; Hidden Markov Models; market regimes; deep reinforcement learning; PPO; algorithmic trading; risk management; CRISP-DM..