Loading...
Loading...
A-share Individual Stock In-depth Research System. When users mention phrases like "Analyze XXX stock", "Check XXX", "Research XXX", "Is XXX worth buying?", "How is XXX?", "XXX fundamentals", or directly provide a 6-digit A-share stock code (starting with 000/001/002/300/301/600/601/603/605/688), a three-phase process is automatically triggered: Phase 1 Data Collection (K-line/Financials/Shareholders) → Phase 2 Step 0-8 In-depth Analysis (Industrial Chain/Elasticity/Valuation/Risk-Reward Ratio/Stop-loss Signal) → Phase 3 Handwritten HTML Research Report. The generated results are data.json + report.md + report.html under output/<Stock Name>_<Code>/<YYYY-MM-DD>/. This tool is for research reference only, does not constitute securities investment consulting business, and does not constitute investment advice.
npx skill4agent add aurix-labs/thesis-builder stock-analysisoutput/.../data_inventory.mdoutput/.../anomalies.md| User's Input | Triggered |
|---|---|
| ✓ |
| ✓ |
| ✓ |
| How are BYD's fundamentals? | ✓ |
| ✓ |
Phase 1 Data Collection
└─ Automatic chaining at the end of fetch_data.py:
build_inventory.py → data_inventory.md
scan_anomalies.py → anomalies.{json,md}
Phase 1.5 Data Checkpoint
└─ Agent must read data_inventory.md + anomalies.md
└─ ❌ Missing fields must be supplemented via web_fetch or explicitly marked [GAP]
└─ CRITICAL anomalies must be fully discussed in Step 0.5
Phase 2 In-depth Analysis (Three-section Check System + Tags)
§1 (Step 0, 0.5, 1, 2) → part1 → verify_facts.py --partial part1
§2 (Step 3, 4, 5) → part2 → verify_facts.py --partial part2
§3 (Step 6, 7, 8) → part3 → verify_facts.py --partial part3
Merge: cat part*.md > report.md
Phase 2.5 Fact-checker
└─ verify_facts.py FULL → Must have 0 FAIL
└─ Task(general-purpose subagent) → fact-check-report.md
└─ FAIL items must be edited and re-run (max 3 rounds)
Phase 2.6 Bear-case
└─ Task(general-purpose subagent) → bear-case.md
└─ Append to report.md as a new section
Phase 3 HTML Writing in 6 Batches
└─ verify_html.sh (includes verify_content.py) → 0 FAIL
└─ Delete intermediate products _h_part*.htmlYou are a reviewer. Check the numerical accuracy and inference rationality of report.md.
【Input】report.md / data.json / anomalies.md (path in current output directory)
【Tasks】
1. Sample 20 [F:] tags, verify the accuracy, unit and context of each value one by one
2. Check if the basis for all [I:] inferences is reasonable (broad reasons like "industry common sense · leading position" are not acceptable)
3. Check if the multiplication table for all [T:] target prices is self-consistent
4. Identify anomalies in anomalies.md that are not fully discussed in the report
5. Find internal contradictions in the report
【Output】fact-check-report.md
- PASS: N / FAIL: M / WARN: K
- Each FAIL item must include: location + problem description + repair instructionYou are a bearish analyst. Based on report.md and anomalies.md, write a 300-500 word opposing view.
【Tasks】
1. Find 3 pieces of negative evidence that the main agent did not fully discuss
2. Provide specific paths for "if the bullish view is wrong, where is it wrong"
3. Refute key [I:] inferences in the report
4. Propose 3 observable indicators: "if signal X appears, the bearish view is confirmed"
【Output】bear-case.md (no tags required)
- Must cite at least 2 IDs from anomalies.md| Method | Command |
|---|---|
| akshare reference script | |
| Financial MCP | Direct call by agent |
| web_fetch | Agent crawls public pages from Xueqiu/Eastmoney on its own |
| Manual upload | User provides CSV/JSON |
output/<Stock Name>_<Code>/<YYYY-MM-DD>/data.json| Section | Included Steps | Output |
|---|---|---|
| §1 | Step 0-2 (Task/Macro/Industrial Chain) | |
| §2 | Step 3-5 (Company Quality/Elasticity/Risk) | |
| §3 | Step 6-8 (Valuation/Benchmarking/Tracking Conclusion) | |
| Merge | — | |
✅ §X Completed (XX lines / Step A-B)output/<Stock Name>_<Code>/latest/python -c| Batch | Content | Main Grep Verification |
|---|---|---|
| 0 | DOCTYPE + head + style (fully copy | |
| 1 | body + nav + compliance + hero + conclusion-top + profile | 13 anchors in nav, 4 hero-meta, compliance-banner exists |
| 2 | financial-grid + K-line + Step 0-3 | Four ids mission/macro/chain/quality exist |
| 3 | Step 4-6 (Elasticity/Risk/Valuation) | Three ids elasticity/risk/valuation exist |
| 4 | Step 7-8 + Summary Box + footer | // CONCLUSION exists, |
| 5 | script (fully copy | |
| Merge | | All PASS |
output/
└── <Stock Name>_<Code>/
├── <YYYY-MM-DD>/
│ ├── data.json # Phase 1
│ ├── report.md.part1-3 # Intermediate products of Phase 2
│ ├── report.md # Merged final version of Phase 2
│ ├── _h_part0-5.html # Intermediate products of Phase 3
│ └── report.html # Final deliverable
└── latest -> <YYYY-MM-DD> # Symbolic link| # | Prohibited | Reason |
|---|---|---|
| 1 | Generate HTML markup with Python | Escape chaos, difficult to maintain |
| 2 | Write multi-line HTML with Bash heredoc | EOF matching failure is easy to occur |
| 3 | Skip/simplify any Step | The complete framework is indispensable |
| 4 | Use [open, high, low, close] for OHLC | Does not match ECharts default |
| 5 | Use double backslash | Delimiter matching failure |
| 6 | Mix gold color for accent / multi-color score-fill gradient | Violates Linear Terminal+ design |
| 7 | Use | Violates pure Mono footer specification |
| 8 | Output to old path | Should use |
| 9 | Write complete HTML at once | Must split into 6 batches, each batch ≤300 lines |
| 11 | Numbers in the report without [F]/[C]/[I]/[T]/[GAP] tags | verify_facts FAIL, cannot enter Phase 3 |
| 12 | Skip fact-checker or bear-case sub-agent | Multi-agent defense depth fails |
| 13 | Display A/B/C letter ratings in hero meta | v3.1 uses |
| 14 | Reappear 5-dimensional comprehensive score in Step 8 | Cancelled, only qualitative conclusions are retained |