A_Share_investment_Agent  by 24mlight

AI investment system concept project for educational purposes

created 6 months ago
1,922 stars

Top 23.2% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a proof-of-concept AI investment system for the A-share market, designed to assist in investment decision-making. It targets individuals interested in exploring AI-driven quantitative trading strategies and offers a modular, agent-based architecture for educational purposes.

How It Works

The system employs a multi-agent architecture, featuring specialized agents for market data analysis, technicals, fundamentals, sentiment, valuation, risk management, and portfolio management. A key innovation is the "Debate Room" module, which incorporates a "Bull Researcher" and "Bear Researcher" to analyze market data from opposing viewpoints. This is further enhanced by integrating a third-party LLM for objective evaluation and a hybrid confidence calculation that fuses traditional metrics with LLM scores, leading to more balanced and comprehensive investment decisions.

Quick Start & Requirements

  • Install: Clone the repository, install Poetry, then run poetry install.
  • Prerequisites: Python 3.x, Poetry. Requires API keys for Google Gemini or OpenAI-compatible services.
  • Setup: Set environment variables (e.g., GEMINI_API_KEY) or configure the .env file.
  • Usage:
    • Command line: poetry run python src/main.py --ticker <stock_code>
    • With reasoning: poetry run python src/main.py --ticker <stock_code> --show-reasoning
    • Backend API: poetry run python run_with_backend.py (access at http://localhost:8000/docs)
  • Docs: Backend API Documentation (once backend is running)

Highlighted Details

  • Supports multiple LLM providers (Google Gemini, OpenAI-compatible).
  • Modular agent design for easy maintenance and extensibility.
  • Includes a "Debate Room" with LLM-based third-party analysis for decision enhancement.
  • Provides a backend API for asynchronous analysis and custom frontend development.
  • Detailed logging for all API calls and agent reasoning processes.

Maintenance & Community

The project is a modification of ai-hedge-fund. The creator invites users to join a paid knowledge community for deeper insights and early access to code. Contact is via WeChat (PareidoliaX). A public WeChat account, "空指针指向量化 Agent," is also mentioned for content.

Licensing & Compatibility

MIT License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

The project is explicitly for educational and research purposes only and is not suitable for actual trading. The backtesting system is still under testing. The README mentions a paid community for additional support and resources.

Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
692 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

ai-hedge-fund by virattt

1.2%
39k
AI-powered hedge fund proof-of-concept for educational use
created 8 months ago
updated 3 days ago
Feedback? Help us improve.