Build Your AI-Powered A-Share Investment Assistant: A Zero-Cost, Automated Analysis System Guide

In today’s information-saturated stock market, how can you efficiently obtain clear buy and sell signals? How can you leverage AI to automatically review the market and analyze your watchlist stocks daily? This article provides a comprehensive look at a fully open-source, zero-cost deployment solution: an A-Share Intelligent Analysis System. It uses large AI models to automatically generate a “Decision Dashboard” with precise price points and delivers it directly to you via WeChat, Feishu, Telegram, or email.

The Core Value Proposition

The A-Share Intelligent Analysis System is a tool built on GitHub Actions’ free automation services. Every day, it automatically fetches market and news data for your predefined watchlist stocks (e.g., 600519, 300750), utilizes AI models like Google Gemini for multi-dimensional analysis, generates trade suggestions with specific entry, stop-loss, and target prices, and automatically pushes the results to your chosen communication platform at 6:00 PM on business days. The entire process requires no server and incurs zero monetary cost.

✨ Why You Might Need This System

Whether you’re a busy professional or an active investor seeking to combine fundamental, technical, and sentiment analysis, manually tracking multiple stocks is time-consuming. This system addresses several core challenges:

  • Information Overload: Automatically consolidates market data, news, and holder distribution data, with AI distilling key insights.
  • Vague Decision-Making: Provides quantifiable “sniper points” (e.g., “Buy 1800 | Stop-loss 1750 | Target 1900”), moving beyond ambiguous “suggestions to watch.”
  • Execution Lag: Runs analysis automatically on a daily schedule, freeing your time and mental energy.
  • Cost Concerns: Leverages free tiers of GitHub Actions and Google AI Studio’s API to achieve true zero-cost automation.

🛠️ Deep Dive into Core Features

1. The AI Decision Dashboard: Your Daily Trading Checklist

This is the system’s core output—not a lengthy report, but a highly condensed “action map.”

  • One-Sentence Core Conclusion: AI summarizes the most prominent characteristic, e.g., “Retracing on low volume to MA5 support, with a 1.2% bias rate indicating an optimal buy point” or “Bias rate of 7.8% exceeds the 5% warning line; chasing highs is strictly prohibited.”
  • Precise Trade Points: This is a key differentiator. It provides specific price recommendations, such as “💰 Sniper: Buy 1800 | Stop-loss 1750 | Target 1900.” This offers clear anchors for your trading plan.
  • Visual Checklist: Uses ✅ (Pass), ⚠️ (Caution), ❌ (Fail) to intuitively mark various trading conditions, like “✅ Uptrend alignment ✅ Safe bias rate ✅ Volume cooperation,” allowing for quick stock health assessment.
  • Automated Rating: The system has built-in trading logic to automatically suggest 🟢 Buy, 🟡 Watch, or 🔴 Sell.

2. Multi-Dimensional Analysis Framework

The system looks beyond just price charts by integrating multiple data sources:

  • Technical Analysis: Examines moving average alignment (e.g., MA5 > MA10 > MA20), bias rate, etc.
  • Built-in Risk Control: Strictly prohibits chasing highs. The system automatically flags a stock as ‘Dangerous’ when it detects a bias rate > 5%.
  • Sentiment Intelligence: Uses integrated search APIs like Tavily and Bocha to fetch recent news and market sentiment related to the stock.
  • Real-Time Market Data: Pulls from multiple free and professional sources like AkShare and Tushare to ensure data accuracy.

3. Market Recap: A Daily Panoramic View

Beyond individual stocks, the system generates a concise market recap:

  • Performance of major indices (Shanghai Composite, Shenzhen Component, ChiNext).
  • Overall market advance/decline figures, along with limit-up/limit-down counts.
  • Top gaining and losing sectors of the day, helping you identify market hotspots and risk areas.

🚀 Zero-Cost Deployment: A Complete GitHub Actions Walkthrough

This is the recommended method for most users. You only need a GitHub account—no cloud server or VPS is required.

How-To: Complete Setup in Four Steps

Step 1: Fork the Project Repository
Visit the project’s GitHub page and click the Fork button in the top-right corner. This creates your own independent copy of the code under your account.

Step 2: Configure Core Secrets
This is the most critical step. All private information (like API Keys) is configured securely using GitHub’s Secrets feature.

  1. Go to your forked repository.
  2. Click the Settings tab.
  3. In the left sidebar, find Secrets and variables under the Actions section.
  4. Click New repository secret to begin adding.

You will need to configure several types of secrets:

AI Model Secrets (Configure at least one)

Secret Name Description How to Obtain
GEMINI_API_KEY Recommended primary choice. A free API Key provided by Google AI Studio, with ample quota for personal use. Visit Google AI Studio, sign up, and create a project to get your key.
OPENAI_API_KEY & OPENAI_BASE_URL Alternative option. Supports any model offering an OpenAI-compatible API, such as DeepSeek, Qwen (Tongyi Qianwen), etc. Register on the respective platform to get an API Key. Set OPENAI_BASE_URL to the model’s API address (e.g., https://api.deepseek.com/v1 for DeepSeek).

Notification Channel Secrets (Configure at least one channel)
You can configure multiple; the system will send messages to all configured channels.

Secret Name Channel Key Notes
WECHAT_WEBHOOK_URL WeChat Work (Enterprise WeChat) Bot You need to add a “Group Robot” to a WeChat Work group to obtain the Webhook URL.
FEISHU_WEBHOOK_URL Feishu (Lark) Bot Add a “Custom Bot” to a Feishu group to get the URL.
TELEGRAM_BOT_TOKEN & TELEGRAM_CHAT_ID Telegram Bot Create a bot via @BotFather to get the Token. Get your Chat ID by messaging @userinfobot.
EMAIL_SENDER, EMAIL_PASSWORD, EMAIL_RECEIVERS Email Notification EMAIL_PASSWORD is your email’s authorization code (e.g., SMTP authorization code for QQ Mail), not your login password.

Other Essential Configuration

Secret Name Description
STOCK_LIST Required. Your watchlist of stock codes, separated by commas. For example: 600519,300750,002594. Supports A-Shares and H-Shares.
TAVILY_API_KEYS or BOCHA_API_KEYS Highly Recommended. API Keys for news search. Tavily is great for general search; Bocha is optimized for Chinese language queries.

Step 3: Enable Workflows

  1. Click the Actions tab at the top of your repository.
  2. If it’s your first visit, you’ll see a prompt. Click I understand my workflows, go ahead and enable them.
  3. The workflow named “Daily Stock Analysis” is now active.

Step 4: Manual Test and Completion

  1. On the Actions page, click the Daily Stock Analysis workflow on the left.
  2. Click the Run workflow button on the right, use the default branch, and click Run workflow again.
  3. Wait a few minutes. Your configured notification channel(s) should receive the first test analysis report.

Done! The system is fully configured. It will automatically run the analysis and deliver results every business day at 18:00 Beijing Time (UTC+8).

📊 Data Sources & AI Models: The System’s “Eyes” and “Brain”

Data Sources: Comprehensive and Flexible

The system uses a layered data-fetching strategy, ensuring automatic fallback if one source fails.

  • Primary Source (AkShare): A free, open-source financial data interface library covering A-Shares, H-Shares, futures, etc. It’s the default and preferred source.
  • Alternative Sources (Tushare Pro, Baostock, YFinance): Provide professional or supplementary data, such as more precise financials or US market data (reserved for future features). You can enable them by adding the corresponding tokens in your configuration.

AI Models: Free and Open Options

  • Primary Model: Google Gemini, specifically the gemini-3-flash-preview model. It’s chosen primarily for the free tier offered via Google AI Studio, which is more than sufficient for personal daily analysis of a few stocks, making zero-cost operation possible.
  • Compatible Models: OpenAI API Format. The system is fully compatible with any service following the OpenAI API standard. This allows easy switching to:

    • DeepSeek: A cost-effective domestic model.
    • Qwen (Tongyi Qianwen), Moonshot, Claude, etc.: Simply provide the corresponding BASE_URL and API_KEY.
    • Even Local Models: If you run Ollama locally, point the BASE_URL to your local service address.

This design grants the system significant flexibility and future adaptability.

⚙️ Advanced Configuration & Usage Tips

Local Execution & WebUI Management

Beyond cloud automation, you can also run the project on your local machine or server.

  1. Clone the Code: git clone [your-repository-url]
  2. Install Dependencies: pip install -r requirements.txt
  3. Configure Environment Variables: Copy the .env.example file to .env and fill in your secrets.
  4. Launch WebUI: Run python main.py --webui, then open http://127.0.0.1:8000 in your browser. This simple web interface lets you conveniently view and modify your watchlist without editing configuration files directly.

Understanding the Project Structure

Knowing the core files helps with deep customization or troubleshooting:

  • main.py: The main program entry point.
  • analyzer.py: The core module responsible for communicating with the AI model and structuring analysis prompts.
  • market_analyzer.py: Generates the market recap report.
  • notification.py: Handles the sending logic for all notification channels (WeChat, Feishu, etc.).
  • data_provider/ directory: Contains all data source adapters, like akshare_fetcher.py. To add a new data source, you would write a new adapter here.

🤔 Frequently Asked Questions (FAQ)

Q: Is this system really completely free?
A: Yes, the core operational pipeline is free. GitHub Actions provides a monthly free compute allowance for public repositories, which is ample for a daily analysis job. The Google Gemini API used for AI analysis offers a free tier upon registration with Google AI Studio. News search APIs (like Tavily) also typically have free tiers. Only with extremely high usage would paid upgrades potentially be needed.

Q: Are the analysis results reliable? Can they be used as investment advice?
A: Absolutely not as the sole basis for investment decisions. The system is an aid for decision-making. Its value lies in using AI to quickly process public information, providing you with structured, quantified analysis summaries to save you time on data gathering. All investment decisions must be based on your own independent judgment, risk tolerance, and deeper research. The project’s disclaimer clearly states this.

Q: Does it support H-Shares and US stocks?
A: The system currently supports H-Shares (using codes like 00700.HK). US stock support is on the project roadmap. The data source YFinance natively supports US stocks; future expansion mainly involves adapting the AI analysis prompts and rules.

Q: What happens if a data source fails?
A: The system has basic fault-tolerant mechanisms. For instance, in the data-fetching layer, if AkShare fails to get data for a stock and you have a Tushare Token configured, the system may attempt to switch. More robust error handling (like automatic retries, fallback plans) depends on future community development.

Q: Can I modify the analysis logic? For example, I think a bias rate > 3% is already high.
A: Yes, but this requires some Python programming ability. You can modify the part in analyzer.py that constructs the AI prompts, or change the threshold parameters in config.py and related analysis logic. This is the advantage of open-source projects.

🗺️ Future Outlook & Community

The project is actively maintained. Planned features include historical analysis backtesting and more comprehensive US stock support. The development roadmap is public in the project documentation. If you encounter issues, have feature suggestions, or wish to contribute code (e.g., adding a new notification channel or data source), you are welcome to submit an Issue or Pull Request on the GitHub repository.

Begin Your Intelligent Investment Aid Journey

This article has provided a comprehensive overview of the A-Share Intelligent Analysis System’s core principles, value, and setup details. It functions like a tireless AI investment assistant, automatically handling tedious data consolidation and preliminary analysis, delivering a condensed “Decision Dashboard” to you daily.

Suggested Next Step: Visit the project’s GitHub page now, click Fork, spend 15 minutes configuring your stock list and at least one notification channel, and run a manual test. Experience firsthand the automated pipeline from data to AI-driven suggestions, making it a powerful tool in your investment toolkit.


Final Reminder: Financial markets carry inherent risks. The output of any automated tool should be treated as reference information. Maintaining rationality and independent judgment is fundamental to long-term survival and success in the markets. Wishing you success on your investment journey, using tools wisely and proceeding steadily.