compare_filings
Compare two annual filings from the same entity to spot year-over-year changes in normalized financials, including new or removed concepts, sign flips, and restatements.
Instructions
Compare two annual filings of the SAME entity side-by-side.
Use when the user asks "what changed at X between FY{n-1} and FY{n}", "X year-over-year breakdown", "compare X's balance sheet year by year".
Pivots the normalized values of the same entity on two fiscal years and
surfaces semantic flags: is_new_in_b (concept appeared), is_removed_in_b
(concept disappeared), is_sign_flip (positive↔negative), and
has_restatement_warning (filing_b's comparative columns retroactively
restated filing_a's value).
hub_concept_codes is optional. None = a default set of primary hubs across
income statement / balance sheet / cash flow. Pass an explicit list
(up to 50) to override.
form_type picks the reference filing of each year: 10-K, 20-F, 40-F,
annual_report (ESEF filers), or an amended form (10-K/A, 20-F/A,
40-F/A). Omit it (default) for the most recent original annual filing of
each year, whatever its form.
Different from compare_entities (cross-entity), get_amendment_diff
(10-K vs 10-K/A same year), and get_metric_history (one metric, time series).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | ||
| form_type | No | ||
| fiscal_year_a | Yes | ||
| fiscal_year_b | Yes | ||
| hub_concept_codes | No | ||
| fiscal_period_type | No | FY |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |