Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

九章 · ALGOR | Multi-Agent Quant Research Terminal

多智能体量化投研平台 · A Local Multi-Agent Quant Research Terminal
实时行情 · 世界指数 · 市场情绪 · 量化筛选 · Real-time Quotes · Global Indices · Sentiment · Quant Screening


项目简介 | Introduction

九章 · ALGOR 是一套运行在你自己电脑上的股票 / 指数 / 资金 / 情绪终端。后端 server.py 整合多源财经数据与已安装的分析技能,前端 app.js 是一套暗色工业风单页应用(SPA)。它不依赖任何付费账号即可启动,所有数据在本地聚合,既能看真实行情,也能用大模型做情绪与策略聚合。品牌命名取自《九章算术》——中国古代数学之源,呼应"量化之本"。

JiuZhang · ALGOR is a stock / index / fund-flow / sentiment terminal that runs entirely on your own machine. The backend (server.py) integrates multiple financial data sources and installed analysis skills; the frontend (app.js) is a dark, industrial-style single-page app. It launches with zero paid accounts, aggregates everything locally, and blends real market data with LLM-powered sentiment and strategy synthesis. The name comes from The Nine Chapters on the Mathematical Art — the root of ancient Chinese mathematics, a nod to "the origin of quant".


项目特色 | Features

  • 实时行情(真实数据) | Real-time quotes (real data) — A股 / 港股 / 美股行情、盘口、K线、板块、成分股、涨跌家数、北向资金,全部来自 akshare 聚合的腾讯 / 同花顺 / 新浪 / 东方财富。
  • 世界指数地图 | Global index map — Leaflet 真实暗色底图 + 聚合,覆盖约 58 个全球指数,点击钻取指数详情与成分股。
  • 市场情绪 + 另类人群指数 | Market sentiment & alt indices — 恐惧贪婪指数、五维情绪,以及恐慌 / 宝妈 / 大学生 / 散户热度 / 机构北向等另类人群指数。
  • 量化筛选 | Quant screening — 多条件批量选股 / 选 ETF,支持策略标签与事件筛选,可叠加均线金叉、MACD 金叉、高股息、央企等常见因子。
  • 智能问财 + 宏观简报 | iWencai Q&A + macro brief — 自然语言问财、每日宏观数据追踪与通俗解读。
  • 多智能体后端 | Multi-agent backend — 各分析技能作为独立"智能体"协作,单接口失败自动回退确定性演示数据,永不白屏。
  • 零配置启动 | Zero-config launch — 作者原电脑双击 launch.py;其他电脑双击 start.bat / 运行 ./start.sh 自动装依赖。
  • 中英双语、开源可改 | Bilingual & open-source — MIT 协议,代码可自由使用、修改、分发。

功能截图 | Screenshots

1. 社媒情绪实时聚合 + 题材热点 | Social Sentiment & Theme Heatmap

实时聚合 StockTwits / Reddit / 雪球 / 百度 / 小红书 / 抖音 / X 等社媒情绪,并结合同花顺题材热点,快速捕捉市场关注焦点。

Real-time aggregation of social sentiment across StockTwits, Reddit, Xueqiu, Baidu, Xiaohongshu, Douyin and X, combined with Tonghuashun theme heatmap to capture market focus instantly.

Social Sentiment & Theme Heatmap

2. 量化筛选 / 策略回测 | Quant Screening & Strategy Backtest

按自定义条件、策略标签、事件、排行榜批量筛选股票与 ETF;支持 AI 生成策略与历史回测,覆盖均线、RSI、MACD、估值修复等多种经典因子。

Batch-screen stocks and ETFs by custom conditions, strategy tags, events and rankings; supports AI-generated strategies and historical backtests with classic factors like MA, RSI, MACD and valuation-reversion.

Quant Screening & Strategy Backtest

3. 宏观简报 · 每日财经 · 短线诊断 | Macro Brief, Daily Finance & Short-term Diagnosis

每日自动拉取 CPI、PPI、PMI、GDP、LPR、M2、社融、国债收益率等核心宏观指标,并附通俗解读,辅助短线与中线决策。

Daily auto-fetch of core macro indicators including CPI, PPI, PMI, GDP, LPR, M2, aggregate financing and government-bond yields, with plain-language explanations to assist short- and medium-term decisions.

Macro Brief

4. 世界主要指数地图 | Global Major Indices Map

基于 Leaflet 暗色底图的世界指数地图,约 58 个全球指数以聚合点呈现,支持滚轮缩放、拖拽与下钻;底部同步展示每日总情绪与盘前早报。

A dark Leaflet-based world map with ~58 global indices as clustered markers, supporting zoom, drag and drill-down; the bottom panel shows daily overall sentiment and the pre-market morning brief.

Global Major Indices Map

5. 市场情绪温度计 + 另类人群指数 | Market Sentiment Thermometer & Alt Indices

恐惧贪婪指数、五维情绪面板,以及面向不同人群的另类指数:恐慌指数、宝妈指数、大学生指数、散户热度、机构北向、情绪温度计等,让情绪不再凭感觉。

Fear & greed index, five-dimension sentiment panel, and alt indices for different crowds: panic, moms, students, retail heat, institutional northbound, sentiment thermometer — sentiment backed by data, not gut feeling.

Market Sentiment Thermometer & Alt Indices


快速开始 | Quick Start

作者原电脑(推荐)| Author's machine (recommended)

直接双击 launch.py —— 它会自动切换到受控的托管 Python,避开本机 V8 / Chromium 冲突。

Double-click launch.py — it auto-switches to the managed Python and avoids local V8 / Chromium conflicts.

其他电脑 / 新环境 | Other machines / fresh env

Windows

  1. 双击 start.bat
  2. 首次会自动安装依赖(1~3 分钟)
  3. 安装完成后浏览器访问 http://127.0.0.1:8000

macOS / Linux

  1. 打开终端,进入项目目录
  2. 运行 ./start.sh
  3. 首次会自动安装依赖(1~3 分钟)
  4. 浏览器访问 http://127.0.0.1:8000

注意事项 | Notes

  • 不要直接双击 index.htmlfile:// 下无法连接后端)。
  • 手机同 WiFi 可访问黑框里打印的 http://192.168.x.x:8000
  • 社媒抓取功能需要额外执行 python -m playwright install chromium 下载 Chromium(约 150MB)。

完整多设备部署、公网访问、常见问题见 部署教程.md

For full multi-device deployment, public access and FAQ, see 部署教程.md.


数据来源与实时边界 | Data & Real-time Boundary

  • 真实数据 | Real data:行情 / 盘口 / K线 / 指数 / 板块 / 成分股 / 涨跌家数 / 北向 = akshare(腾讯财经 / 同花顺 / 新浪 / 东方财富等)。
  • 模型聚合 | Model-synthesized:社媒情感 / 搜索热度 / 另类指数标注 model,非实时抓取。
  • 容错 | Fallback:任一接口失败自动回退确定性演示数据,并在返回中标注 source

⚠️ 安全须知 | Security Notice

本项目已配置 .gitignore以下文件不会进入版本库

The following files are excluded by .gitignore and will never be committed:

  • social_auth.json —— 你的真实社媒登录凭证,切勿手动添加或公开。Your real social-media credentials — never add or expose them.
  • .workbuddy/ —— 含本地记忆与项目内部数据。Local memory & internal project data.
  • __pycache__/*.pyc、运行时缓存(_universe_cache.json / market_report.json / pw_install.log)与部署临时目录 brand/

如需使用社媒抓取功能,请复制 social_auth.example.jsonsocial_auth.json 并填入自己的凭证(仅本地保留,不上传)。

To use social scraping, copy social_auth.example.json to social_auth.json and fill in your own credentials (local only, never uploaded).


联系我们 | Contact & Community

有任何问题、商务合作或产品反馈,欢迎通过微信公众号联系客服。

For questions, business cooperation or product feedback, please reach out via our WeChat official account.

微信公众号:小鱼总的小圈子
微信公众号 | WeChat Official Account
小鱼总的小圈子


开源协议 | License

MIT License —— 可自由使用、修改、分发,保留版权声明即可。

Free to use, modify and distribute with the copyright notice retained.


贡献 | Contributing

欢迎提 Issue / Pull Request。提交代码前请确认 git status不出现上述敏感文件。

Issues and PRs are welcome. Before committing, make sure git status does not list the sensitive files above.


目录结构 | Directory

terminal/
├── server.py            # 后端 HTTP 服务 + 多源数据整合 / backend & data hub
├── app.js / index.html / style.css   # 前端 SPA(暗色工业风)/ frontend SPA
├── launch.py            # 作者原电脑启动器 / author launcher
├── start.bat / start.sh # 其他电脑一键启动 / one-click launchers
├── requirements.txt     # Python 依赖 / dependencies
├── 部署教程.md          # 多端部署 + 公网访问 / deploy guide
├── assets/              # 截图与二维码 / screenshots & QR code
│   ├── screenshots/
│   └── wechat-qr-code.jpg
├── brand-screens/       # 宣传页用终端截图素材 / promo screenshots
├── jiuzhang-slides/     # 抖音宣传图(9:16)/ social promo images
└── jiuzhang.html / jiuzhang-mobile.html  # 品牌介绍页 / brand pages

更新日志 | Changelog

  • 2026-07-30 品牌升级:终端视觉对齐「九章 · 多智能体量化投研平台」宣传页,引入宋体 × Cinzel 字体、玉金点缀。
  • 2026-07-30 性能优化:Google Fonts 非阻塞加载,首屏 DOMContentLoaded 从 ~2s 降至 ~50ms;启用 HTTP/1.1 keep-alive,降低并发请求延迟。

本产品仅供研究学习,不构成投资建议。 / For research and education only, not investment advice.

Releases

Packages

Contributors

Languages