The open-source, self-hosted AI equity desk โ your local Claude CLI is the brain, your repo is the body.
Eight arms across every market ยท ๅ ซ่่งฆ่พพ๏ผๆดๅฏๅ จๅธๅบ
English ยท ็ฎไฝไธญๆ
๐ Quick Start ยท ๐ Why Smart Octopus ยท ๐ธ Product Tour ยท ๐ง The Claude Harness
๐ง Your local
claudeCLI is the analysis engine. Type a ticker and the agent runs a multi-lens skill, refutes its own thesis, and writes a research report. No model API keys to manage โ it runs on your Claude subscription.โก Self-hosted & private. Data never leaves your machine. Schedule the
astock-*routines on your own cron, or fall back to the legacy GitHub Actions pipeline for headless / CI environments.
Smart Octopus is a self-hosted research desk for the stock market that you run from your own repo โ no SaaS, no per-seat pricing, no data leaving your machine. It pulls multi-market data and news, hands the hard reasoning to an LLM agent, and ships a structured decision dashboard (score, trend, entry/exit, risk, catalysts, an action checklist) to WeCom, Feishu, Telegram, Discord, Slack, or email.
What makes it different from the dozens of "ChatGPT-reads-a-stock" scripts:
- ๐ง Claude CLI is the brain. The web app drives your local
claudeCLI as a real agent harness โ skills, strategy YAML, and deterministic tools are the tentacles. Type a ticker; the agent runs the multi-lensastock-analyzeskill and produces a report. - โก No model keys, self-hosted. The web workstation and scheduled
astock-*routines run on your local Claude CLI โ no per-call API bill, data stays local. A legacy LLM-provider pipeline (GitHub Actions / Docker / CI) remains for headless environments without an interactiveclaudelogin. - ๐ Five markets, six channels. A-shares, HK, US, plus JP/KR โ quotes, K-lines, technicals, fund flow, chips, news, fundamentals โ delivered to six push channels out of the box.
- ๐ InkSift ๅขจ็ญ screening engine. A built-in catalyst / price-action screener sifts the whole market for candidates, then the agent enriches the top names with quotes, fundamentals, and news.
The default brain is your local Claude CLI โ install Claude Code
and log in (claude) once, and no model API keys are needed.
# Prereq: install the Claude CLI (Claude Code) and run `claude` to log in.
git clone https://github.com/CortexReach/smart_octopus.git && cd smart_octopus
pip install -r requirements.txt
cp .env.example .env # data-source keys only โ no model keys required
python main.py --serve-only # open http://127.0.0.1:8000, then type a tickerThe Home / Ask / Portfolio / AI-signals pages drive your local claude as the brain through the
astock-* skills โ manual analysis, task progress, history, Markdown reports, backtest, paper
portfolio, strategy editor, light / dark themes. The only optional key here is TICKFLOW_API_KEY
(A-share index & market-breadth data). Details โ harness guide ยท
A-share usage.
scripts/astock/run_routine.sh premarket # or: intraday | review | screen | analyzeTrading-day-gated; runs the matching astock-* skill headless via claude -p and logs to
reports/astock/_cron/. Wire it to cron / launchd on a machine where claude is logged in โ
this is the Claude-native replacement for a daily scheduler.
For environments without an interactive claude login (GitHub Actions, Docker, plain CI), the
original provider-based daily pipeline still ships. It needs one model API key + a push channel
instead of the Claude CLI:
python main.py --stocks 600519,hk00700,AAPL # provider pipeline, needs a model key in .envFork โ add Secrets (one model key such as GEMINI_API_KEY / AIHUBMIX_KEY / any
OPENAI_API_KEY-compatible service, one push channel, and STOCK_LIST) โ enable Actions. Runs
every trading day at 18:00 Beijing (cron: 0 10 * * 1-5). All model/provider and channel keys are
documented inline in .env.example.
| ๐ Smart Octopus | Closed AI-stock SaaS | A plain "LLM reads a stock" script | |
|---|---|---|---|
| Open-source (MIT) | โ | โ | usually โ |
| Self-hosted, data stays local | โ | โ | โ |
| Zero-cost via GitHub Actions | โ | โ | โ |
| Local Claude-CLI agent harness | โ | โ | โ |
| No model API keys (Claude subscription) | โ | โ | โ |
| 5 markets (A / HK / US / JP / KR) | โ | partial | partial |
| 6 push channels built-in | โ | partial | โ |
| Built-in market screener | โ InkSift | partial | โ |
| Editable strategy YAML (16 built-in) | โ | โ | โ |
| Web + desktop workstation | โ | varies | โ |
Smart Octopus treats your local Claude CLI as the analysis engine and the repo as its harness:
- Skills (
.claude/skills/astock-*) โ pre-open watchlist, single-stock deep dive, intraday watch, post-close review, market screen, and strategy learning. - Strategy YAML (
strategies/*.yaml) โ 16 declarative, editable strategies (MA cross, Chan theory, Elliott wave, trend, sentiment cycle, event-driven, growth, re-rating, hotspot, โฆ) the agent reads at analysis time. - Tools (
scripts/astock/*) โ quotes, market breadth, news, paper-trading, journaling, push โ each a deterministic JSON-in / JSON-out command the agent calls.
The web pages (Home / Ask / Screening / Copilot) are thin front-ends over this harness, so the same brain answers from the CLI, the API, the web, and scheduled agents. Details โ Claude harness guide.
| Coverage | |
|---|---|
| Markets | ๐จ๐ณ A-shares ยท ๐ญ๐ฐ Hong Kong ยท ๐บ๐ธ US ยท ๐ฏ๐ต Japan ยท ๐ฐ๐ท Korea |
| Data | quotes ยท K-lines ยท technicals ยท fund flow ยท chip distribution ยท fundamentals ยท news |
| Sources | TickFlow ยท AkShare ยท Tushare ยท Tencent ยท efinance ยท Baostock ยท Yahoo Finance โ priority + graceful fallback, field normalization |
| Push | WeCom ยท Feishu ยท Telegram ยท Discord ยท Slack ยท Email (+ PushPlus / ServerChan) |
A single data source failing degrades gracefully instead of taking down the whole analysis.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Markets โโโถโ Data providers TickFlow ยท AkShare ยท Tushare ยท YF โฆ โ
News โโโถโ (priority + graceful fallback, field normalization) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
InkSift โโโถโ Claude CLI harness (skills ยท strategies) โโโโถ Decision dashboard
screen โ multi-lens analysis ยท risk gates ยท action checklist โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
Web ยท Desktop ยท API โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโถ WeCom ยท Feishu ยท Telegram ยท Discord ยท Slack ยท Email
Shipped and running today:
- โ
Claude-CLI harness is the default brain โ web workstation + scheduled
astock-*routines, no model keys - โ Five markets ยท seven data sources with priority fallback
- โ Six push channels (WeCom / Feishu / Telegram / Discord / Slack / Email)
- โ Web + Electron desktop workstation (analysis, backtest, paper portfolio, alerts, config)
- โ Legacy LLM-provider pipeline retained for headless / CI (GitHub Actions zero-cost daily flow)
- ๐งช InkSift ๅขจ็ญ market screener โ experimental, improving
- ๐ญ Exploring: richer JP/KR calibration, broader catalyst taxonomy
Issues and PRs are welcome. Keep changes focused, tested, and consistent with the existing
contracts. If a change touches the report format or the web UI, attach before / after screenshots in
the PR description. The contributor rules live in AGENTS.md.
If Smart Octopus saved you an afternoon of wiring data sources and prompts together, give it a star โ it's the signal that keeps the project moving and helps others find it.
MIT License ยฉ 2026 chenjiyong. Attribution to this repository in derivative work is appreciated.
For learning and research only. Nothing here is investment advice. Markets carry risk; the authors are not liable for any losses incurred from using this project.




