Learning who is in the market from time series: market participant discovery through adversarial calibration of multi-agent simulators

Victor Storchan,Svitlana Vyetrenko,Tucker Balch
DOI: https://doi.org/10.48550/arXiv.2108.00664
2021-08-02
Abstract:In electronic trading markets often only the price or volume time series, that result from interaction of multiple market participants, are directly observable. In order to test trading strategies before deploying them to real-time trading, multi-agent market environments calibrated so that the time series that result from interaction of simulated agents resemble historical are often used. To ensure adequate testing, one must test trading strategies in a variety of market scenarios -- which includes both scenarios that represent ordinary market days as well as stressed markets (most recently observed due to the beginning of COVID pandemic). In this paper, we address the problem of multi-agent simulator parameter calibration to allow simulator capture characteristics of different market regimes. We propose a novel two-step method to train a discriminator that is able to distinguish between "real" and "fake" price and volume time series as a part of GAN with self-attention, and then utilize it within an optimization framework to tune parameters of a simulator model with known agent archetypes to represent a market scenario. We conclude with experimental results that demonstrate effectiveness of our method.
Machine Learning,Multiagent Systems,Trading and Market Microstructure
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to simulate the behaviors of different market participants through time - series data (such as price and trading volume) in the electronic trading market, and ensure that these simulations can accurately reflect historical market scenarios. Specifically, researchers are concerned with how to calibrate the parameters of the multi - agent market simulator so that the generated time - series are as similar as possible to historical data, thereby providing diverse market scenarios for testing trading strategies, including ordinary market days and stressed markets (such as market fluctuations at the beginning of the COVID - 19 pandemic in 2020). This helps to more comprehensively evaluate the performance of trading strategies under different market dynamics and ensure the effectiveness of risk management and strategy optimization. ### Research Background In the electronic trading market, usually only the price or trading volume time - series generated by the interaction of multiple market participants can be directly observed. In order to test trading strategies before deployment, researchers often use calibrated multi - agent market environments to make the interaction results among simulated agents similar to historical time - series. However, to ensure sufficient testing, trading strategies must be tested under various market scenarios, including ordinary market days and stressed market scenarios. ### Solution This paper proposes a new two - step method, MAS - GAN, for parameter calibration of multi - agent market simulators. The specific steps are as follows: 1. **Train the Discriminator**: Use the generator in the Generative Adversarial Network (GAN) and the discriminator with a self - attention mechanism to train a discriminator that can distinguish between "real" and "fake" price and trading volume time - series. - Both the generator and the discriminator are enhanced with self - attention layers to improve the quality of time - series resolution. - The output of the discriminator uses the sigmoid activation function and can be interpreted as the probability that the synthetic time - series is real. 2. **Optimize Simulator Parameters**: Use the trained discriminator as an implicit optimization objective function to adjust the parameters of the simulator model so that the simulated time - series are as close as possible to the real historical data. ### Mathematical Formula Let \( S_R(v) \) represent the simulated mid - price time - series generated using the parameter vector \( v \) and the random seed \( R \). The discriminator \( D \) outputs the probability that the time - series \( S_R(v) \) is real. Our goal is to find the parameter vector \( v^*\) that maximizes this probability: \[ v^*=\arg\max_v \mathbb{E}_R[D(S_R(v))] \] where \( \mathbb{E}_R \) represents the expectation over the random seed \( R \). ### Experimental Results The experimental results show that the MAS - GAN method can effectively identify and calibrate simulator parameters so that the generated time - series are highly similar to historical data. In particular, this method performs well in market scenarios with different liquidity configurations, verifying its potential in practical applications. ### Conclusion The MAS - GAN method proposed in this paper provides a novel and effective method for parameter calibration of multi - agent market simulators, can accurately simulate market behaviors in multiple market scenarios, and provides strong support for trading strategy testing and risk management.