Skip to content

Guide · Open source

How to use daily_stock_analysis: setup, config and daily reports

Updated · written with AI from the project's own documentation and checked against our catalogue data

daily_stock_analysis is an open-source Python system that uses a large language model to analyze a watchlist of stocks across several markets, then sends a daily summary to a chat app or email. This guide covers the two ways to run it, the settings you need, and how to read the output. By the end you will be able to run it once by hand, schedule it, and understand what the decision dashboard contains.

daily_stock_analysisZhuLinsen/daily_stock_analysis · ★ 67.4k · MIT

Quick start

  1. 1Get an AI model key. Sign up with one model provider, such as Modelflare or AIHubMix, and copy the API key. Ollama is the local option.
  2. 2Fork or clone the repository. Fork it for GitHub Actions, or clone it with git for a local run.
  3. 3Set your watchlist. Put your stock codes in STOCK_LIST, using the code formats shown in the README.
  4. 4Add a notification channel. Set the webhook or bot secrets for WeChat Work, Feishu, Telegram, Discord, Slack or email.
  5. 5Run a test. Trigger the workflow manually on Actions, or run python main.py --dry-run locally.
  6. 6Enable the daily schedule. The README says the default run is on weekdays at 18:00 Beijing time, and non-trading days are skipped by default.

What you need before you start

The system needs an AI model to produce its analysis. The README lists Modelflare, AIHubMix, Gemini, Claude, and OpenAI-compatible services as options, and Ollama for a local model. You also need Python 3.10 or newer if you run it on your own machine.

Market data and news come from free sources by default, including AkShare, Baostock and YFinance. The README notes these free sources are subject to rate limits, interface changes and network issues, and their stability is not guaranteed.

  • Python 3.10+ (local or Docker run)
  • An LLM API key, or a local Ollama model
  • A GitHub account if you use GitHub Actions

Option A: run it on GitHub Actions at no cost

The README's recommended route is to fork the repository, add your settings as GitHub Secrets, and enable the included workflow. It says this takes about 5 minutes and needs no server.

Set at least one AI model key (for example MODELFLARE_KEY or AIHUBMIX_KEY), at least one notification channel, and STOCK_LIST, which holds your watchlist codes such as 600519,hk00700,AAPL. The README recommends configuring at least one news search service for better sentiment and catalyst notes.

  • Fork the repository.
  • Go to Settings, then Secrets and variables, then Actions, and add the secrets.
  • Open the Actions tab and enable the workflows.
  • Run 每日股票分析 manually once to test it.

Option B: run it locally with the command line

Clone the repository, install the dependencies, create your config file from the example, and run the analysis. Edit .env with your API keys and watchlist before the run.

The README lists several useful flags. --dry-run and --debug are useful for first checks, and --stocks lets you override the watchlist for one run.

git clone https://github.com/ZhuLinsen/daily_stock_analysis.git && cd daily_stock_analysis pip install -r requirements.txt cp .env.example .env && vim .env python main.py python main.py --debug python main.py --dry-run python main.py --stocks 600519,hk00700,AAPL,2330.TW python main.py --schedule

Choose stocks and markets in your watchlist

The watchlist is set with STOCK_LIST. The README gives examples across markets: 600519 for A-shares, hk00700 for Hong Kong, AAPL for US, 7203.T for Japan, 005930.KS for Korea and 2330.TW for Taiwan. The project's market support notes describe which data sources cover each market.

Index codes can be passed in a one-off run with --stocks, and the README links to a separate section on index watchlists.

  • A-shares, Hong Kong, US, Japan, Korea and Taiwan are listed in the README
  • ETFs are also covered according to the README

Connect a notification channel

Reports can be pushed to WeChat Work, Feishu, Telegram, Discord, Slack, or email. Each channel needs its own secret. Telegram needs a bot token and chat ID, Slack needs a bot token and channel ID, and email needs a sender and password. You only need one channel to start.

  • WECHAT_WEBHOOK_URL for WeChat Work
  • FEISHU_WEBHOOK_URL for Feishu
  • TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID for Telegram
  • DISCORD_WEBHOOK_URL for Discord
  • EMAIL_SENDER and EMAIL_PASSWORD for email

How to read the decision dashboard

Each stock gets a report with a core conclusion, a score, a trend reading, buy and sell levels, risk alerts, catalysts, and an action checklist. The sample push in the README shows each stock with a label such as 买入 (buy), 观望 (hold or wait) or 卖出 (sell), plus a score and a trend word.

Treat these outputs as LLM-generated analysis. The README presents them as analysis, not as a guarantee, so check the cited news and data before acting on any of them.

  • Core conclusion and score
  • Trend and buy/sell price levels
  • Risk alerts and catalysts
  • Action checklist

What people use it for

  • A personal daily summary of a watchlist of A-shares and US stocks pushed to a WeChat Work or Feishu group
  • A self-hosted script that runs a fixed watchlist through an LLM and saves the reports
  • A Telegram or email digest for a small group that follows the same stocks
  • Testing different LLM providers against the same watchlist using the configuration guide

Frequently asked questions

Is daily_stock_analysis free to use?

The project is released under the MIT licence, and the README says it can run on a schedule through GitHub Actions at no cost. The AI model and some news search services may have their own usage fees or free tiers, so check each provider.

What do I need to install daily_stock_analysis?

You need Python 3.10 or newer, the repository cloned from GitHub, and at least one LLM API key or a local Ollama model. Install the dependencies with pip install -r requirements.txt.

Can I run daily_stock_analysis without an API key?

Not for the analysis itself. The README says an AI model is required, so you need an API key from a cloud provider or a local model through Ollama.

Which markets does daily_stock_analysis support?

The README lists A-shares, Hong Kong, US, Japan, Korea and Taiwan stocks, plus ETFs. Data coverage differs by market, so the project's market support page describes the limits.

Why is my data missing or my run failing?

The README warns that free data sources have rate limits and can change without notice. Run python main.py --debug to see more detail, and consider adding token-based data sources such as Tushare or Longbridge for steadier data.

What are the alternatives to daily_stock_analysis?

The README's comparison list includes FinRobot, OpenBB, TradingAgents and FinGPT. Pick based on whether you want a daily pushed report or a research toolkit.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

daily_stock_analysis suits individual investors with a personal watchlist who want an automated daily summary, and developers who want a self-hosted, scriptable pipeline and are comfortable managing API keys and GitHub Secrets. It is not suited to anyone expecting reliable trading advice or dependable real-time data, since the output is LLM-generated and free data sources have no stability guarantee.

Install options & downloads

Find exactly what
you're looking for