Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
龟龟策略的claude code/cowork workflow和对应的screener,需要tushareapi
| Date | Stars |
|---|---|
| 2026-07-31 | 310 |
| 2026-08-05 | 316 |
| 2026-08-06 | 316 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# 龟龟投资框架 (Turtle Investment Framework)
AI 辅助的 A 股/港股/美股基本面分析系统。混合架构:Python 脚本完成确定性数据采集,LLM 提示词驱动定性分析与多因子评估。
> **当前版本:v2.0-beta** — PDF-first 单 Agent 架构 + 独立估值模块 + Pre-flight 合并 + 实战验证。详见 [CHANGELOG_V2.md](CHANGELOG_V2.md)。
## 核心功能
| 模块 | 名称 | 实现方式 | 说明 |
|------|------|----------|------|
| 龟龟策略 | 穿透回报率 + 估值 | 共享定性 + 专属定量 | 完整四因子分析 → 买入/观察/规避 |
| 商业分析 | 6 维度定性评估 | PDF-first 单 Agent | 年报 PDF 作主数据源 + Greenwald 护城河 |
| 估值分析 | 多方法估值 | Python 引擎 + LLM | DCF/DDM/PE Band/PEG/PS 自动分类 |
| 数据采集 | Tushare + WebSearch | Python + Agent | A/港/美股,24+ API,5 年财务数据 |
| 年报解析 | PDF 章节提取 | Python / pdfplumber | 7 个目标章节 + 附注精提取 |
| 选股器 | 龟龟选股器 | Python / 两级筛选 | Tier 1 批量过滤 + Tier 2 深度分析 |
| 报告输出 | MD + HTML 双输出 | Jinja2 模板 | 暗色模式、KPI 卡片、语义色彩标签 |
## 系统架构 (v2.0)
v2.0 采用 **共享模块 + 策略专属模块** 的分层架构,定性分析可独立运行或被不同策略复用。
### 龟龟策略完整流程
```
用户输入 (股票代码 + 年报PDF)
│
┌────▼────┐
│ Phase 0 │ 自动下载年报 (/download-report)
└────┬────┘
│
┌────▼────┬──────────────┐
│Phase 1A │ Phase 2A │ ← 并行运行
│Tushare │ PDF预处理 │
│数据采集 │ (pdfplumber) │
└────┬────┴──────┬───────┘
│ │
┌────▼────┐ │
│Phase 1B │ │
│WebSearch│ │
└────┬────┘ │
│ ┌────▼────┐
│ │Phase 2B │
│ │精提取 │
└──┬───┴────┬────┘
│ │
┌────▼────────▼────┐
│ Phase 3 │
│ 定性(共享) + │
│ 定量 + 估值(龟龟) │
└──────┬───────────┘
│
output/{code}_分析报告.md + .html
```
### 独立商业分析流程(PDF-first 单 Agent)
```
/business-analysis {code}
│
┌────▼────────────────┐
│ 年报 PDF 下载/缓存 │ glob 检查 → 按需下载
└────┬────────────────┘
│
┌────▼────────────────┐
│ Tushare 数据采集 │ 历史序列补充(§1–§17)
└────┬────────────────┘
│
┌────▼────────────────┐
│ 单 Agent 定性分析 │ PDF 直接载入 1M context
│ D1–D6 全维度 │ 交叉验证优于多 Agent 拆分
└────┬────────────────┘
│
report.md + report.html
```
### 各阶段角色
- **Phase 0** — 调用 `/download-report` 命令自动搜索并下载最新年报 PDF
- **Phase 1A** — `tushare_collector.py` 通过 Tushare Pro API 采集结构化数据,输出 `data_pack_market.md`(含 §1–§17 共 17 个数据段)
- **Phase 1B** — Agent 执行 WebSearch 补充治理/行业/子公司等非结构化信息
- **Phase 2A** — `pdf_preprocessor.py` 使用关键词匹配定位年报 7 个目标章节,输出 `pdf_sections.json`
- **Phase 2B** — Agent 从 PDF 章节中精确提取附注数据
- **Phase 3** — 定性分析(PDF-first 单 Agent)+ 定量分析(含 Pre-flight Step 0)+ 估值(龟龟专属),输出 MD + HTML 双格式报告
## 快速开始
### 环境要求
- Python >= 3.10
- [Tushare Pro](https://tushare.pro/) 账号及 API Token
- (可选)pdfplumber 用于 PDF 解析
- (内置)`/download-report` 命令用于自动下载年报
### 安装
**首次安装:**
```bash
git clone https://github.com/terancejiang/Turtle_investment_framework.git
cd Turtle_investment_framework
# 一键初始化(创建 venv、安装依赖、验证环境)
bash init.sh
```
**更新已有项目:**
```bash
cd Turtle_investment_framework
git pull
# 重新安装依赖(确保新增的包被安装)
bash init.sh --force-install
```
`init.sh` 会自动完成:
1. 查找系统中 Python >= 3.10,创建 `.venv`
2. 安装 `requirements.txt` 中的依赖
3. 检查 `TUSHARE_TOKEN` 环境变量
4. 运行测试验证环境
### 配置 Tushare Token
```bash
cp .env.sample .env
# 编辑 .env,填入你的 Token
# TUSHARE_TOKEN=your_token_here
```
或者直接设置环境变量:
```bash
export TUSHARE_TOKEN='your_token_here'
```
## 使用方法
### 单股分析
在 [Claude Code](https://claude.com/claude-code) 中使用 slash command:
```
/turtle-analysis 600887 # 完整龟龟策略(定性 + 定量 + 估值)
/business-analysis 600887 # 独立商业分析(PDF-first 6维度定性评估)
/valuation 600887 # 独立估值分析(自动分类 + 多方法估值)
```
`/turtle-analysis` 自动执行 Phase 0 → 1A → 1B → 2A → 2B → 3 完整流程。
`/business-analysis` PDF-first 单 Agent 定性分析(年报 PDF + Tushare 数据)。
`/valuation` 独立估值分析,需先运行 `/business-analysis`(依赖定性报告 + 市场数据)。
### 数据采集(仅 Phase 1A)
```bash
# 基本用法
.venv/bin/python scripts/tushare_collector.py --code 600887.SH
# 指定输出路径
.venv/bin/python scripts/tushare_collector.py --code 600887.SH --output output/data_pack_market.md
# 附加额外字段
.venv/bin/python scripts/tushare_collector.py --code 00700.HK --extra-fields balancesheet.defer_tax_assets
# 试运行Excerpt of 15,059 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:5b14786582ec7839, llm:description: '龟龟策略的claude code/cowork workflow和对应的screener,需要tushareapi' (Chinese) — indicates trading strategy (Turtle strategy), screener, uses Tushare API, Claude code/workflow
matched fp:5b14786582ec7839, llm:description: '龟龟策略的claude code/cowork workflow和对应的screener,需要tushareapi' (Chinese) — indicates trading strategy (Turtle strategy), screener, uses Tushare API, Claude code/workflow
matched fp:5b14786582ec7839, llm:description: '龟龟策略的claude code/cowork workflow和对应的screener,需要tushareapi' (Chinese) — indicates trading strategy (Turtle strategy), screener, uses Tushare API, Claude code/workflow