Daily Stock Analysis is a Python workflow for running scheduled A-share market reviews, watchlist analysis, news enrichment, and multi-channel notification summaries.
This repository is packaged as a public portfolio version. It keeps the automation structure visible, but credentials, local databases, logs, generated reports, and private runtime artifacts are intentionally excluded.
- Builds a daily stock-watchlist review from configurable tickers.
- Pulls market data from public and optional provider APIs.
- Adds AI-assisted analysis through user-provided model credentials.
- Sends summaries through optional channels such as WeChat Work, Feishu, Telegram, email, or custom webhooks.
- Supports local runs, Docker runs, and GitHub Actions scheduling.
main.py CLI entrypoint for daily analysis runs
config.py Environment-driven configuration loader
analyzer.py Analysis orchestration and AI prompt flow
llm_client.py Gemini and OpenAI-compatible provider adapter
notification.py Notification rendering and delivery helpers
storage.py SQLite persistence helpers
data_provider/ Market data provider adapters
sources/ Public demo assets
.github/workflows/ CI and scheduled workflow templates
py -3 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .env
python test_env.py
python main.py --helpFill .env with your own API keys and notification endpoints before running a live analysis. The repository does not include working credentials.
Common environment variables:
| Variable | Purpose | Required |
|---|---|---|
STOCK_LIST |
Comma-separated watchlist, such as 600519,300750,002594 |
Yes |
GEMINI_API_KEY |
Google AI Studio key for AI analysis | One AI key required |
OPENAI_API_KEY |
OpenAI-compatible fallback key | Optional |
OPENAI_BASE_URL |
OpenAI-compatible endpoint | Optional |
TUSHARE_TOKEN |
Optional Tushare Pro token | Optional |
TAVILY_API_KEYS |
Optional news search keys | Optional |
WECHAT_WEBHOOK_URL |
Optional WeChat Work webhook | Optional |
FEISHU_WEBHOOK_URL |
Optional Feishu webhook | Optional |
TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID |
Optional Telegram channel | Optional |
EMAIL_SENDER / EMAIL_PASSWORD / EMAIL_RECEIVERS |
Optional email delivery | Optional |
Do not commit .env, databases, logs, or generated reports.
The workflow templates under .github/workflows/ are intended as examples. To use them in your own fork:
- Add the required secrets in GitHub Actions settings.
- Review the scheduled run time and stock list.
- Run the workflow manually once before enabling a schedule.
No repository secret is included in this public package.
This public version excludes:
.envand local credential files- SQLite databases and generated reports
- runtime logs
- private notification endpoints
- local machine paths
The diagnostic script reports whether credentials are configured, but it does not print token prefixes or secret values.
This is a legacy automation project packaged for public review. For a cleaner current stock-research workflow kit, see Stock Analysis Plus.
MIT License.