gitwtfhub

wtf is crypto-strategy-research-agent?

tangyum233/crypto-strategy-research-agent — explained in plain English

Analysis updated 2026-05-18

16PythonAudience · researcherComplexity · 3/5Setup · easy

TL;DR

A research demo where AI agents repeatedly analyze, redesign, and rewrite a crypto trading strategy through backtesting, not a live trading tool.

Mindmap

mindmap
  root((repo))
    What it does
      Backtests a strategy
      AI agents refine rules
      Loops until target met
    Tech stack
      Python
      Backtrader
      LangGraph
    Use cases
      Strategy research
      Learn agent pipelines
    Audience
      Quant researchers
      AI hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study how an AI pipeline can iteratively critique and rewrite a trading strategy's rules.

REASON 2

Backtest a Backtrader strategy against historical ETH/USDT candlestick data.

REASON 3

Learn how LangGraph can coordinate multiple AI roles in a feedback loop.

What's in the stack?

PythonBacktraderLangGraph

How it stacks up

tangyum233/crypto-strategy-research-agent920linjerry-stack/capital-studioadya84/ha-world-cup-2026
Stars161616
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity3/53/52/5
Audienceresearcherresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Demo mode needs no API key, connecting a real model requires copying .env.example and adding an OpenAI-compatible key.

Wtf does this do

Crypto Strategy Research Agent is a small research and portfolio project that experiments with automatically improving a cryptocurrency trading strategy. It is not a live trading program and does not offer investment advice. The project works with historical 30 minute candlestick data for the ETH/USDT trading pair and a starting Backtrader strategy. The system runs a backtest, then hands the results to a small pipeline built with LangGraph, a tool for managing multi step workflows. Three roles take turns reviewing the strategy. An analyst looks at the returns, drawdown, win rate, and trade history to find problems. A designer turns those problems into concrete rules for entering trades, exiting trades, setting stop losses, and sizing positions. A coder writes those rules into a new strategy file in Python. Before a new strategy is saved, the code is checked for valid syntax and structure. The previous version is backed up before being replaced. The backtest then runs again on the new strategy. This loop repeats until the strategy reaches a performance target or the process completes a set number of rounds. The project ships with a demo mode that needs no API key and no external model. It runs the whole analyze, design, code, check, and retest loop using the strategy already in the repository, so a new user can see the process work end to end before connecting anything real. Switching to a real language model just means copying an example settings file, adding an API key, and choosing a provider such as OpenAI, with the option to use a different model for each of the three roles. Output from each run lands in a results folder: a summary of the latest backtest, a full table of trades, and a backup of each strategy version before it gets overwritten. The project is written in Python and depends on Backtrader for backtesting and LangGraph for coordinating the roles.

Yoink these prompts

Prompt 1
Explain how the analyst, designer, and coder roles in this LangGraph workflow pass information to each other.
Prompt 2
Help me connect my own OpenAI-compatible API to run this agent with a real language model instead of demo mode.
Prompt 3
Walk me through how to read the backtest summary in result/summary.json to judge if a new strategy improved.
Prompt 4
Show me how the validation step checks a generated strategy file before it replaces the old one.

Frequently asked questions

wtf is crypto-strategy-research-agent?

A research demo where AI agents repeatedly analyze, redesign, and rewrite a crypto trading strategy through backtesting, not a live trading tool.

What language is crypto-strategy-research-agent written in?

Mainly Python. The stack also includes Python, Backtrader, LangGraph.

How hard is crypto-strategy-research-agent to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is crypto-strategy-research-agent for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.