Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By quantskillsGPL-3.0In 1 marketplace
PandaData-only point-in-time Buffett moat hard screener for A-shares.
Claude hands work to one, or you mention it with @.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Lavine Version · 量枢院 Q44
基于 PandaData 点时证据,对沪深 A 股执行可审计、可复现、缺失即拒绝的巴菲特护城河硬筛选。
English · 简体中文
这个 Skill 实现的是硬条件交集,不是软评分,也不是“差不多合格”的候选推荐器。
insufficient_data,不会填零或猜测。if_adjusted、TTM 组成日期和规则检查结果。当前生产范围是沪深市场,即
.SH与.SZ。CLI 使用语义明确的--all-sh-sz;北交所不在本版本范围内。
flowchart LR
A[决策日期 / 股票池] --> B[PandaData 点时取证]
B --> C[财报历史版本选择]
B --> D[当时有效行业]
B --> E[最近有效价格]
C --> F[十年 ROE / ROA 与毛利率]
C --> G[CapEx / 债务 / TTM EPS]
E --> H[Point-in-time PE]
F --> I[硬规则引擎]
G --> I
H --> I
D --> I
I --> J[pass / fail / insufficient_data]
J --> K[JSON / Production Parquet]
| 维度 | 硬条件 |
|---|---|
| 最新 ROE | >= 15% |
| 十年 ROE 下限 | 最近连续十年每年 >= 12% |
| 最新毛利率 | >= 40% |
| 毛利率稳定性 | 十年总体标准差 < 10% |
| 盈利 | 归母净利润 > 0 |
| 资本开支 | abs(CapEx) / 归母净利润 < 30% |
| 长期有息负债 | 长期借款 + 应付债券 + 一年内到期非流动负债,除以归母净利润 < 4 |
| 估值 | Point-in-time TTM PE > 0 且 < 25 |
银行不套用工业企业的毛利率、CapEx 和长期债务门槛:
| 维度 | 硬条件 |
|---|---|
| 最新 ROA | >= 1% |
| 十年 ROA 下限 | 最近连续十年每年 >= 0.6% |
| 盈利 | 归母净利润 > 0 |
| 估值 | Point-in-time TTM PE > 0 且 < 25 |
| 状态 | 含义 |
|---|---|
pass | 所有适用硬规则均通过,可进入筛选结果。 |
fail | 数据完整,但至少一条适用规则明确失败。 |
insufficient_data | 数据缺失、日期非法、行业未知、历史断档或版本冲突,拒绝推断。 |
非正利润或非正 EPS 是已知规则失败,不会被误报为数据缺失。
git clone https://github.com/lavine888/skill-buffett-moat-screener.git
Set-Location skill-buffett-moat-screener
python -m pip install -r requirements.txt
$env:PANDA_DATA_USERNAME = "your-account"
$env:PANDA_DATA_PASSWORD = "your-password"
两份依赖文件的用途:
requirements.txt:运行时依赖,运行筛选 CLI、规则引擎、PandaData 提供者与 JSON/Parquet 物化所需;requirements-dev.txt:开发与测试依赖,在运行时依赖之外追加 pytest,仅本地开发、pytest 与 CI 校验使用。python scripts/build.py `
--as-of 20251231 `
--symbols 600519.SH 000001.SZ `
--json-output output/sample.json `
--parquet-output output/sample.parquet
CSV 需要包含 symbol 列;文本文件则每行一个代码。
python scripts/build.py `
--as-of 20251231 `
--symbols-file universe.csv `
--cache-dir output/panda-cache `
--request-interval 1.2 `
--workers 8 `
--json-output output/screen.json `
--parquet-output output/screen.parquet
python scripts/build.py `
--as-of 20251231 `
--all-sh-sz `
--cache-dir output/panda-cache `
--request-interval 1.2 `
--workers 8 `
--json-output output/screen-20251231.json `
--parquet-output production/database.parquet
请求缓存按 API、参数、SDK、接口环境、匿名账号和字段契约隔离。中断或限流后重复同一命令即可复用已完成请求。
counts:三态数量;diagnostics:数据不足原因、失败规则、行业和价格覆盖;selected_symbols:通过全部硬规则的代码;dataset_version、universe_hash、source_snapshot;runtime_versions 与规则配置哈希。true / false / null;主键为 trade_date + factor_id + symbol。默认写入执行 upsert 并保留其他日期;子集运行不能写 canonical production/database.parquet,整库替换必须显式使用 --replace-production。
python scripts/validate.py output/screen-20251231.json
python scripts/validate.py production/database.parquet
2025-12-31、规则与 schema 1.2.0:
| 指标 | 数量 |
|---|---|
| 沪深股票池 | 5,182 |
pass | 17 |
fail | 3,386 |
insufficient_data | 1,779 |
| 价格证据覆盖 | 5,182 / 5,182 |
| 行业证据覆盖 | 5,180 / 5,182 |
该快照用于验证全市场执行、数据质量诊断和生产契约,不代表历史收益或投资建议。生成的全市场数据、缓存与 Parquet 默认不进入 Git。
python -m pip install -r requirements-dev.txt
python -m pytest -q
node scripts/validate-qsh-form.mjs SKILL.md
当前包含 37 项测试,覆盖:
if_adjusted;lavine_buffett/ 核心规则、PandaData、服务、物化、年度诊断
scripts/ build / validate / backtest 标准入口
tests/ 规则、provider、服务、生产契约测试
references/ 字段口径、方法冻结、数据源边界
production/SKILL.md 生产结果读取契约
SKILL.md Agent Skill 入口与 qsh-form
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
buffett-moat-screener-lavine-version@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin buffett-moat-screener-lavine-versionPlugins from other owners that cover similar ground