Implementation:AI4Finance Foundation FinRobot resolve canonical thesis
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Finance, Valuation, Deterministic_Compute |
| Last Updated | 2026-10-18 00:00 GMT |
Overview
Concrete tool for resolving a deterministic headline verdict (BUY/HOLD/SELL) and optional price target from a ValuationSynthesis, provided by the FinRobot compute layer.
Description
The resolve_canonical_thesis function is the deterministic thesis resolver. It is pure: depends only on the ValuationSynthesis object and the ticker (for log attribution). No I/O, no LLM — this is the code the LLM's headline numbers are force-reconciled against.
Key design decisions:
- Always directional: The verdict is ALWAYS BUY/HOLD/SELL — the REVIEW state is deleted. Uncertainty is expressed by the confidence tier, the target range, and point withholding.
- Point withholding: When the only point we could give would be fabricated (no usable method, M&A transition, all methods withheld), the POINT is withheld (valuation_withheld=True) while the verdict still ships from the market-implied read.
- M&A transition: When a just-closed stock-funded acquisition poisons the TTM snapshot, the point is withheld and the verdict held neutral — a data-lineage degradation, not a directional call. Methods stay visible for transparency.
Usage
- Equity_Research workflow (Step 7): Called before the LLM thesis step to produce the canonical numbers the LLM narrative is reconciled against.
- Import this when you need the deterministic headline verdict and target from a ValuationSynthesis.
Code Reference
Source Location
- Repository: FinRobot
- File: finrobot_desktop/finrobot/engine/compute/operators/valuation_synthesis.py
Signature
def resolve_canonical_thesis(vs: object, ticker: str) -> CanonicalThesis:
"""Resolve the deterministic headline verdict (+ maybe target) from a synthesis.
Pure: depends only on vs (the valuation_synthesis structured-context value).
ticker is used only for log attribution. No I/O, no LLM — this is the
code the LLM's headline numbers are force-reconciled against.
The verdict is ALWAYS directional (BUY/HOLD/SELL). Uncertainty is
expressed by the confidence tier, the target range, and point withholding.
"""
Import
from finrobot.engine.compute.operators.valuation_synthesis import resolve_canonical_thesis
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| vs | ValuationSynthesis (or any) | Yes | The valuation synthesis object; non-ValuationSynthesis input yields an empty CanonicalThesis |
| ticker | str | Yes | Target ticker (for log attribution only) |
Outputs
| Name | Type | Description |
|---|---|---|
| CanonicalThesis | CanonicalThesis | target (may be None if withheld), verdict (BUY/HOLD/SELL or None), basis, upside, valuation_withheld, confidence |
Usage Examples
Resolve Canonical Thesis
from finrobot.engine.compute.operators.valuation_synthesis import resolve_canonical_thesis
canonical = resolve_canonical_thesis(vs=valuation_synthesis, ticker="AAPL")
print(f"Verdict: {canonical.verdict}")
print(f"Target: {canonical.target}")
print(f"Confidence: {canonical.confidence}")
if canonical.valuation_withheld:
print(f"Point withheld: {canonical.basis}")
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment