FengInvest

Three paths, one system—value, quant, and subjective judgment, turning "can I buy this stock?" into a process that can be reviewed, validated, and stress-tested.

Value Investing

Buy a great business, wait for a fair price—know your circle of competence

Quantitative Investing

Let the numbers speak—multi-factor models and data pipelines

Subjective Judgment

Four investors' viewpoints, converging through debate

Seven-Layer Architecture

A state machine enforces the process—no step skippable

Data Quality

Verify correctness at ingestion, keep bad data out

Quick Start

A few CLI commands, from initialization to a report

Value Investing: Buy a Great Business, Wait for a Fair Price

First settle "do I understand it?", then talk about "is it expensive?".

This path answers the most fundamental question: do I truly understand this investment? How does it make money? Will this business still exist in ten years? What could kill it?

  • L0 circle-of-competence confirmation: three questions—how does it make money? Will it still exist in ten years? What could kill it? Outputs "understand / partially understand / don't understand".
  • Moat and long-term durability: companies judged "partially understood" at L0 are blocked after the M layer and never enter deep analysis.
  • Margin-of-safety mindset: start from business value—don't chase momentum or guess bounces; only act when there's enough cushion.
  • Hard-discipline cap: the 8 L1 rules are the brakes inside the value framework—the more you like something, the more you check whether the rules let you pass.

Quantitative Investing: Let the Numbers Speak

Translate subjective feel into computable signals.

Feelings are static; data is alive. This path uses a multi-factor model to turn "expensive or cheap, good or bad" into a set of comparable, back-testable numbers—not a hunch.

  • 10-factor z-score quant: valuation, quality, growth, momentum and sentiment each normalized and weighted into a relative-rankscore.
  • Data pipeline (M layer): fengdata.py collects, dedupes, retries and rotates proxies, so every cell of data comes from a trusted source.
  • 3-light judgment: macro / valuation / trend / sentiment four lights gauge the market, and the quant path only runs in a fitting environment.
  • Cross-checkable against the subjective: when the quant score conflicts with a value call, the L3 debate engine manufactures a debate instead of silently ignoring it.
Multi-factor z-score Data pipeline Back-test friendly

Subjective Judgment: Four Perspectives, One Debate

Qualitative analysis is never one person's say-so.

The biggest liar in investing is agreeing with yourself. FengInvest runs four AI agents in parallel, each answering independently from a different investor's stance, then a debate engine stitches their conclusions together.

  • Duan Yongping's lens: the underlying logic of the business—why do others buy it? Where's the moat?
  • Buffett's lens: business quality and long-term return—is this a good business that earns money?
  • Munger's lens: contrarian and multidisciplinary thinking—where's the easiest place to go wrong, and how to avoid it.
  • Li Lu's lens: circle of competence and long-termism—do I truly understand, or do I just want it?
  • L3 debate engine: four adversarial questions + behavioral-bias check + rule-tree collision. Every agent's conclusion can be challenged; it outputs the converged view together with a record of disagreements.
Multi-agent parallel Four adversarials Bias check

Seven-Layer Architecture

From circle-of-competence confirmation to a structured report, each layer does one thing.

  • L0 circle-of-competence confirmation: three questions—how does it make money? Will it still exist in ten years? What could kill it? Outputs "understand / partially understand / don't understand".
  • M market data: collection + four-light judgment (macro / valuation / trend / sentiment).
  • L1 hard discipline: eight rules checked one by one.
  • L2b quant factors: 10-factor z-score quant analysis.
  • L2a qualitative analysis: four AI agents in parallel—Duan / Buffett / Munger / Li Lu perspectives.
  • L3 debate engine: four adversarial questions + behavioral-bias check + rule-tree collision.
  • P portfolio check: position sizing + stress testing.
  • L4 report: a structured research report in a Wall Street analyst format.

A state machine blocks short-cuts: without finishing L0 you can't enter M, and without finishing L3 you can't produce a report. No step gets skipped because it "feels about right".

Data Quality: Keep Bad Data Out

Correctness is verified at ingestion—structural checks alone aren't enough.

  • Data-quality gate: pulls PE / forward PE from stockanalysis.com and compares against the local copy—under 5% difference passes, 5–10% warns, over 10% fails.
  • Cross-layer consistency: PE is cross-checked across M / L2b, with an automatic alert if it differs by more than 5%.
  • Degradation propagation: when a data source degrades, the downstream weight drops automatically.
  • Output validation: on marking complete, automatically checks that key fields exist.
  • Web UI: analysis progress and report visualization—a toolset built for day-to-day research.
Cross-validation Consistency check Degradation propagation

Quick Start

A state-machine tool—a few commands run the whole analysis flow.

  • python tools/fengstate.py init <TICKER> — initialize analysis
  • python tools/fengstate.py check <TICKER> <layer> — check prerequisites
  • python tools/fengstate.py complete <TICKER> <layer> <file> — mark complete
  • python tools/fengstate.py status <TICKER> — view progress
  • python tools/fengstate.py verify <TICKER> — full verification