ALFFLLM·FINANCE

The List / Agents and Multi-Agent Systems / paper

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

Yuan Li; B. Luo; Qian Wang; Nuo Chen; Xu Liu; Bingsheng He

2024Conference on Empirical Methods in Natural Language Processingcites 36P1DOI ↗Semantic Scholar ↗Source ↗

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 time-series baselines, but not compared to traditional trading signals, across various cryptocurrencies and market conditions. Our code and data are available at https://github.com/Xtra-Computing/CryptoTrade

In one sentence

CryptoTrade is a zero-shot LLM-based multi-agent system that integrates on-chain transaction statistics and off-chain news to guide daily cryptocurrency trading, outperforming time-series baselines but matching traditional technical indicators.

Summary

The paper addresses the underutilization of Large Language Models in cryptocurrency trading by introducing CryptoTrade, a framework that synthesizes transparent on-chain data with timely off-chain news. Unlike stock-focused LLM agents, this system leverages the unique transparency of blockchain transactions and the sentiment influence of financial news to navigate the high-volatility crypto market. The core innovation lies in a multi-agent architecture featuring specialized market and news analysts, a trading agent for decision-making, and a reflection agent that refines strategies based on past performance, enabling zero-shot daily trading without fine-tuning. The methodology employs GPT-3.5-turbo, GPT-4, and GPT-4o to process daily data from CoinMarketCap and Dune Analytics, including metrics like transaction counts, active wallets, and gas prices, alongside news summaries from sources like Bloomberg. The system is evaluated on Bitcoin, Ethereum, and Solana across bull, sideways, and bear markets from 2023, using a $1 million initial portfolio. Experiments compare CryptoTrade against traditional technical indicators (SMA, MACD, Buy and Hold) and deep learning time-series baselines (LSTM, Informer, PatchTST), measuring total return and Sharpe ratio to assess risk-adjusted performance. Results show CryptoTrade significantly outperforms time-series baselines in most metrics, demonstrating the efficacy of LLMs in capturing complex market dynamics. However, it does not surpass traditional signals like Buy and Hold or SLMA, particularly in strong bull markets. Ablation studies confirm that on-chain transaction statistics and the reflection mechanism are critical for performance. The paper highlights a case study where the agent successfully executed a "buy the rumor, sell the news" strategy around the Bitcoin ETF approval. Limitations include reliance on daily frequency, lack of fine-tuning, and a limited dataset scope, suggesting future work on higher-frequency trading and model adaptation.

Research problem

The paper identifies a gap in applying Large Language Models to cryptocurrency trading, a domain characterized by high volatility and unique data sources like on-chain metrics. While LLMs have been applied to stock markets, their potential to leverage the transparency of blockchain data and the immediacy of off-chain news remains untapped. The research aims to bridge this gap by developing an agent that can synthesize these diverse data types for daily trading decisions.

Core contributions

  • Introduction of CryptoTrade, an LLM-based multi-agent framework for zero-shot cryptocurrency trading.
  • Integration of both on-chain transaction statistics and off-chain news sentiment into a unified decision-making pipeline.
  • Development of a self-reflective mechanism that analyzes past trading outcomes to refine future strategies.
  • Establishment of a benchmark for LLM-based crypto trading strategies, comparing against time-series and technical baselines.
  • Empirical validation of LLM efficacy in crypto markets, showing superiority over deep learning baselines.

Method

  • Data collection pipeline aggregating on-chain metrics and off-chain news summaries.
  • Market Analyst Agent processes technical indicators and on-chain statistics to assess trends.
  • News Analyst Agent summarizes and interprets financial news for sentiment and impact.
  • Trading Agent synthesizes analyst reports to generate daily buy/sell/hold actions with confidence scores.
  • Reflection Agent reviews past week's decisions and returns to provide feedback for strategy refinement.
  • Zero-shot inference using GPT-3.5-turbo, GPT-4, and GPT-4o without fine-tuning on validation sets.
  • Portfolio simulation with $1M initial capital, split between cash and crypto, including transaction fees.

Results & findings

  • CryptoTrade (GPT-4o) outperformed time-series baselines like Informer and PatchTST in most scenarios.
  • In ETH bull markets, CryptoTrade achieved a 3% higher return than Buy and Hold.
  • Performance was comparable to traditional signals like MACD and SLMA, but not superior.
  • Ablation study showed removing on-chain statistics decreased returns by approximately 16%.
  • The reflection mechanism contributed significantly to performance gains over non-reflective variants.
  • Case study demonstrated successful 'buy the rumor, sell the news' execution during Bitcoin ETF approval.
  • GPT-4o generally outperformed GPT-3.5-turbo and GPT-4 in trading metrics.

Data & experiments

  • Datasets include daily price, volume, and market cap data from CoinMarketCap for BTC, ETH, and SOL.
  • On-chain transaction statistics (e.g., active wallets, gas prices) retrieved from Dune Analytics.
  • Off-chain news articles collected via Gnews API from sources like Bloomberg and Yahoo Finance.
  • Experiments conducted on 2023 data, split into validation and test sets covering bull, sideways, and bear markets.
  • Baselines include technical indicators (SMA, MACD, Bollinger Bands) and time-series models (LSTM, Informer, PatchTST).
  • Evaluation metrics: Total Return, Sharpe Ratio, Daily Return Mean, and Daily Return Std.

Limitations & caveats

  • Relies on a limited dataset covering only 2023, potentially lacking long-term robustness.
  • Trading frequency is limited to daily intervals, missing intraday opportunities.
  • Lack of fine-tuning may hinder performance compared to specialized models.
  • Performance does not exceed traditional technical indicators in all market conditions.
  • Dependence on news quality and availability from specific APIs.
  • Potential for overfitting to specific market regimes within the test period.

Curator notes

Discovery status: round3_promoted. Source links: FLAG-Trader: Fusion LLM-Agent with Gradient-based Reinforcement Learning for Financial Trading; Large Language Models in equity markets: applications, techniques, and insights