gitwtfhub

wtf is bestaitrader?

marvekg/bestaitrader — explained in plain English

Analysis updated 2026-05-18

16PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

TL;DR

A research-grade multi-agent AI system for analyzing China's A-share stock market, where specialized AI agents debate investment decisions, a portfolio manager makes the final call, and past predictions are reviewed to improve future reasoning.

Mindmap

mindmap
  root((bestaitrader))
    AI Agents
      News analyst
      Policy analyst
      Sentiment tracker
      Fundamental analyst
      Technical analyst
      Bull and bear debate
    Decision Flow
      Multi-round debate
      Portfolio manager call
      Confidence and position size
      Risk summary
    Memory
      Vector database
      Post-review feedback
      5 20 60 day check
    Infrastructure
      Docker containers
      PostgreSQL and Redis
      FastAPI backend
      React dashboard

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

Run a multi-agent AI debate on a Chinese A-share stock to get a structured buy/sell recommendation with confidence and risk summary.

REASON 2

Study how different AI analyst roles (news, policy, sentiment, technical) can be orchestrated to debate an investment thesis.

REASON 3

Review how well past AI predictions matched actual stock price moves at 5, 20, and 60 days to understand model accuracy.

REASON 4

Use the simulated trading engine with T+1 A-share rules to back-test AI-generated decisions without real money.

What's in the stack?

PythonFastAPIReactPostgreSQLRedisDockerVector Database

How it stacks up

marvekg/bestaitrader920linjerry-stack/capital-studioadya84/ha-world-cup-2026
Stars161616
LanguagePythonPythonPython
Setup difficultyhardeasyeasy
Complexity5/53/52/5
Audienceresearcherresearchergeneral

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

How do you spin it up?

Difficulty · hard Time to first run · 1day+

Requires Docker with multiple containers (PostgreSQL, Redis, vector DB, FastAPI, React) plus third-party financial data API credentials for A-share market data.

Licensed for non-commercial research use only, does not constitute investment advice, and you are responsible for verifying third-party data sources.

Wtf does this do

Best-AI-Trader (also called Tiansu Zhitou) is a research-grade system for AI-assisted investment analysis focused on China's A-share stock market. Rather than asking a single AI model to predict stock movements, it organizes multiple specialized AI agents into a team that debates a decision before a portfolio manager agent makes a final call. The agents represent different roles: news analyst, policy analyst, sentiment tracker, fundamental analyst, technical analyst, and separate bull and bear sides in a structured debate. Each agent queries relevant data sources, and the results feed into a multi-round discussion. The portfolio manager then produces a decision that includes an action, a confidence level, a position size, and a risk summary, all saved in the database for later review. The system includes a long-term memory layer backed by a vector database. After decisions are made, a post-review process checks how the AI's prediction compared to actual price movement over the following 5, 20, and 60 days. It identifies what agents got right or wrong, and writes useful rules back into memory so future analyses can draw on past lessons. On the infrastructure side, the project runs as a set of Docker containers that include a PostgreSQL database, Redis, a vector search component, a FastAPI backend, and a React frontend. A simulated trading engine handles orders, positions, and fees following A-share rules including T+1 settlement. A real-time dashboard lets you watch the AI's reasoning as it runs. The project is licensed for non-commercial research use only and explicitly states that it does not constitute investment advice. Anyone deploying it is responsible for verifying data sources and the terms of any third-party financial data services they connect.

Yoink these prompts

Prompt 1
Walk me through setting up Best-AI-Trader with Docker Compose so all containers start correctly and I can access the React dashboard.
Prompt 2
How does the multi-agent debate work in bestaitrader? Explain how the bull and bear agents exchange arguments and how the portfolio manager agent reaches a final decision.
Prompt 3
I want to add a new analyst agent role to bestaitrader. What code files define the agent roles, and how do I register a new one in the debate pipeline?
Prompt 4
How does bestaitrader's post-review process compare its AI predictions to actual price movement and write lessons back into the vector memory?

Frequently asked questions

wtf is bestaitrader?

A research-grade multi-agent AI system for analyzing China's A-share stock market, where specialized AI agents debate investment decisions, a portfolio manager makes the final call, and past predictions are reviewed to improve future reasoning.

What language is bestaitrader written in?

Mainly Python. The stack also includes Python, FastAPI, React.

What license does bestaitrader use?

Licensed for non-commercial research use only, does not constitute investment advice, and you are responsible for verifying third-party data sources.

How hard is bestaitrader to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is bestaitrader for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

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