gitmyhub

BestAITrader

Python ★ 20 updated 1d ago

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.

PythonFastAPIReactPostgreSQLRedisDockerVector Databasesetup: hardcomplexity 5/5

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.

Where it fits