{"title":"当人工智能遇上金融(StockAgent):模拟现实世界环境中基于大语言模型的股票交易","authors":"Chong Zhang, Xinyi Liu, Mingyu Jin, Zhongmou Zhang, Lingyao Li, Zhengting Wang, Wenyue Hua, Dong Shu, Suiyuan Zhu, Xiaobo Jin, Sujian Li, Mengnan Du, Yongfeng Zhang","doi":"arxiv-2407.18957","DOIUrl":null,"url":null,"abstract":"Can AI Agents simulate real-world trading environments to investigate the\nimpact of external factors on stock trading activities (e.g., macroeconomics,\npolicy changes, company fundamentals, and global events)? These factors, which\nfrequently influence trading behaviors, are critical elements in the quest for\nmaximizing investors' profits. Our work attempts to solve this problem through\nlarge language model based agents. We have developed a multi-agent AI system\ncalled StockAgent, driven by LLMs, designed to simulate investors' trading\nbehaviors in response to the real stock market. The StockAgent allows users to\nevaluate the impact of different external factors on investor trading and to\nanalyze trading behavior and profitability effects. Additionally, StockAgent\navoids the test set leakage issue present in existing trading simulation\nsystems based on AI Agents. Specifically, it prevents the model from leveraging\nprior knowledge it may have acquired related to the test data. We evaluate\ndifferent LLMs under the framework of StockAgent in a stock trading environment\nthat closely resembles real-world conditions. The experimental results\ndemonstrate the impact of key external factors on stock market trading,\nincluding trading behavior and stock price fluctuation rules. This research\nexplores the study of agents' free trading gaps in the context of no prior\nknowledge related to market data. The patterns identified through StockAgent\nsimulations provide valuable insights for LLM-based investment advice and stock\nrecommendation. The code is available at\nhttps://github.com/MingyuJ666/Stockagent.","PeriodicalId":501478,"journal":{"name":"arXiv - QuantFin - Trading and Market Microstructure","volume":"66 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"When AI Meets Finance (StockAgent): Large Language Model-based Stock Trading in Simulated Real-world Environments\",\"authors\":\"Chong Zhang, Xinyi Liu, Mingyu Jin, Zhongmou Zhang, Lingyao Li, Zhengting Wang, Wenyue Hua, Dong Shu, Suiyuan Zhu, Xiaobo Jin, Sujian Li, Mengnan Du, Yongfeng Zhang\",\"doi\":\"arxiv-2407.18957\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Can AI Agents simulate real-world trading environments to investigate the\\nimpact of external factors on stock trading activities (e.g., macroeconomics,\\npolicy changes, company fundamentals, and global events)? These factors, which\\nfrequently influence trading behaviors, are critical elements in the quest for\\nmaximizing investors' profits. Our work attempts to solve this problem through\\nlarge language model based agents. We have developed a multi-agent AI system\\ncalled StockAgent, driven by LLMs, designed to simulate investors' trading\\nbehaviors in response to the real stock market. The StockAgent allows users to\\nevaluate the impact of different external factors on investor trading and to\\nanalyze trading behavior and profitability effects. Additionally, StockAgent\\navoids the test set leakage issue present in existing trading simulation\\nsystems based on AI Agents. Specifically, it prevents the model from leveraging\\nprior knowledge it may have acquired related to the test data. We evaluate\\ndifferent LLMs under the framework of StockAgent in a stock trading environment\\nthat closely resembles real-world conditions. The experimental results\\ndemonstrate the impact of key external factors on stock market trading,\\nincluding trading behavior and stock price fluctuation rules. This research\\nexplores the study of agents' free trading gaps in the context of no prior\\nknowledge related to market data. The patterns identified through StockAgent\\nsimulations provide valuable insights for LLM-based investment advice and stock\\nrecommendation. The code is available at\\nhttps://github.com/MingyuJ666/Stockagent.\",\"PeriodicalId\":501478,\"journal\":{\"name\":\"arXiv - QuantFin - Trading and Market Microstructure\",\"volume\":\"66 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-07-15\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - QuantFin - Trading and Market Microstructure\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2407.18957\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - QuantFin - Trading and Market Microstructure","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.18957","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
When AI Meets Finance (StockAgent): Large Language Model-based Stock Trading in Simulated Real-world Environments
Can AI Agents simulate real-world trading environments to investigate the
impact of external factors on stock trading activities (e.g., macroeconomics,
policy changes, company fundamentals, and global events)? These factors, which
frequently influence trading behaviors, are critical elements in the quest for
maximizing investors' profits. Our work attempts to solve this problem through
large language model based agents. We have developed a multi-agent AI system
called StockAgent, driven by LLMs, designed to simulate investors' trading
behaviors in response to the real stock market. The StockAgent allows users to
evaluate the impact of different external factors on investor trading and to
analyze trading behavior and profitability effects. Additionally, StockAgent
avoids the test set leakage issue present in existing trading simulation
systems based on AI Agents. Specifically, it prevents the model from leveraging
prior knowledge it may have acquired related to the test data. We evaluate
different LLMs under the framework of StockAgent in a stock trading environment
that closely resembles real-world conditions. The experimental results
demonstrate the impact of key external factors on stock market trading,
including trading behavior and stock price fluctuation rules. This research
explores the study of agents' free trading gaps in the context of no prior
knowledge related to market data. The patterns identified through StockAgent
simulations provide valuable insights for LLM-based investment advice and stock
recommendation. The code is available at
https://github.com/MingyuJ666/Stockagent.