whatisgithub

What is bestaitrader?

marvekg/bestaitrader — explained in plain English

Analysis updated 2026-06-24

16PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

In one sentence

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
Click or tap to explore — scroll the page freely

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

What do people build with it?

USE CASE 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.

USE CASE 2

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

USE CASE 3

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

USE CASE 4

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

What is it built with?

PythonFastAPIReactPostgreSQLRedisDockerVector Database

How does it compare?

marvekg/bestaitraderadya84/ha-world-cup-2026afk-surf/safeclipper
Stars161616
LanguagePythonPythonPython
Setup difficultyhardeasymoderate
Complexity5/52/53/5
Audienceresearchergeneraldeveloper

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

How do you get it running?

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.

So what is it?

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.

Copy-paste 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

What 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.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.