A Reflective LLM-based Agent to Guide Zero-shot Cryptocurrency Trading
Yuan Li, Bingqiao Luo, Qian Wang, Nuo Chen, Xu Liu, Bingsheng He
TL;DR
This work tackles the problem of applying large language models to cryptocurrency trading by fusing transparent on-chain statistics with timely off-chain news signals. It introduces CryptoTrade, a reflective, zero-shot LLM-based trading agent that integrates data from on-chain sources and news through dedicated Market, News, Trading, and Reflection agents, guided by a self‑refinement loop. The approach is evaluated on BTC, ETH, and SOL with GPT-4 and GPT-4o under bull, sideways, and bear conditions, showing improvements over time-series baselines and competitiveness with MACD without fine-tuning, quantified by Return and Sharpe metrics; ablations demonstrate the critical role of on-chain statistics and reflection. The work provides a practical, data-rich benchmark for LLM-driven crypto trading and contributes a public dataset and codebase to support reproducible evaluation and further research in this domain. Return $R = rac{w^{end}-w^{start}}{w^{start}}$ and Sharpe $S = rac{ar{r}-r_f}{ ext{std}(r)}$ are used to assess performance across market regimes, and the allocation decision is constrained within $[0,1]$ for purchases.
Abstract
The utilization of Large Language Models (LLMs) in financial trading has primarily been concentrated within the stock market, aiding in economic and financial decisions. Yet, the unique opportunities presented by the cryptocurrency market, noted for its on-chain data's transparency and the critical influence of off-chain signals like news, remain largely untapped by LLMs. This work aims to bridge the gap by developing an LLM-based trading agent, CryptoTrade, which uniquely combines the analysis of on-chain and off-chain data. This approach leverages the transparency and immutability of on-chain data, as well as the timeliness and influence of off-chain signals, providing a comprehensive overview of the cryptocurrency market. CryptoTrade incorporates a reflective mechanism specifically engineered to refine its daily trading decisions by analyzing the outcomes of prior trading decisions. This research makes two significant contributions. Firstly, it broadens the applicability of LLMs to the domain of cryptocurrency trading. Secondly, it establishes a benchmark for cryptocurrency trading strategies. Through extensive experiments, CryptoTrade has demonstrated superior performance in maximizing returns compared to traditional trading strategies and time-series baselines across various cryptocurrencies and market conditions. Our code and data are available at \url{https://anonymous.4open.science/r/CryptoTrade-Public-92FC/}.
