Side Project · 2026

Stock Analyst
確定性股票研究終端

A deterministic equity research tool. Type a US ticker and it returns a five-factor quant rating graded against 489 sector peers, a DCF and multiples valuation, technical trend and key levels, analyst revisions, macro regime — as a bilingual dashboard. Every number is computed in Python. There is no LLM anywhere in the critical path.

Python · FastAPI · SQLite yfinance · SEC EDGAR · FRED Deterministic scoring EN / 中文 Offline-capable

01.Why build it this way

Most "AI stock analysis" asks a language model to read filings and opine. That is fast to build and impossible to audit — the same prompt can produce different numbers on different days, and a confident wrong figure is indistinguishable from a right one.

This tool inverts that. All ratings, valuations and trend calls come from rules applied to filed data, so the same inputs always produce the same output and every grade can be reconstructed by hand from the numbers printed beside it. The report text is generated from paired English/中文 templates filled with computed values, not written by a model.

489sector peers graded against
5rating factors
102tests
0LLM calls at runtime

02.What it produces

Quant rating

Valuation, Growth, Profitability, Momentum and Revisions each graded A+ to F, rolled into a 1.0–5.0 score with a stated confidence and the reasons behind it.

Intrinsic value

Five-year FCF discounted cash flow with a WACC × terminal-growth sensitivity table, triangulated against five valuation multiples into a fair-value range.

Peer-relative grading

Each metric ranked within its own sector across a 489-company universe — so "expensive" means expensive versus peers, not just versus its own past.

Technicals

Wilder RSI/ADX/ATR, moving-average structure, a trend-regime call with pass/fail reasoning, and support/resistance clustered from swing pivots.

Long-term tracking

Snapshots each run and reports what actually moved — rating changes, trend flips, and monitoring triggers crossing from pending to fired.

Honest gaps

Missing data is named, never neutralised. A factor without inputs is excluded and the weights renormalise, rather than quietly scoring as average.

03.The engineering story

Built across nine specification-led waves. I wrote the spec and the acceptance criteria for each wave, an agent implemented it, and I verified the result against numbers I had computed independently beforehand — from raw SEC filings, live broker quotes, or a separate implementation — rather than reading the code and judging whether it looked right.

That verification step found 16 defects that the implementation's own passing test suite did not. Almost none were crashes. They were plausible wrong numbers: a fiscal year counted twice because two data sources dated it three days apart; a terminal value compared undiscounted against a discounted total, producing an impossible 112%; a yield curve rendered as 45% instead of 45 basis points; report text asserting things the analysis itself contradicted.

On financial software that is the failure mode that costs money — not the one that throws an exception.

04.See real output

Below is an unedited report the tool generated. It is a static snapshot, kept exactly as produced — the ratings and prices are those of the date shown, not current values.

Open the sample report →
Snapshot dated 4 August 2026 · not investment advice

This is a personal engineering project and a point-in-time illustration of its output. It is not a recommendation to buy or sell anything, it is not maintained as a live service, and the figures shown will not reflect current market conditions. The tool itself runs locally against free data sources; nothing here is a hosted product.