compare_companies
Compare one financial figure across multiple companies and verify their fiscal periods align. Flags mismatched fiscal calendars, XBRL tags, and currencies so results are not misleading.
Instructions
Compare one financial figure across several companies, and check the dates line up.
Give it tickers or company names and one concept. It resolves each company, fetches the same concept for each, and lines the figures up side by side.
Read the warning field before you write your answer. Companies choose
their own fiscal calendars. NVIDIA's fiscal 2024 ended in January 2024;
Apple's ended in September 2024; Microsoft's ended in June 2024. All three
are called "FY2024" and all three cover different months. When the period
end dates in a comparison are more than 45 days apart, this tool sets
comparable: false and a warning. Repeat that warning to the user in
plain language and give the period end dates. A table of three numbers that
quietly compares January to September is worse than no table.
The tool also warns when the companies matched different XBRL tags, which means the figures are defined differently even when the dates line up, and when a company reports in a currency other than US dollars.
If any company name is ambiguous, the whole comparison stops rather than guessing which filer was meant. A comparison that silently includes the wrong company looks completely normal.
Args: companies: Tickers or company names, e.g. ["NVDA", "AAPL", "MSFT"]. Two to about eight works; more is slow. concept: A concept name understood by get_financial_concept, such as "revenue" or "net_income". fiscal_year: The fiscal year to compare, e.g. 2024. Omit to use the most recent fiscal year that all the companies report. period: "annual" or "quarterly". Default "annual".
Returns: comparable, warning, fiscal_year, unit, a companies list with one row per filer (value, fy, start, end, filed, form, matched_tag, restated), an unavailable list for companies with no data, and notes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | annual | |
| concept | Yes | ||
| companies | Yes | ||
| fiscal_year | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||