# How the Industry-Funnel Skill Reduces 30-60 Stocks to 3 Final Picks

> Learn how the industry-funnel skill refines 30-60 stocks to 3 final picks using a four-stage workflow and objective value criteria for smarter investing.

- Repository: [Xbt Lin/ai-berkshire](https://github.com/xbtlin/ai-berkshire)
- Tags: deep-dive
- Published: 2026-07-25

---

**The industry-funnel skill implements a four-stage hard-filter workflow that systematically narrows a broad market universe of 30-60 securities down to three investment-ready candidates through objective value criteria, structured deep-dives, and portfolio complementarity analysis.**

The **industry-funnel skill** in the `xbtlin/ai-berkshire` repository provides a systematic stock selection pipeline inspired by Warren Buffett-style value investing. According to the source code in [[`skills/industry-funnel.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/industry-funnel.md)](https://github.com/xbtlin/ai-berkshire/blob/main/skills/industry-funnel.md), this skill transforms raw market data into curated investment recommendations by enforcing transparent elimination criteria at every stage.

## Stage 1: Full-Market Universe Generation

The workflow begins by aggregating every relevant ticker across A-shares, Hong Kong, U.S., and private-company pipelines. The skill constructs three distinct sets and takes their union:

- **Active-trade set (A)**: Top 30 securities by 30-day average turnover per market
- **Momentum set (B)**: Union of top 20 gainers over 30-day and 90-day windows
- **Market-cap set (C)**: Industry-wide top 30 by market capitalization

The **union A ∪ B ∪ C** produces the initial universe of **30-60 stocks** that enters the filtering pipeline.

## Stage 2: Value-Investing Hard-Filters

This stage applies five objective financial criteria plus a qualitative moat assessment. According to the skill definition, only securities meeting **all five criteria** (or four plus one "near-miss") survive:

1. **PE ratio**: Must be reasonable versus peers, or PEG < 1.5
2. **ROE**: Greater than 15% (or demonstrating clear improvement)
3. **Operating Cash Flow**: Exceeds 70% of net profit
4. **Debt/Equity**: Below 60% (relaxed to 70% for utilities)
5. **Moat Rating**: Minimum three stars (★★★) based on brand, network effects, scale, technology, or cost advantages

This hard-filter typically reduces the universe to **≤10 candidates**. Every eliminated stock is logged with a concise "淘汰理由" (elimination reason), creating a transparent audit trail.

## Stage 3: Structured Deep-Dive Analysis

Each surviving candidate undergoes a template-driven analysis producing 300-500 word reports. The structured template forces analysts to examine:

- Business model sustainability
- Financial quality indicators
- Moat depth and durability
- Top-three risk factors
- Valuation snapshot

This stage surfaces hidden weaknesses that quantitative filters might miss, maintaining the candidate pool at ≤10 while enriching the data for final selection.

## Stage 4: Four-Master Final Review

The ultimate reduction to **three final picks** relies on portfolio complementarity rather than pure scoring. The skill mandates:

- At least one "high-certainty, low-elasticity" position (classic Buffett style)
- At least one "medium-certainty, medium-elasticity" position (growth style)
- Optional "high-elasticity, high-risk" position (option style)

If a sector lacks three viable candidates, the skill recommends a "2 + 1 observation" structure rather than forcing a poor fit.

## Executing the Industry-Funnel Skill

Invoke the skill through the repository's command-line interface:

```bash
python3 ai_berkshire.py /industry-funnel "AI Compute"

```

The tool outputs a filtered table after Stage 2 displaying the five hard-filter pass/fail flags:

```markdown
| 公司 | PE | ROE | 现金流/净利 | 负债率 | 护城河 | 综合 | 留/弃 | 淘汰理由 |
|------|-----|-----|------------|--------|--------|------|-------|----------|
| NVIDIA | 28 | 31% | 85% | 38% | ★★★★ | ✔ | ✔ | – |
| XYZ   | 110| 4%  | 45% | 75% | ★★   | ✖ | ✖ | PE過高、護城河不足 |

```

Final recommendations are written to timestamped reports:

```bash
$ cat reports/AI_Compute-funnel-20260725.md

## 终选 3 家

| 公司 | 类型 | 推荐度 | 仓位 | 核心逻辑 | 关键风险 |
|------|------|--------|------|----------|----------|
| NVIDIA | 核心 | ★★★★★ | 55% | AI 生态龙头、护城河稳固 | 半导体周期、地缘风险 |
| 海光信息 | 卫星 | ★★★★☆ | 30% | 光模块增长、技术壁垒 | 客户集中、产能扩张 |
| XYZ | 期权 | ★★★☆☆ | 15% | 高弹性、转型潜力 | 研发失控、利润波动 |

```

The skill automatically appends a "数据抽检" (data spot-check) block that can be validated using the audit utility:

```bash
python3 tools/report_audit.py reports/AI_Compute-funnel-20260725.md

```

## Source Files and Configuration

| File | Purpose |
|------|---------|
| [`skills/industry-funnel.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/industry-funnel.md) | Canonical workflow definition, filter thresholds, and output templates |
| [`codex-skills/industry-funnel/SKILL.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-skills/industry-funnel/SKILL.md) | Generated Codex artifact for Claude Code integration |
| [`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py) | Validation utility for the final data spot-check step |
| [`codex-prompts/industry-funnel.md`](https://github.com/xbtlin/ai-berkshire/blob/main/codex-prompts/industry-funnel.md) | Prompt template for Codex-compatible environments |

These files implement the complete reduction pipeline, from the initial market scan in [[`skills/industry-funnel.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/industry-funnel.md)](https://github.com/xbtlin/ai-berkshire/blob/main/skills/industry-funnel.md) to the audit trail validation in [[`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py)](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py).

## Summary

- **Four-stage reduction**: Systematically filters 30-60 stocks to ≤10, then to 3 through objective criteria and qualitative analysis.
- **Hard-filter discipline**: Enforces strict PE, ROE, cash flow, debt, and moat requirements that eliminate subjective bias.
- **Transparent audit trail**: Every eliminated candidate receives a documented "elimination reason" preventing black-box decisions.
- **Portfolio-aware selection**: Final picks prioritize complementarity across certainty/elasticity profiles rather than standalone scores.

## Frequently Asked Questions

### What happens if fewer than three stocks pass the hard-filters?

The skill adopts a "2 + 1 observation" model rather than forcing poor fits. It selects only the viable candidates that meet the quality criteria and explicitly flags the shortfall for analyst review, maintaining discipline over completeness.

### How is the moat rating determined in Stage 2?

The rating evaluates five dimensions defined in the skill configuration: brand strength, network effects, scale advantages, technology barriers, and cost structure. A security must achieve a minimum of three stars (★★★) to satisfy the filter, with four or five stars preferred for "core" positions.

### Can the hard-filter thresholds be customized for specific industries?

Yes, the debt-to-equity threshold automatically adjusts to 70% for utility companies while remaining at 60% for other sectors. Additional industry-specific adjustments can be configured in the filter logic within [`skills/industry-funnel.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/industry-funnel.md).

### Where does the skill store the elimination audit trail?

The audit trail is embedded directly in the intermediate output tables and final report files under `reports/{Sector}-funnel-YYYYMMDD.md`. Each eliminated stock includes a specific "淘汰理由" column entry that can be extracted for compliance review or strategy backtesting.