Once Burned, Twice Shy? The Effect of Stock Market Bubbles on Traders that Learn by Experience

Haibei Zhu, Svitlana Vyetrenko, Serafin Grundl, David Byrd, Kshama Dwarakanath, Tucker Balch · DOI

Abstract

Financial bubbles represent significant deviations from asset intrinsic values and pose risks to economic stability. This study investigates how exposure to such bubbles influences the behavior of Reinforcement Learning (RL) trading agents. Using high-fidelity multi-agent simulations, we demonstrate that while naive agents adopt bubble-amplifying momentum strategies, agents with experience of market crashes evolve into value-oriented traders. These experienced agents not only achieve higher long-term profitability but also act as a stabilizing force, actively suppressing the magnitude and duration of bubbles.

Introduction

Financial bubbles—periods where asset prices deviate wildly from their intrinsic value—are destructive to economic systems. While the mechanics of bubble formation and collapse are well-documented, the impact of "market memory"—how past experiences influence future trading behavior—remains less understood. Isolating these psychological and behavioral shifts in human markets is challenging due to confounding variables like shifting regulations. This research utilizes a high-fidelity multi-agent simulation to precisely measure how varying degrees of bubble experience alter the "trading DNA" of artificial intelligence agents.

Methodology

The study employs the Agent-Based Interactive Discrete Event Simulation (ABIDES) platform, which replicates real-world exchange mechanics such as the NASDAQ.

Market Environment

The simulation incorporates a mix of rule-based agents (Value, Noise, Momentum, and Herding) to establish a baseline market. Bubbles are intentionally triggered by Herding agents, while "bursts" are simulated via regulatory time constraints. Asset "fundamental values" are generated using an Ornstein-Uhlenbeck (O-U) process to create a mean-reverting intrinsic price target.

Visualization of a simulated market bubble, showing executed prices deviating from fundamental values and the eventual burst triggered by regulatory constraints.

Agent Training

Trading agents were developed using the Proximal Policy Optimization (PPO) reinforcement learning algorithm. Agents observed nine market features, including current holdings, order book imbalance, price volatility, and momentum across multiple time horizons (5 to 180 minutes). To test the impact of experience, five distinct agents were trained with varying "doses" of bubble exposure: 0%, 25%, 50%, 75%, and 100% of training scenarios.

Key Insights: From Momentum to Value

Analysis of the trained agents revealed a stark behavioral shift based on experience.

  • The Momentum Trap: RL agents with zero bubble experience (naive agents) naturally gravitated toward momentum trading. By buying into rising prices to capture short-term gains, these agents inadvertently amplified bubble formation.
  • Evolution into Value Traders: Agents trained with high bubble exposure (100%) learned that momentum strategies are inherently risky during crashes. These agents evolved into value traders, recognizing when prices deviated significantly from the fundamental value and selling into the bubble to lock in profits before the crash.
  • Feature Importance: SHAP (SHapley Additive exPlanations) analysis indicated that experienced agents rely more on long-term momentum (120-180 min) and order book imbalance, whereas naive agents react primarily to short-term price spikes.

Results

The experimental results demonstrate that experience significantly enhances both individual performance and market stability.

Comparison of profit distributions and bubble occurrence frequencies across agents with different levels of bubble experience.
  • Profitability: The 100% experienced agent achieved an average profit of 98.8% of starting cash, more than double the 44.6% achieved by the naive agent.
  • Market Stabilization: Experienced agents acted as a stabilizing force. Their presence significantly reduced the overall bubble count. When bubbles did occur, their magnitude was reduced by approximately 20% (from 7936.2 to 6366.2) and their duration decreased by roughly 25% (from 4084s to 3029s).
  • Statistical Significance: Kruskal-Wallis tests confirmed that the level of bubble experience had a statistically significant impact (p < 0.001) on all measured metrics.

Discussion and Future Work

While these results are promising, several limitations remain. The current RL agents trade fixed quantities; future iterations will allow for variable "bet sizes" based on agent confidence. Additionally, while regulatory constraints currently trigger bubble bursts, future work will explore "organic" bursts caused by liquidity shortages. Finally, while ABIDES is a high-fidelity simulator, future research will aim to calibrate these models against historical market data to better bridge the gap between simulation and real-world dynamics. Understanding how "memory decay" might lead to the cyclical nature of real-world boom-and-bust cycles remains a key area for investigation.

Summary updated

BibTeX
@inproceedings{zhu2023once,
  author = {Haibei Zhu and Svitlana Vyetrenko and Serafin Grundl and David Byrd and Kshama Dwarakanath and Tucker Balch},
  title = {{Once Burned, Twice Shy? The Effect of Stock Market Bubbles on Traders that Learn by Experience}},
  booktitle = {WSC},
  year = {2023},
  doi = {10.1109/wsc60868.2023.10408617},
}
Figure