Trading Strategies in the Peruvian Foreign Exchange Market with Dynamic Optimization: A Hybrid HMM–Deep Reinforcement Learning Approach

Authors

  • Hilario Aradiel Castañeda Universidad Nacional del Callao, Perú
  • Guillermo Antonio Mas Azahuanche Universidad Nacional del Callao, Perú
  • Humberto Urbano Arteaga Cortez Universidad Nacional del Callao, Perú
  • Omar Tupac Amaru Castillo Paredes Universidad Nacional del Callao, Perú
  • Artemio Ruben Reinoso Palacios Universidad Nacional del Callao, Perú
  • César Vilchez Inga Universidad Nacional del Callao, Perú
  • Enrique Wilfredo Carpena Velasquez Universidad Nacional Pedro Ruiz Gallo - (PE)

DOI:

https://doi.org/10.18687/LACCEI2026.1.1.1211

Keywords:

USD/PEN, Hidden Markov Models, market regimes, deep reinforcement learning, PPO, algorithmic trading, risk management, CRISP-DM..

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..

Downloads

Published

2026-07-27

License

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

LACCEI retains copyright of all published articles under the terms of its copyright transfer agreement. As the copyright holder, LACCEI distributes the articles to the public under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).

How to Cite

Aradiel Castañeda, H., Mas Azahuanche, G. A., Arteaga Cortez, H. U., Castillo Paredes, O. T. A., Reinoso Palacios, A. R., Vilchez Inga, C., & Carpena Velasquez, E. W. (2026). Trading Strategies in the Peruvian Foreign Exchange Market with Dynamic Optimization: A Hybrid HMM–Deep Reinforcement Learning Approach. LACCEI, 1(14). https://doi.org/10.18687/LACCEI2026.1.1.1211

Most read articles by the same author(s)

1 2 > >>