IDEAS home Printed from https://ideas.repec.org/a/taf/oaefxx/v13y2025i1p2490818.html

Reinforcement learning meets technical analysis: combining moving average rules for optimal alpha

Author

Listed:
  • Javier H. Ospina-Holguín
  • Ana M. Padilla-Ospina

Abstract

A common issue faced by investors who use technical analysis is the reconciliation of conflicting trading signals, especially when these signals are highly correlated, such as those generated by multiple moving averages. This study expands on a model-free algorithm inspired by reinforcement learning to address the challenge of reconciling trading signals while taking transaction costs into account. The algorithm is trained to optimize alpha, a widely used measure of risk-adjusted return. Principal component analysis is utilized to reduce the dimensionality of a modified version of moving average signals, which are then used to define the input state. A policy network, represented by a feedforward neural network, is trained using historical data to convert states into trading actions. An evaluation network calculates and optimizes alpha by adjusting the policy network’s parameters. The algorithm utilizes a zero-arbitrage portfolio to accurately isolate alpha from the underlying asset’s return. By combining 199 simple moving average signals in a systematic manner, the algorithm was able to maximize the q5 asset pricing model alpha using a high-volatility United States stock portfolio as a risky asset. The algorithm demonstrates superior performance compared to both individual moving average signals and existing combination algorithms.This study significantly advances market‑timing strategies by introducing a reinforcement‑learning‑inspired algorithm that reconciles highly correlated yet conflicting trading signals—such as simple moving averages—to maximize alpha while explicitly accounting for transaction costs. At its core is a policy network, implemented as a feedforward neural network, trained simultaneously across all in‑sample time slices via a complementary evaluation network. The original trading signals are first transformed to achieve mean‑stationarity, then standardized and compressed with principal component analysis to reduce dimensionality and information redundancy. Algorithmic returns are rigorously isolated from underlying asset returns through a zero‑arbitrage portfolio framework. Because the method is model‑free, it avoids reliance on predefined return models or specific functional forms for the trading signals. The algorithm can also be readily extended to other asset‑pricing models and to similar technical—or non‑technical—signals. This comprehensive, adaptive, and principled approach equips investors with a robust tool for enhanced decision‑making in dynamic financial environments.

Suggested Citation

  • Javier H. Ospina-Holguín & Ana M. Padilla-Ospina, 2025. "Reinforcement learning meets technical analysis: combining moving average rules for optimal alpha," Cogent Economics & Finance, Taylor & Francis Journals, vol. 13(1), pages 2490818-249, December.
  • Handle: RePEc:taf:oaefxx:v:13:y:2025:i:1:p:2490818
    DOI: 10.1080/23322039.2025.2490818
    as

    Download full text from publisher

    File URL: http://hdl.handle.net/10.1080/23322039.2025.2490818
    Download Restriction: Access to full text is restricted to subscribers.

    File URL: https://libkey.io/10.1080/23322039.2025.2490818?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to

    for a different version of it.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:taf:oaefxx:v:13:y:2025:i:1:p:2490818. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Chris Longhurst (email available below). General contact details of provider: http://www.tandfonline.com/OAEF20 .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.