Enhancing Financial Algorithms for Pairs Trading using Reinforcement Learning
Constrained Portfolio Optimization
C. Petre-Luca (TU Delft - Electrical Engineering, Mathematics and Computer Science)
F. Yu – Mentor (TU Delft - Electrical Engineering, Mathematics and Computer Science)
F.A. Oliehoek – Mentor (TU Delft - Electrical Engineering, Mathematics and Computer Science)
N. Yorke-Smith – Graduation committee member (TU Delft - Electrical Engineering, Mathematics and Computer Science)
More Info
expand_more
Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.
Abstract
Pairs trading exploits the mean reversion of a cointegrated spread of two stocks, classically traded with fixed z-score rules. We recast it as a continuous portfolio-optimisation problem and train reinforcement-learning (PPO) agents to size the two legs and a risk-free asset, comparing a constrained agent forced into the market-neutral hedge against a free agent that weights the legs independently. Agents are trained on a generative market model calibrated to each real pair, and evaluated out of sample, with and without transaction costs, against the classical z-rule. The constrained agent learns the spread’s direction but does not beat the z-rule: it over-trades when no arbitrage is available instead of stepping aside. The free agent earns higher but far more variable returns, mixing directional market exposure with some genuine arbitrage. Transaction costs push both toward smoother, more conservative policies. We outline a potential improvement to the constrained agent to leverage its sizing capabilities in a future work.