Paper: arXiv 2407.19858

Authors: Tiago Monteiro

Abstract

In quantitative finance, machine learning methods are essential for alpha generation. This study introduces a new approach that combines Hidden Markov Models (HMM) and neural networks, integrated with Black-Litterman portfolio optimization. During the COVID period (2019-2022), this dual-model approach achieved a 83% return with a Sharpe ratio of 0.77. It incorporates two risk models to enhance risk management, showing efficiency during volatile periods. The methodology was implemented on the QuantConnect platform, which was chosen for its robust framework and experimental reproducibility. The system, which predicts future price movements, includes a three-year warm-up to ensure proper algorithm function. It targets highly liquid, large-cap energy stocks to ensure stable and predictable performance while also considering broker payments. The dual-model alpha system utilizes log returns to select the optimal state based on the historical performance. It combines state predictions with neural network outputs, which are based on historical data, to generate trading signals. This study examined the architecture of the trading system, data pre-processing, training, and performance. The full code and backtesting data are available under the QuantConnect terms: https://github.com/tiagomonteiro0715/AI-Powered-Energy-Algorithmic-Trading-Integrating-Hidden-Markov-Models-with-Neural-Networks

Complexity vs Empirical Score

  • Math Complexity: 7.0/10
  • Empirical Rigor: 8.5/10
  • Quadrant: Holy Grail — high math complexity, high empirical rigor

Why this score: The paper employs advanced mathematical frameworks including Hidden Markov Models, neural networks, and Black-Litterman optimization with explicit LaTeX formulas, while demonstrating high empirical rigor through live backtesting on QuantConnect, publication of code, and detailed performance metrics.

Research Flowchart

  flowchart TD
  A["Research Goal: Validate HMM + NN for Energy Trading Alpha"] --> B["Data & Model Selection"]
  B --> C{"Data Pre-Processing & Training"}
  
  subgraph B
      B1["Input: Energy Stocks<br>2019-2022"]
      B2["Model 1: Hidden Markov Model<br>States + Log Returns"]
      B3["Model 2: Neural Network<br>Price Prediction"]
  end
  
  subgraph C
      C1["Backtesting on QuantConnect<br>3-Year Warm-up"]
      C2["Alpha Signal Generation"]
      C3["Integration with<br>Black-Litterman Optimization"]
  end
  
  C --> D["Execution & Risk Management"]
  
  subgraph D
      D1["Trade: Liquidity & Cost Analysis"]
      D2["Outcome: 83% Return<br>Sharpe 0.77"]
  end
  
  D --> E["Final Output: Open Source Strategy"]

Evidence Card

What the authors claim, on what data, and who has checked it. Read from the paper's own text by a language model: every quote is verbatim, nothing was re-run. How to read this card

Proposes

The paper proposes a dual‑model trading system that combines Hidden Markov Models and neural networks with Black‑Litterman portfolio optimization for energy equities.

Source sentence
This study introduces a new approach that combines Hidden Markov Models (HMM) and neural networks, integrated with Black-Litterman portfolio optimization.

Assumes 5

  • The portfolio is fully invested with weights summing to one. execution
    Source sentence
    subject to the constraint PN i=1 wi = 1 (fully invested portfolio).
  • Risk aversion is captured by a single parameter λrisk in the adjusted return formula. model
    Source sentence
    Radj = Rp −λrisk × Riskpenalty where λrisk is the risk aversion parameter and Riskpenalty captures drawdown and volatility concerns.
  • The strategy trades only highly liquid, large‑cap energy stocks to ensure stable performance. market
    Source sentence
    It targets highly liquid, large-cap energy stocks to ensure stable and predictable performance while also considering broker payments.
  • A three‑year warm‑up period provides sufficient historical data for model training before live predictions. data
    Source sentence
    The system, which predicts future price movements, includes a three-year warm-up to ensure proper algorithm function.
Show 1 more
  • QuantConnect data is sufficient for training despite occasional missing market scenarios. data
    Source sentence
    QuantConnect has limitations, such as data availability, which might lead to missing market scenarios required for training deep learning models.

Data

Backtest sample: 2019 – 2022 · large-cap energy stocks · equities · daily

  • QuantConnect market data for large‑cap energy stocks · QuantConnect market-prices public
    2019-01 to 2022-01 · highly liquid, large‑cap energy stocks
    Source sentence
    It targets highly liquid, large-cap energy stocks to ensure stable and predictable performance while also considering broker payments.
  • Backtesting results (CAGR, Sharpe, etc.) synthetic unknown
    January 2019 to January 2022
    Source sentence
    Performance metrics cover the full backtesting period from January 2019 to January 2022, encompassing the COVID-19 market volatility.

Costs

Unclear The classifier was not confident.

Finds 5

Reported performance (Dual-model HMM and neural network with Black-Litterman): Sharpe 0.77 · annual return 22.2% · total return 82.8% · max drawdown 17.1%

  • The dual‑model system achieved an 83% total return (82.76%) over the COVID period with a Sharpe ratio of 0.77. performance
    Source sentence
    During the COVID period (2019–2022), the dual-model system achieved an 83% return and a Sharpe ratio of 0.77
  • Compounded Annual Growth Rate (CAGR) was 22.2% during the backtest. performance
    Source sentence
    Compounded Annual Growth Rate (CAGR) 22.2%
  • Maximum drawdown was 17.1% and portfolio turnover was low at 3.29%, indicating a conservative trading approach. performance
    Source sentence
    Maximum Drawdown 17.1% Portfolio Turnover 3.29%
  • The strategy executed only 40 total orders with a win rate of 60% and a profit‑loss ratio of 2.34. performance
    Source sentence
    Total Orders Executed 40 Win Rate 60% Loss Rate 40%
  • Risk‑adjusted metrics such as Sortino (0.6) and Information Ratio (−0.1) were modest, reflecting limited upside relative to risk. performance
    Source sentence
    Sortino Ratio 0.6 Information Ratio −0.1

Checked by others

No other paper in the archive has been found to support or contradict these findings (compared with 22 related papers). Coverage is partial, so this is neither replication nor refutation.

Extracted 2026-11-14 · same card as JSON · A language model chose these items: check the source sentence before relying on one.

Cited References (28)

  1. Unleashing the algorithmic frontier: Navigating the impact of algo trading on investor portfolios (2023) — link
  2. Algorithmic Trading and AI : A Review of Strategies and Market Impact (2024) — link
  3. Detecting bearish and bullish markets in financial time series using hierarchical hidden Markov models (2020) — link
  4. Neural Networks (2022) — link
  5. Robust machine learning models: linear and nonlinear (2024) — link
  6. Pairwise Markov models for stock index forecasting (2017) — link
  7. A Comprehensive Overview and Comparative Analysis on Deep Learning Models: CNN , RNN , LSTM , GRU (2023) — link
  8. Explainable Artificial Intelligence based Ensemble Machine Learning for Ovarian Cancer Stratification using Electronic Health Records (2023) — link
and 20 more
  1. An Experimental Review on Deep Learning Architectures for Time Series Forecasting (2021) — link
  2. An Empirical Study of Ensemble Techniques (Bagging, Boosting and Stacking) (2019) — link
  3. Detecting bearish and bullish markets in financial time series using hierarchical hidden Markov models (2021) — link
  4. Time series classification: nearest neighbor versus deep learning models (2020) — link
  5. Multi-layer cooperative combined forecasting system for short-term wind speed forecasting (2021) — link
  6. Integration for degradation analysis with multi-source ADT datasets considering dataset discrepancies and epistemic uncertainties (2022) — link
  7. Algorithmic Trading and AI : A Review of Strategies and Market Impact (2024) — link
  8. Evaluating the Performance of Diverse Machine Learning Approaches in Stock Market Forecasting (2023) — link
  9. Using a service oriented architecture for simulating algorithmic trading strategies (2010) — link
  10. Overview - QuantConnect.com (2024) — link
  11. How Corporations Can Win the Race Against Disruptive Startups (2017) — link
  12. The Effect of Market Liquidity on the Company Value (2018) — link
  13. The Black-Litterman Model: Extensions and Asset Allocation (2019) — link
  14. Black-Litterman Model and Momentum Strategy: Evidence of Taiwan Top 50 ETF (2020) — link
  15. Hidden Markov Models for Pattern Recognition (2023) — link
  16. Artificial Neural Networks: An Overview (2023) — link
  17. Distillation Column Temperature Prediction Based on Machine-Learning Model Using Wavelet Transform (2022) — link
  18. Extrapolated High-Order Propagators for Path Integral Monte Carlo Simulations (2009) — link
  19. I Choose You: Automated Hyperparameter Tuning for Deep Learning-Based Side-Channel Analysis (2024) — link
  20. Malay Language Speech Recogniser with Hybrid Hidden Markov Model and Artificial Neural Network ( HMM/ANN ) (2011) — link

0 of 28 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2596 linked papers.