Source-linked AI summary

TwinMarket: A Scalable Behavioral and Social Simulation for Financial Markets

Yuzhe Yang, Yifei Zhang, Minghao Wu, Kaidi Zhang, Yunmiao Zhang, Honghai Yu, Yan Hu, Benyou Wang

arXiv:2502.01506v5cs.CEcs.CY

TL;DR

Traditional agent-based models have limited ability to represent heterogeneous, adaptive decision-making and the link between individual behavior and emergent market dynamics. TwinMarket uses LLM-driven investors, BDI-structured cognition, and social interaction in a stock-market simulation, finding that cognitive reasoning, strategic diversity, and large-scale interactions support realistic emergent market behavior.

  • Problem

    Rule-based ABMs often oversimplify human decision-making and struggle to capture how individual biases, interactions, and information asymmetries aggregate into systemic market phenomena.

  • Method

    TwinMarket simulates investors as LLM agents using BDI-structured cognition, dynamic social interactions, and a scalable stock-market environment.

  • Results

    TwinMarket reproduces behavior and market patterns consistent with real-world financial and social dynamics, while BDI reasoning and agent heterogeneity are essential for generating realistic market complexity.

  • Takeaways & Limitations

    BDI-structured LLM agents can achieve higher behavioral fidelity than traditional models and generate high-fidelity synthetic data for training and evaluating downstream models.

  • Takeaways & Limitations

    The current study focuses on China’s A-share market and uses simplified mechanics, including a single daily call auction and a zero-sum environment.

Abstract

from arXiv · show

The study of social emergence has long been a central focus in social science. Traditional modeling approaches, such as rule-based Agent-Based Models (ABMs), struggle to capture the diversity and complexity of human behavior, particularly the irrational factors emphasized in behavioral economics. Recently, large language model (LLM) agents have gained traction as simulation tools for modeling human behavior in social science and role-playing applications. Studies suggest that LLMs can account for cognitive biases, emotional fluctuations, and other non-rational influences, enabling more realistic simulations of socio-economic dynamics. In this work, we introduce TwinMarket, a novel multi-agent framework that leverages LLMs to simulate socio-economic systems. Specifically, we examine how individual behaviors, through interactions and feedback mechanisms, give rise to collective dynamics and emergent phenomena. Through experiments in a simulated stock market environment, we demonstrate how individual actions can trigger group behaviors, leading to emergent outcomes such as financial bubbles and recessions. Our approach provides valuable insights into the complex interplay between individual decision-making and collective socio-economic patterns.

1. Introduction

TwinMarket addresses the difficulty of modeling diverse, adaptive human behavior and its aggregation into emergent market dynamics by combining LLM agents, cognitive structure, and social interaction. The framework is designed to study how individual decisions and information exchange produce collective phenomena in scalable financial-market simulations.

  • Motivation: Financial markets expose how micro-level behaviors propagate into macro-level dynamics, but rule-based ABMs often oversimplify agents through homogeneous assumptions and static behavioral rules.These limitations can obscure causal links between individual decisions and systemic emergence.
  • Framework: TwinMarket’s environment gives each user a unique persona, supports real-time interaction, and lets actions influence the simulated social network and environment.This design supports the study of emergent social phenomena.
  • Framework: TwinMarket uses LLM-driven investors who make independent decisions while interacting through a simulated social media platform.The framework connects private information, social interaction, and adaptive decision-making within a stock-market environment.
  • Framework: The framework uses the Belief-Desire-Intention framework to structure and visualize agents’ cognitive processes, supporting transparent and interpretable behavioral modeling.It also enables dynamic information exchange, social influence, opinion-leader emergence, and information cascades.
  • Contributions: The framework is grounded in behavioral theories and calibrated with real-world data to reproduce selected social phenomena and investigate their mechanisms.It combines real-world alignment, dynamic interaction modeling, and scalable market simulation as core contributions.
  • Framework: TwinMarket models how opinions spread, influence decisions, and dynamically shape collective market behavior through LLM-based interaction.Its contribution centers on capturing diverse human behaviors and their interactions in real time.

2. Background

Existing financial agent systems seek to represent complex economic and social behavior, but traditional ABMs face challenges in customizing sophisticated individual decisions and enabling responsive environmental interaction. TwinMarket positions LLMs and theoretical frameworks as a way to model micro-level cognition and its macro-level societal effects.

  • Agent-Based Models: Traditional ABMs struggle to customize sophisticated economic decision-making for individual agents and to let agents actively perceive and respond to environmental changes.These are identified as two major challenges in simulating complex social systems.
  • LLMs for Behavioral Simulation: TwinMarket integrates LLMs with established theoretical frameworks to systematically model micro-level cognitive processes and their macro-level societal effects.The resulting platform is intended to study how individual decisions aggregate into emergent social and economic phenomena.

3. TwinMarket

TwinMarket combines LLM-based BDI user modeling with dynamic social and trading infrastructures to simulate how individualized decisions and interactions produce market-level dynamics.

  • Overall Design of TwinMarket: TwinMarket simulates an order-driven trading system and a social media environment that personalizes information delivery and enables agent interaction.The trading system settles transactions and updates the stock index, while the social environment supports behavior-based information exposure.
  • Overall Design of TwinMarket: The platform uses real-world transactions, user profiles, stock data, news, and company announcements to construct a data-driven simulation environment.Synthetic user profiles are sampled from behavioral patterns observed in real users.
  • Micro-Level Simulation: BDI-driven User Modeling: TwinMarket models user behavior through a BDI-driven daily loop in which agents process information, make trading decisions, and interact socially.Agents update beliefs from actions and environmental feedback, while desires guide information retrieval and intentions drive trading and posting decisions.
  • Macro-Level Simulation: Dynamic Social Network: Its dynamic social network connects users according to similarity in trading behavior, using time-weighted activity and weighted Jaccard similarity.Chord thickness represents trading similarity between groups, while colors indicate groups with similar industry preferences.
  • Macro-Level Simulation: Dynamic Social Network: Personalized information exposure ranks posts from qualified neighbors by a hot score and recommends the top k posts daily.The scoring mechanism uses time decay so a post’s influence typically lasts around two weeks before substantially diminishing.

4. Experimental Validation

TwinMarket is validated against behavioral and financial regularities using a five-month simulation with 100 GPT-4o agents. The results reproduce inequality patterns, investor-performance differences, and four stylized market facts observed in real data.

  • Experimental Setup: A five-month simulation with 100 GPT-4o agents evaluates TwinMarket against real-world financial and behavioral data at micro and macro levels.The simulation begins on 2023-06-15 and is used for realism and reliability validation.
  • Micro-level Validation: TwinMarket generates rising wealth inequality, with increasing wealth concentration among the top 10% and declining wealth share for the bottom 50%.The authors attribute this divergence to heterogeneity and interactions among agents.
  • Micro-level Validation: The top 10% achieve a 6.65% average return with 4.02% turnover, whereas the bottom 50% have 7.03% turnover and a -10.52% average return.The pattern is consistent with higher trading frequency being associated with poorer retail-investor performance.
  • Macro-level Validation: TwinMarket reproduces fat-tailed price changes, with large surges and plunges occurring more often than a normal distribution predicts.Heterogeneous agent sentiments and their propagation contribute to the simulated heavy tails.
  • Macro-level Validation: Initial price drops provoke larger subsequent drops, capturing the leverage effect and amplifying market volatility.The authors connect this asymmetry to loss aversion in BDI agents and the spread of negative sentiment through social media.
  • Macro-level Validation: Trading volume increases co-move with larger price fluctuations, reproducing the volume-return relationship associated with collective behavior such as herding.This relationship is evaluated using volume change and log return.
  • Macro-level Validation: TwinMarket reproduces volatility clustering, with periods of large price swings and periods of small swings occurring in groups over time.The simulated and real volatility series both show alternating high- and low-turbulence periods.
  • Macro-level Validation: The framework is compared with the HPM and BH agent-based models using four stylized facts as realism benchmarks.The comparison includes kurtosis, negative return autocorrelation, volume-return correlation, and GARCH volatility clustering.

5. Emergence Analysis

TwinMarket models how belief updates, social influence, and information propagation produce collective market dynamics. The experiments show that optimism can amplify buying, while rumors drive pessimism, selling, polarization, and downturns.

  • Self-Fulfilling Prophecy: Early optimism amplifies buying pressure as agents revise beliefs and make trades that shape market dynamics.The paper frames this as a self-fulfilling prophecy linking localized belief updates to systemic outcomes.
  • Influence and Polarization: High-degree users receive more upvotes and act as opinion leaders, fostering behavioral homogeneity and polarization.Behavioral-similarity edges and denser adjacency-matrix regions identify clusters of similar trading behavior.
  • Belief Divergence: Rumor exposure lowers user expectations, with affected agents assigning asset valuations 27.5% lower than baseline agents.The paper reports that negative rumors reinforce echo-chamber dynamics and increase belief divergence.
  • Trading Volatility: The sell-to-buy ratio rises from 0.495 to 0.997 under rumor exposure, reflecting a shift from buying to selling.The paper links the change to panic-driven responses to uncertainty and amplified trading volatility.
  • Market Turbulence: Rumor-exposed markets experience pronounced price declines, whereas prices remain stable in the control setting.The paper attributes the downturn to belief erosion, reactive trading, overreaction, and herding under uncertainty.

6. Ablation Study

The ablation study finds that both cognitive reasoning through BDI and heterogeneous agent strategies are important for predictive accuracy and financial realism. Removing either component degrades model performance, while removing heterogeneity sharply reduces emergent market realism.

  • Ablation Setup: Removing either BDI or agent heterogeneity degrades predictive accuracy and financial realism across the reported metrics.The comparison covers RMSE, MAE, correlation, kurtosis, leverage effect, and GARCH parameters.
  • BDI Ablation: Removing BDI weakens the model’s ability to generate stylized facts such as fat tails and asymmetric volatility.The BDI-free variant makes agents purely reactive.
  • Heterogeneity Ablation: Removing heterogeneity causes a sharper collapse in realism, producing near-Gaussian returns and negative correlation.The variant assigns agents uniform strategies and biases.
  • Overall Finding: Together, the ablations identify BDI and strategic diversity as essential components for replicating real-world market dynamics.The conclusion follows from the distinct degradation patterns observed when each component is removed.

7. Scalability

TwinMarket’s predictive performance improves as more agents actively trade, while simulations remain behaviorally realistic and computationally tractable at 1,000 agents. The results support a scaling relationship between participation and model fidelity.

  • Large-Scale Simulation: Simulations with 1,000 LLM-based agents produce realistic market fluctuations and collective behavior.The result is presented as further evidence that the framework operates at larger population sizes.
  • Performance Scaling: Higher agent activation increases trading volume and monotonically reduces RMSE and MAE, indicating improved model fidelity.The paper describes this as a robust scaling relationship between market participation and predictive performance.
  • Large-Scale Simulation: At 1,000 agents over extended temporal horizons, TwinMarket maintains behavioral realism and computational tractability.The paper connects this result to macro-level phenomena exhibiting statistical regularities of empirical financial systems.

8. Conclusion and Future Work

The paper presents TwinMarket as an LLM-driven framework for studying social emergence and modeling investor behavior. It reports behavioral fidelity and synthetic-data applications, while identifying the China A-share setting and simplified market mechanics as limitations for future extension.

  • Scalability: The scaling results include a 1,000-agent simulation, supporting the framework’s study of larger populations.The figure materials describe the simulation result for 1,000 agents.
  • Conclusion: TwinMarket uses LLM-driven agents to simulate investor behavior and study how individual actions produce social emergence.The paper states that the framework can model real-world behaviors and reveal mechanisms of social emergence.
  • Implications: The framework offers higher behavioral fidelity than traditional models and can generate synthetic data for training and evaluating downstream models.The stated downstream examples include reinforcement learning agents.
  • Limitations and Future Work: The current study focuses on the China A-share market and uses simplified mechanics, including a single daily call auction and zero-sum environment.Future work proposes diverse market structures and more complex continuous trading mechanisms.

Ethics Statement

The study reports ethical data practices and limits the simulation to academic use rather than real-world trading or financial decisions.

  • All study data were acquired through lawful and ethical means under the Fair Use principle.
  • No personally identifiable information was used, and all data were anonymized before analysis.
  • The simulation results and models are intended strictly for academic use, not real-world trading or financial decision-making.

B.1 Social Network Sensitive Analysis

Sensitivity and ablation studies assess TwinMarket’s robustness across network parameters, LLM temperature, industries, social interaction, and BDI components. The results indicate stable core decisions, differentiated sector dynamics, and important contributions from social interaction and cognitive adaptation.

  • Social-network sensitivity: A similarity threshold of 0.2 and decay factor of 0.5 maintain moderate connectivity and avoid over-saturation, supporting meaningful information propagation.Higher parameter values generally produce sparser, less modular, and less clustered graphs, while the largest connected component remains stable.
  • LLM-temperature ablation: Core trading decisions remain stable across LLM temperatures, while average transaction volume generally increases as temperature rises.The study interprets higher temperatures as encouraging more diverse reasoning and larger perceived decision scale.
  • Industry ablation: TwinMarket generates differentiated sector dynamics, including a more volatile, fat-tailed technology sector and a stabler consumer-goods sector.These differences align with common real-world observations and support multi-asset simulations with sector-specific behavior.
  • Social-interaction ablation: Removing real-time social interactions significantly degrades performance, indicating that simulated agents are heavily influenced by social interactions and emergent group dynamics.The comparison used full TwinMarket and a social-interaction-disabled variant over the same period.
  • BDI-component ablation: Removing either belief updating or desire-driven information seeking significantly reduces predictive accuracy.The ablations show the importance of dynamic adaptation and goal-driven information seeking for capturing market realism.

B.3 Reproducibility and Stability Validation

Repeated simulations with different LLM backbones evaluate TwinMarket’s reproducibility and stability. Across runs, the framework maintains correspondence with historical prices and consistently reproduces key financial stylized facts and emergent opinion leadership.

  • Reproducibility and stability: Across multiple runs and LLM backbones, low RMSE and MAE indicate strong correspondence between simulated and historical price movements.The evaluation used three iterations for each model over June 15 to August 15, 2023.
  • Reproducibility and stability: Fat-tailed returns, volatility clustering, and the leverage effect emerge reliably across all simulation runs and both LLM backbones.Volatility clustering is identified through positive GARCH parameters with their sum close to 1.
  • Reproducibility and stability: The qualitative presence of stylized facts remains stable despite variability in specific parameters across runs and models.The study attributes parameter variability to stochasticity in complex financial systems and LLM generation.
  • Emergent opinion leadership: High-degree users receive greater engagement and broader diffusion, while a small subset accumulates substantially higher repost counts as opinion leaders.The information-diffusion figures depict post-propagation paths and repost-count trends in the 100-user network.

B.5.1. Demonstration of Investment Analysis Approaches

TwinMarket agents demonstrate both structured investment analysis and behavioral tendencies in trading decisions. Their examples include fundamental and technical reasoning alongside disposition effect, lottery preference, underdiversification, overconfidence, and herd behavior.

  • Investment analysis approaches: Agents use fundamental analysis by considering valuation, long-term outlook, and national strategy when adjusting positions.One example increases a technology-sector allocation after considering a low PE ratio and positive long-term prospects.
  • Investment analysis approaches: Agents use technical analysis by evaluating volume-price action, moving averages, momentum, and stop-loss levels.One example considers increasing a technology-sector allocation after stocks break through their five-day moving averages.
  • Behavioral biases: Qualitative examples exhibit disposition effect, lottery preference, underdiversification, and overconfidence in agent trading behavior.The examples respectively show premature selling of winners, speculative preference, concentration in familiar assets, and excessive conviction.
  • Behavioral biases: An agent exhibits herd behavior when perceived widespread forum sentiment and low market volume override its usual technical approach.This example connects socially influenced trading decisions with the behavioral simulation of market participants.

C. Technical Details I: Data Statistics

TwinMarket constructs its simulated market from SSE 50 stocks, sector aggregates, real-world indicators, social-media data, and behaviorally grounded LLM agents. The framework uses fixed initial-capitalization weights, dynamically handled indicators, BDI-based beliefs, and network mechanisms grounded in trading similarity and information flow.

  • SSE 50 and aggregated indices: The simulation focuses on the SSE 50 and introduces 10 aggregated sector indices whose values use constituent price relatives and fixed initial market-capitalization weights.Each aggregated index represents a sector and contains a subset of SSE 50 stocks.
  • Stock indicators: Indicators cover general identification, fundamentals, company information, and technical market activity, with data handling changing across initialization and simulation phases.Historical real-world data grounds initialization, while fundamental valuation metrics are dynamically adjusted during simulation.
  • Stock indicators: TwinMarket anchors simulated valuations to initial real-world fundamentals while allowing ratios to reflect simulated price discovery.The adjustment combines static base values such as initial EPS and BVPS with the current simulated close price.
  • Social-media data: Xueqiu data from 639 user accounts initializes agent profiles, whereas the longer Guba dataset trains the stock recommendation system.Xueqiu records span 2023-01-03 to 2023-12-06; Guba data spans 2017-06-27 to 2024-06-03.
  • Agent behavior: The belief score averages five dimensions—fundamentals, valuation, short-term trends, surrounding sentiment, and self-assessment—to support BDI-based investment intentions.The score ranges from 1 to 5 and represents beliefs that feed into desires and intentions.
  • Agent behavior: Agents transition through a daily BDI cycle, while social edges use correlated trading as a proxy for shared information channels and influence.The network design prioritizes emergent collective behavior rather than exact replication of proprietary social-platform algorithms.
  • Information environment: TwinMarket ranks social content with an interpretable hot score combining time decay and user feedback to shape agents’ information exposure.The mechanism prioritizes timely, community-relevant, and actively engaging content.

E.4 Simulation of Misinformation: Rumor Injection

TwinMarket injects factual positive news and fabricated negative rumors into an order-driven market to study misinformation and agent responses. Agents query information, browse forums, and make persona-consistent decisions using simulated historical data while safeguards reduce leakage from real-world knowledge.

  • Rumor injection: The experiment contrasts factual positive reports with fabricated or exaggerated negative snippets designed to simulate misinformation propagation.The positive examples include Federal Reserve and Chinese monetary-policy news, while the rumors describe an exaggerated Chinese manufacturing downturn.
  • Rumor injection: Rumors are deliberately introduced as a methodological intervention distinguishing the study’s information-propagation setting from factual-news exposure.The passages characterize the rumor content as fabricated or exaggerated rather than ordinary market reporting.
  • Market environment: The market uses an order-driven system based on A-share call-auction rules, including price priority, time priority, order matching, and balance updates.The system also tracks large orders and aggregate capital flows.
  • Leakage management: Temporal abstraction and relative-time presentation are used to reduce the risk that LLM agents rely on knowledge of real-world events from their training data.The authors aim for emergent behavior to arise from simulation design and agent interactions rather than pre-existing knowledge.
  • Agent workflow: Agents follow a workflow that queries news and stock data, checks forums, selects potential indices, and makes trading decisions consistent with their personas.The prompts restrict stock-data access to historical information from yesterday and earlier.
Loading 2502.01506v5…