Table of Contents
Fetching ...

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/}.

A Reflective LLM-based Agent to Guide Zero-shot Cryptocurrency Trading

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 and Sharpe are used to assess performance across market regimes, and the allocation decision is constrained within 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/}.
Paper Structure (24 sections, 7 figures, 5 tables)

This paper contains 24 sections, 7 figures, 5 tables.

Figures (7)

  • Figure 1: CryptoTrade Framework. Our framework begins with the collection of various types of data, including on-chain transactions, market data, and off-chain data from multiple financial news sources. We extract on-chain statistics while summarizing off-chain news to provide comprehensive inputs for our agents' analysis. We then deploy several LLM-based agents to make day-to-day trading decisions, utilizing a reflective mechanism to maximize total returns over different time periods.
  • Figure 2: Significant profitable periods exploited by the CryptoTrade agent. The yellow line shows the daily opening prices of Ethereum in US dollars. The blue line tracks the daily positions, indicating the amount of Ethereum possessed on each day. The blue dots denote trading decisions when the agent largely alters its position by trading Ethereum. The red dots represent the corresponding trading prices. The agent successfully forecasts price changes, securing substantial profits through low-price purchases and high-price sales.
  • Figure 3: Case study of CryptoTrade's actions in response to news reports on early rumor and the actual event of Bitcoin ETF approval, which takes place on Jan 11, 2024. The red circles denote the trading prices. The agent successfully benefits from a "buy the rumor, sell the news" strategy.
  • Figure 4: A sample of the Market Analyst.
  • Figure 5: A sample of the News Analyst.
  • ...and 2 more figures