Table of Contents
Fetching ...

Bayesian Robust Financial Trading with Adversarial Synthetic Market Data

Haochong Xia, Simin Li, Ruixiao Xu, Zhixia Zhang, Hongxiang Wang, Zhiqian Liu, Teng Yao Long, Molei Qin, Chuqiao Zong, Bo An

TL;DR

This work tackles the robustness gap in algorithmic trading under regime shifts driven by macroeconomics by integrating macro-conditioned data generation with a Bayesian adversarial training framework. It models trading as a two-player zero-sum Bayesian Markov game, where an adversary perturbs macro indicators while the trader maintains a belief over hidden market states and learns a robust policy via Bayesian neural fictitious self-play, achieving a Robust Perfect Bayesian Equilibrium. A macro-conditioned TimeGAN-inspired generator produces diverse, realistic market trajectories conditioned on macro indicators, while a Quantile Belief Network captures uncertain market states to inform decision-making. Empirical results across nine ETFs show the proposed method outperforms nine baselines in profitability and risk management, including during extreme events like the COVID-19 shock, and data realism analyses confirm superior fidelity of generated sequences. The approach offers a scalable, macro-aware solution for trading under uncertain and shifting market dynamics, with practical implications for stress testing and risk-aware deployment.

Abstract

Algorithmic trading relies on machine learning models to make trading decisions. Despite strong in-sample performance, these models often degrade when confronted with evolving real-world market regimes, which can shift dramatically due to macroeconomic changes-e.g., monetary policy updates or unanticipated fluctuations in participant behavior. We identify two challenges that perpetuate this mismatch: (1) insufficient robustness in existing policy against uncertainties in high-level market fluctuations, and (2) the absence of a realistic and diverse simulation environment for training, leading to policy overfitting. To address these issues, we propose a Bayesian Robust Framework that systematically integrates a macro-conditioned generative model with robust policy learning. On the data side, to generate realistic and diverse data, we propose a macro-conditioned GAN-based generator that leverages macroeconomic indicators as primary control variables, synthesizing data with faithful temporal, cross-instrument, and macro correlations. On the policy side, to learn robust policy against market fluctuations, we cast the trading process as a two-player zero-sum Bayesian Markov game, wherein an adversarial agent simulates shifting regimes by perturbing macroeconomic indicators in the macro-conditioned generator, while the trading agent-guided by a quantile belief network-maintains and updates its belief over hidden market states. The trading agent seeks a Robust Perfect Bayesian Equilibrium via Bayesian neural fictitious self-play, stabilizing learning under adversarial market perturbations. Extensive experiments on 9 financial instruments demonstrate that our framework outperforms 9 state-of-the-art baselines. In extreme events like the COVID, our method shows improved profitability and risk management, offering a reliable solution for trading under uncertain and shifting market dynamics.

Bayesian Robust Financial Trading with Adversarial Synthetic Market Data

TL;DR

This work tackles the robustness gap in algorithmic trading under regime shifts driven by macroeconomics by integrating macro-conditioned data generation with a Bayesian adversarial training framework. It models trading as a two-player zero-sum Bayesian Markov game, where an adversary perturbs macro indicators while the trader maintains a belief over hidden market states and learns a robust policy via Bayesian neural fictitious self-play, achieving a Robust Perfect Bayesian Equilibrium. A macro-conditioned TimeGAN-inspired generator produces diverse, realistic market trajectories conditioned on macro indicators, while a Quantile Belief Network captures uncertain market states to inform decision-making. Empirical results across nine ETFs show the proposed method outperforms nine baselines in profitability and risk management, including during extreme events like the COVID-19 shock, and data realism analyses confirm superior fidelity of generated sequences. The approach offers a scalable, macro-aware solution for trading under uncertain and shifting market dynamics, with practical implications for stress testing and risk-aware deployment.

Abstract

Algorithmic trading relies on machine learning models to make trading decisions. Despite strong in-sample performance, these models often degrade when confronted with evolving real-world market regimes, which can shift dramatically due to macroeconomic changes-e.g., monetary policy updates or unanticipated fluctuations in participant behavior. We identify two challenges that perpetuate this mismatch: (1) insufficient robustness in existing policy against uncertainties in high-level market fluctuations, and (2) the absence of a realistic and diverse simulation environment for training, leading to policy overfitting. To address these issues, we propose a Bayesian Robust Framework that systematically integrates a macro-conditioned generative model with robust policy learning. On the data side, to generate realistic and diverse data, we propose a macro-conditioned GAN-based generator that leverages macroeconomic indicators as primary control variables, synthesizing data with faithful temporal, cross-instrument, and macro correlations. On the policy side, to learn robust policy against market fluctuations, we cast the trading process as a two-player zero-sum Bayesian Markov game, wherein an adversarial agent simulates shifting regimes by perturbing macroeconomic indicators in the macro-conditioned generator, while the trading agent-guided by a quantile belief network-maintains and updates its belief over hidden market states. The trading agent seeks a Robust Perfect Bayesian Equilibrium via Bayesian neural fictitious self-play, stabilizing learning under adversarial market perturbations. Extensive experiments on 9 financial instruments demonstrate that our framework outperforms 9 state-of-the-art baselines. In extreme events like the COVID, our method shows improved profitability and risk management, offering a reliable solution for trading under uncertain and shifting market dynamics.
Paper Structure (41 sections, 19 equations, 4 figures, 6 tables, 5 algorithms)

This paper contains 41 sections, 19 equations, 4 figures, 6 tables, 5 algorithms.

Figures (4)

  • Figure 1: State representation (x-axis) and reward (y-axis) reduced to one dimension via t-SNE (Algorithm \ref{['alg:tsnegeneration']} in Appendix G). The shift in distribution between training (blue points) and testing (orange points) highlights the out-of-distribution issue during testing.
  • Figure 2: Overall architecture of our framework. An adversarial agent and a pre‐trained generator jointly form an adversarial environment, while a trading agent is trained on observations augmented by this environment.
  • Figure 3: Overall architecture of the data generator. The encoder, decoder, and forecaster are pre-trained (marked with gear icons). The blue routes are only for training, while the red routes are for both training and inference.
  • Figure 4: Comparison of trading actions (top) and cumulative returns (bottom) for our method, RARL, and DQN on DBB from 2021 to 2024. Our method adapts to both high-volatility pandemic phase (between the blue lines) and calmer phases (otherwise).