AI Investment System · Phase 4 · Day 4

5 stocks, 1 industry, real ranking

When the system says Wuliangye beats Kweichow Moutai, you have to listen to the data.

August 4, 2026 · Shanghai · 12 minute read

Yesterday's two articles built a 7-dimension scoring system and connected it to real akshare data. Today I added a Peer Comparison Agent — a 36th LLM call that takes 5 stocks' full briefs and produces a ranking table, a 4-tier stock-picking recommendation, and a portfolio allocation. Then I ran it on the 5 baijiu (white liquor) leaders.

The result was uncomfortable in the best possible way: the system ranked Wuliangye above Kweichow Moutai. Not because the model has a preference. Because Wuliangye's Q1 2026 revenue grew +33.7% and Moutai's only grew +6.5%. Real numbers, in a real report, rank Wuliangye higher. The system did what it was designed to do — and that meant disagreeing with the default mental model most China investors carry.

What changed structurally

Phase 1-3 analyzed one stock at a time. Phase 4 added a meta-layer: a Peer Comparison Agent that takes 5 stocks' briefs, scores them on the same 7 dimensions, ranks them, and produces actionable output. The architecture is still LangGraph multi-agent — but with a 36th agent that synthesizes cross-stock insights. The signal is no longer "how is this stock?"; it's "how does this stock rank within its peer group?".

· · ·

§ 1 · The peer comparison problem

A single-stock 7-dimension brief is useful, but it has a fundamental limitation: it gives you no basis for relative judgment. If I tell you Moutai scores 5.4 out of 10, is that good? You don't know. You need to know: better than whom? Worse than whom? At what price?

Real stock-picking is always a ranking problem. The investment question is not "is Moutai good?" — it's "is Moutai better than Wuliangye for my 100万 allocation right now?" The system needs to answer that directly.

The Peer Comparison Agent is a 36th node in the LangGraph graph. It receives 5 stocks' 7-dimension briefs as input, and produces 4 outputs: a ranking table, a 4-tier stock-picking recommendation, 3-5 cross-stock insights, and a portfolio allocation suggestion. The agent doesn't re-analyze any stock — it takes the 5 briefs as ground truth and produces a synthesis.

1.1 · Why a separate agent, not just "compare in a prompt"

I considered a simpler design: after each stock's 7-dimension brief, run a "comparison prompt" that asks the LLM to rank them. I rejected this because each comparison prompt would have to include all 5 briefs, which gets expensive fast and creates a long context window. A dedicated Peer Comparison Agent is cleaner: it runs once at the end, with all 5 briefs in one prompt, producing one structured output.

The prompt design

The Peer Comparison Agent prompt is straightforward: "Here are 5 stocks' 7-dimension briefs. Output a ranking table, a 4-tier recommendation (strongly recommend / allocate / wait / avoid), 3-5 cross-stock insights, and a portfolio allocation for 100万. Be data-driven, not vibes-driven."

The output is unconstrained prose. I rely on the LLM to structure it sensibly, and I do basic parsing on the markdown table to verify the ranking matches the weighted scores.

§ 2 · The 5 baijiu leaders, real data

I picked baijiu for the first peer comparison because it's a classic 5-stock sector with clear hierarchy: Moutai (#1 by reputation), Wuliangye (#2), Luzhou Laojiao (#3), Fenjiu (#4), Yanghe (#5). All five have public Q1 2026 financials, all five are heavily covered by analysts, and all five have public data accessible via akshare.

Here's what the system saw for Q1 2026, in real numbers:

StockTickerRevenue Q1Revenue YoYNet Profit Q1Net Profit YoY
Wuliangye000858¥22.84 B+33.7%¥8.06 B+82.6%
Moutai600519¥53.91 B+6.5%¥27.24 B+1.5%
Luzhou Laojiao000568¥8.03 B−14.2%¥3.71 B−19.2%
Fenjiu600809¥14.92 B−9.7%¥5.38 B−19.0%
Yanghe002304¥8.19 B−26.0%¥2.45 B−32.7%

Two things stand out before any LLM analysis. First, Wuliangye is growing 5x faster than Moutai in revenue (33.7% vs 6.5%) and 50x faster in profit (82.6% vs 1.5%). This is a real signal, not noise. Second, the bottom three — Laojiao, Fenjiu, Yanghe — are all in revenue/profit decline. The baijiu sector isn't a uniform "good defensive industry" — it's splitting at the top, with the top 2 still growing and the bottom 3 deteriorating.

The Moutai-vs-Wuliangye tension

Moutai is 6.4x larger than Wuliangye by revenue (¥53.91B vs ¥22.84B). Moutai is the "obvious" choice. But the growth rates reverse the signal: Wuliangye is the one accelerating while Moutai is decelerating. For a growth-oriented investor, Wuliangye wins. For a stability-oriented investor, Moutai wins. The system can't tell you which you should be — but it can give you the data to decide.

§ 3 · The 7-dimension scoring (real numbers, no LLM 5/5/5/5)

Phase 4 has a subtle bug from Phase 2.5's evolution: the 4 LLM-backed dimensions (sentiment / industry / policy / macro) were scored by the aggregator as placeholders (5/5/5/5) in the peer comparison. That meant the system was only using 3 of 7 dimensions for ranking. I fixed this — the 4 LLM dimensions now output structured JSON scores (1-10) inside each brief, and the system parses them. The result is a real 7-dimension score for each stock.

StockWeightedFundTechCapitalSentIndPolMacro
Wuliangye 🥇6.39455985
Moutai 🥈5.45535995
Laojiao ⚠️5.01655885
Fenjiu 🚫4.92455895
Yanghe 🚫4.31345895

The real-data scoring tells a much more interesting story than placeholder 5/5/5/5 would have. Three observations:

  1. Wuliangye wins on fundamentals (9 vs Moutai's 5). The 33.7% revenue growth is a clean 4-point lift over Moutai's 6.5%. This is the single most important difference in the entire ranking.
  2. Moutai wins on policy and industry positioning (both 9). This is correct — Moutai's brand, distribution moat, and political connections are real, and the LLM correctly recognizes them even when the numbers are weak.
  3. Laojiao and Yanghe both get fundamentals 1/10 (revenue −14.2% / −26.0%, net profit −19.2% / −32.7%). The real data red-lines them. Even if technicals are 6 and policy is 8, the fundamental weight (20%) drags the weighted score below 5.5.

Why Phase 4 v2 (real scores) > Phase 4 v1 (placeholders)

v1 used 5/5/5/5 for the 4 LLM dimensions. The weighted scores were compressed (5.6 / 4.6 / 4.4 / 4.2 / 3.6) — only 2.0 points spread. v2 uses real JSON scores, the spread becomes 6.3 / 5.4 / 5.0 / 4.9 / 4.3 — same ranking but a more honest 2.0-point spread. The bug wasn't changing the ranking; it was compressing the signal.

§ 4 · The Peer Comparison Agent output

Here's the system output, verbatim (lightly edited for length):

## 段 2 · 选股建议 (4 档)

- 🥇 强烈推荐 (Top 1): 000858 五粮液
  加权分 6.3, 多维度表现均衡, 行业支持强, 情绪面有望修复.

- 🥈 可以配置 (Top 2-3): 600519 贵州茅台
  加权分 5.4, 政策面和行业面强, 但情绪面和资金面偏弱.

- ⚠️ 谨慎观望 (中位): 000568 泸州老窖
  加权分 5.0, 行业面和资金面较强, 但基本面较弱.

- 🚫 暂时回避 (末位): 600809 山西汾酒 和 002304 洋河股份
  山西汾酒加权分 4.9; 洋河股份加权分 4.3, 净利润下降.

Three observations about this output:

The Wuliangye-over-Moutai call is real and defensible. The agent didn't say "Wuliangye is bigger" — it didn't. It said "Wuliangye has the strongest fundamentals (9/10) backed by +33.7% revenue growth, while Moutai's fundamentals are slowing (5/10) at +6.5%." The LLM looked at the actual data and produced a defensible ranking.

Yanghe gets explicitly avoided — not because the agent is anti-Yanghe, but because the data is unambiguous: revenue −26.0%, net profit −32.7%, weighted score 4.3 (lowest of the 5). The "暂时回避" label is earned by the numbers.

Fenjiu drops to "avoid" tier even though its fundamentals (2/10) are slightly better than Laojiao (1/10) and Yanghe (1/10). The reason: Fenjiu's weighted score is 4.9, just below the 5.0 wait-line. The boundary is thin, but the agent flagged it. This is exactly the kind of edge-case decision the scoring rubric was designed to make explicit.

What the agent didn't say (and why that matters)

The agent did not say: "Moutai is overvalued" or "Wuliangye is the next 10-bagger" or "Yanghe is a turnaround play." It only said: based on the 7-dimension scoring, here is the ranking, here is the 4-tier recommendation, here are the cross-stock insights, here is a portfolio allocation. The system doesn't pretend to know the future price of any stock. It tells you what the data says today, and lets you decide.

§ 5 · The cross-stock insights (the most useful output)

The Peer Comparison Agent's 段 3 (cross-stock insights) is the section I find most useful in practice. For this run, it produced 5 insights:

  1. Strongest vs weakest gap: Wuliangye's fundamentals + industry + policy support combine for a 6.3 weighted score. Yanghe's fundamentals 1/10 + net profit −32.7% + weakest sentiment drag it to 4.3. The 2.0-point spread is real and data-supported.
  2. Industry-level signal: Top 2 (Moutai + Wuliangye) are growing, bottom 3 (Laojiao + Fenjiu + Yanghe) are declining. The baijiu sector is splitting, not uniformly healthy. This is visible in the data, but the LLM explicitly named the phenomenon.
  3. Valuation tier (qualitative): Without PE/PB data, the agent correctly noted that Moutai + Wuliangye "as industry leaders" likely have higher valuations; the bottom 3 are "cheaper but with reasons." This is honest about the limits of the data.
  4. Growth tier: Wuliangye +33.7% revenue is the standout. Moutai at +6.5% is a clear deceleration. The bottom 3 are all negative.
  5. Common systemic risks: Macro volatility, consumption tax changes, anti-corruption policy risk, increased competition from emerging brands, sentiment volatility.

Insight 2 is the one I'd act on

"Top 2 growing, bottom 3 declining" is the kind of structural signal an analyst can use to differentiate "sector-wide bet" from "stock-picking bet." If I had 100万 to deploy in baijiu today, I'd be doing stock-picking (Wuliangye overweight, Yanghe underweight), not sector allocation (equal-weight 5 stocks). The system's insight is the difference between those two strategies.

§ 6 · The 100万 allocation (the part you'd actually use)

The agent's 段 4 (allocation) is the part that translates analysis into a tradeable decision. For this run, the agent produced:

StockAllocationTierRationale
Wuliangye40%Strongly recommendBest fundamentals + growth acceleration
Moutai30%AllocateIndustry leader but decelerating; smaller position
Laojiao20%WaitStrong technicals but fundamentals red
Fenjiu + Yanghe10%AvoidCombined small position; both have fundamental red

Three honest observations about this allocation:

  1. The agent inverted the market-cap-weighting. Moutai is 6.4x larger than Wuliangye, but the agent allocated 30% to Moutai vs 40% to Wuliangye. This is what real data-driven stock-picking looks like: weight by growth-adjusted fundamentals, not by raw size.
  2. The 10% "avoid" allocation is itself a position. Putting 5% each in Fenjiu and Yanghe is a small "wait and see" position — not zero, because either could recover, but small because the data says they probably won't.
  3. The 20% Laojiao allocation is a technicals-vs-fundamentals bet. Laojiao's weighted score is exactly 5.0 — right on the boundary. The agent gave it 20% (the "wait" tier typically gets 15-20%) on the strength of its 6/10 technical score. This is a defensible bet that "the chart says wait for the fundamentals to catch up."

Would I personally follow this?

For my 100万 hypothetical — yes, mostly. I'd probably slightly underweight Laojiao (10% instead of 20%, since I don't have conviction in the technicals argument), and add the 10% to either Wuliangye or cash. But the directional call — Wuliangye overweight, Yanghe underweight, rest balanced — matches my own intuition now that I've seen the data.

§ 7 · What this system is actually good for (the meta-reflection)

After 4 phases of building, I want to step back and be honest about what this tool does and doesn't do. The Phase 4 peer comparison is the most useful variant of the system, and here's why:

What it does well:

What it doesn't do:

The honest framing: this is a research copilot for stock-picking, not a stock-picker. It helps you make a defensible decision; it doesn't make the decision for you.

What I'd add next

  1. Multi-sector comparison. The peer agent currently runs on 5 baijiu stocks. Run it on 5 new energy vehicle stocks, 5 bank stocks, 5 semiconductor stocks. Compare cross-sector results.
  2. Time-series ranking. Re-run the same peer comparison weekly for 3 months. Watch the rankings change as fundamentals evolve. This is the real test of whether the system is useful for active management.
  3. Backtest against actual returns. If the system had run in January 2026 with Q4 2025 data, would the Wuliangye-overweight call have outperformed? The historical answer is unknowable without running it; the future test is doable.

§ 8 · The D+4 series, complete

Today's article closes a 4-part series on building an AI investment system. The arc:

  1. Day 4 (morning): 4 framework comparison — the infrastructure question (LangGraph vs CrewAI vs AutoGen vs Swarm). LangGraph won on observability.
  2. Day 4 (midday): 7 dimensions, 1 stock, real data — the data architecture question. Phase 1 (LLM-only) vs Phase 2 (akshare integration). Real data exposed the LLM's fabrication problem.
  3. Day 4 (afternoon): Scoring rubric — the decision architecture question. Threshold-based scoring (≥7.5 GREEN, 5.0-7.5 YELLOW, <5.0 RED) replaced the LLM's emoji decision.
  4. Day 4 (evening): Peer comparison — the synthesis question. A 36th agent ranks 5 stocks in a sector and produces actionable output. The system's first real answer to "what should I buy?"

What I learned in one day: data discipline beats prompt engineering, every time. A 5-line Python rule that gives 9/10 fundamentals to Wuliangye based on +33.7% revenue growth is worth more than a 500-line prompt that asks the LLM to "consider all factors and give a recommendation." The LLM is good at synthesizing; the data is good at telling the truth. Combine them, and you get something useful.

Tomorrow (Day 5) will be different — back to job-search sprint work, since this D+4 binge was a planned acceleration. But the 4-article series stands as evidence that shipping a working system is the best way to learn what's hard about a problem. I now know exactly which questions are hard (cross-stock time-series ranking, multi-sector comparison, backtesting) — because I built the easy version first.

· · ·

The closing thought: when a system ranks Wuliangye above Moutai, and you can show the 33.7% vs 6.5% revenue growth differential that drove that ranking, you've built something useful. Not because the system is right (the future is uncertain), but because the system is defensible. That's the bar. That's the goal.


— Javis (汪健), writing from Shanghai
For the 100-day job-search sprint
Built with: LangGraph 1.2.10 + akshare 1.18.81 + Anthropic SDK · 36 LLM calls per peer comparison
System: /tmp/finance-agent-output/peer_compare.py · 5 baijiu stocks × 7 dimensions + 1 peer agent