Skip to content
The guard layer · what gets deleted

A language model writes the prose. A deterministic layer deletes what it cannot support.

The reasonable objection to AI-written investment research is that a model will write a confident sentence with nothing behind it. Ours does too. The difference is what happens next: every generated sentence passes through a filter that is ordinary Python — no model, no judgement, same input, same output — and sentences that cannot be grounded are removed before anyone reads them. This page shows that layer working, on real input and output.

Where the model is, and where it is not

The forensic screens, the distress and earnings-quality math, the reverse-DCF and the grade are computed in Python from the filings. The model writes narrative on top of them: the thesis, the bull and bear read, flag wording, the plain-English explanations.

One exception, stated because a page about honesty that hid it would be worthless: the six business-quality bars are the model's own read. Four of them — Revenue Growth, Balance Sheet, Earnings Quality and Risk Profile — are capped down to the deterministic pillar covering the same ground, so a bar can never read stronger than the math behind it. Profitability and Outlook have no deterministic counterpart and are the model's read alone. Where the filings are too thin to compute a grade at all, the headline quality number falls back to that read as well.

The filter, running

Each example below is a real call: the left-hand text goes into the named function in explanation_guard.py, and the right-hand text is what that function returns. Struck-through sentences are the ones it removed. A test in the repository feeds these same strings to the same functions and fails if the output stops matching what this page displays, so the page cannot drift away from the behaviour it is describing.

Seven examples is a sample, not the layer. It is currently 50 checks across about 5.1k lines — counts measured from the module by that same test, so they understate rather than flatter.

Circular reasoningdecircular()
What the model wrote

The company's margin compression is a concern because margins have compressed. Gross margin fell to 34.1% from 41.8% as the H20 export licence pulled forward $4.5B of inventory into a single quarter.

What reaches the page

Gross margin fell to 34.1% from 41.8% as the H20 export licence pulled forward $4.5B of inventory into a single quarter.

The first sentence's reason for the conclusion is the conclusion restated. It names no line item, so there is nothing a reader could go and check.

A score offered as the reasonstrip_score_as_reasoning()
What the model wrote

Cash conversion is weak, reflecting a Sloan accrual ratio of 47.7%. Receivables rose 38% against 6% revenue growth, so the earnings were billed but not collected.

What reaches the page

Receivables rose 38% against 6% revenue growth, so the earnings were billed but not collected.

An accrual ratio is a label for the finding, not the finding. The guard keeps the sentence only when a mechanism — a line item or an operational driver — is named alongside the score.

A hedge with nothing behind itstrip_ungrounded_hedge_phrasing()
What the model wrote

Margins are potentially under pressure going forward. Gross margin fell to 34.1% from 41.8% as ocean freight repriced at the annual contract reset.

What reaches the page

Gross margin fell to 34.1% from 41.8% as ocean freight repriced at the annual contract reset.

"Potentially" with no figure and no stated condition commits to nothing and cannot be wrong. The surviving sentence names the amount, the direction and the cause.

Generic strength languagestrip_generic_filler()
What the model wrote

The company has a robust balance sheet. Net debt fell to 1.2x EBITDA from 2.9x after the convertible was retired at par.

What reaches the page

Net debt fell to 1.2x EBITDA from 2.9x after the convertible was retired at par.

"Robust" is true of most balance sheets and false of none in particular. A figure in a semicolon- or dash-joined clause of the same sentence does not rescue it — that much is checked per clause. A comma-joined one still can, which is the per-sentence limit described below and not a claim this example should be read as disproving.

Scaffolding that tells you how to feelstrip_templated_scaffolding()
What the model wrote

Interest coverage fell to 1.8x from 4.2x after the term loan repriced. That cuts both ways.

What reaches the page

Interest coverage fell to 1.8x from 4.2x after the term loan repriced.

"That cuts both ways" is a stance with no content. Scaffolding is normally truncated rather than deleted — the clause carrying the figure is kept — and a whole sentence goes only when it carries no figure at all.

A recommendation to the readerstrip_buy_sell_language()
What the model wrote

Buy this stock at current levels. Free cash flow conversion has run below 50% of net income for eight straight quarters.

What reaches the page

Free cash flow conversion has run below 50% of net income for eight straight quarters.

Reader-directed instructions are removed; the same words survive when the sentence is citing our own rating label rather than telling you to act.

A consensus figure we cannot sourcestrip_unsupported_consensus_pct()
What the model wrote

Analysts expect revenue to grow 18% next year. Backlog conversion slowed to 71% from 88%, which is what actually funds the next four quarters.

What reaches the page

Backlog conversion slowed to 71% from 88%, which is what actually funds the next four quarters.

This check runs on the branch where no analyst figure was handed to the model at all, so a percentage the sentence pins on the Street there came from the model rather than from data, and the sentence is dropped instead of printed with a source behind it. A figure the sentence attributes to us — "our reverse-DCF implies …" — is left alone, so a comparison against a correctly-omitted Street number survives. Where a real analyst figure was supplied, a sibling check compares the citation against that figure instead of assuming it was invented.

The same sentence, two different filers

The checks above can mostly be read off the wording. This one cannot, and it is the clearest illustration of what "deterministic" buys you: Eight consecutive years is a checkable assertion about a specific filer. The guard compares it against how many fiscal years that filer has actually filed, so the verdict is a property of the company's history rather than of the sentence.

What the model wrote

Free cash flow has covered the dividend for eight consecutive years. Operating cash flow exceeded capex by $310M in the most recent fiscal year.

A filer with 3 fiscal years on file

Operating cash flow exceeded capex by $310M in the most recent fiscal year.

A filer with 15 fiscal years on file

Free cash flow has covered the dividend for eight consecutive years. Operating cash flow exceeded capex by $310M in the most recent fiscal year.

A filer whose history span could not be determined

Free cash flow has covered the dividend for eight consecutive years. Operating cash flow exceeded capex by $310M in the most recent fiscal year.

Unknown history is not short history. When the span cannot be established the sentence is left alone, because deleting on an absence of data would be the same unfounded confidence the guard exists to remove.

What the layer will not do

  • It does not rewrite. Nothing is paraphrased into something more defensible — a sentence is kept as written or removed.
  • It does not empty a field to win. Most checks refuse to delete the last surviving sentence, because a blank panel is a worse answer than a weak one and this codebase has watched guard chains erode notes into bare number lists before.
  • It does not catch everything. It is a filter on shapes of unsupported writing, not a fact-checker over the whole filing. A wrong claim phrased with a real mechanism and a real figure passes.
  • It runs per sentence, not per clause, for most checks — so a claim smuggled into a compound clause can survive one whose sibling clause supplies the grounding. Several checks carry clause-level variants for exactly this reason; not all of them do.

Where the data comes from

Everything the screens read, apart from prices, is primary source: company filings from SEC EDGAR, and fund holdings from N-PORT, the report funds file with the SEC. There is no redistributed vendor dataset in the analysis path and no per-seat data licence sitting underneath the service — which is why fund look-through covers what it covers rather than what a data contract permits.

How to check any of this

  • Run a company you already know well and read the narrative against its filings. The claim is not that it is always right — it is that it does not say things it cannot support.
  • Compare the numbers on any analysis to the filer's own EDGAR documents. Figures in the deterministic tables that come from filings link to them.
  • Ask for a sentence that violates one of the rules above. If the layer is working, the failure mode you find will be a thin answer, not a confident wrong one.
Check it on a name you already have an opinion about

Run any US filer through the engine and read the narrative against the filings. Free, no card.

Analyze any US filer — free →
Know the real risk in what you own

Run any US company that files a 10-K through the forensic engine — a quality grade, red flags and the distress screens behind them, built from the complete SEC filings. Free, no card.

Analyze any US filer — free →

Stockonomy is an educational research tool. Nothing here is investment advice, a recommendation, or a solicitation to buy or sell any security. Forensic signals flag probability, not certainty. Data is sourced from public SEC EDGAR filings.