Sec Compare Company Facts
Implementation details
Class names
| Model name | Parameters class | Data class |
|---|---|---|
SecCompareCompanyFacts | SecCompareCompanyFactsQueryParams | SecCompareCompanyFactsData |
Import Statement
from openbb_core.provider.standard_models. import (
SecCompareCompanyFactsData,
SecCompareCompanyFactsQueryParams,
)
Parameters
- standard
- sec
symbol: str | None | list[str | None]
Symbol to get data for. Multiple items allowed for provider(s): sec.
fact: str | None
The fact to lookup, typically a GAAP-reporting measure. Choices vary by provider.
symbol: str | None | list[str | None]
Symbol to get data for. Multiple items allowed for provider(s): sec.
fact: str | None
Default: Revenues
Description
Fact or concept from the SEC taxonomy, in UpperCamelCase. Defaults to, 'Revenues'. AAPL, MSFT, GOOG, BRK-A currently report revenue as, 'RevenueFromContractWithCustomerExcludingAssessedTax'. In previous years, they have reported as 'Revenues'.
Facts fall into two groups. Instantaneous balance-sheet concepts are measured at a point in time (e.g. 'Assets', 'Liabilities', 'StockholdersEquity', 'Goodwill', 'LongTermDebt'); the full set is openbb_sec.utils.definitions.INSTANT_FACTS. Everything else is a flow concept from the income or cash-flow statement, measured over a period (e.g. 'Revenues', 'NetIncomeLoss', 'NetCashProvidedByUsedInOperatingActivities'). The 'instantaneous' parameter and the standalone-Q4 derivation apply only to flow concepts; balance-sheet concepts are always point-in-time, including the year-end (Q4) value.
year: int | None
The calendar year to retrieve the data for. If not provided, the current year is used. When symbol(s) are provided, excluding the year will return all reported values for the concept. Values are aligned by the calendar quarter/year of the period end, not the fiscal calendar.
calendar_period: str | None
The calendar period to retrieve the data for. Periods are aligned to the calendar quarter/year of the report period end, not the filer's fiscal calendar, so off-calendar filers stay comparable. If not provided, the most recent quarter is used. 'q1'-'q4' return standalone (3-month) quarters; the fourth quarter is derived as FY - 9-month. When a symbol is supplied, cumulative year-to-date values are reduced to standalone quarters.
Choices
- fy
- q1
- q2
- q3
- q4
instantaneous: bool | None
Default: False
Description
Whether to retrieve instantaneous data. See the notes above for more information. Defaults to False. Some facts are only available as instantaneous data.
The function will automatically attempt the inverse of this parameter if the initial calendar quarter request fails. This parameter is ignored when a symbol is supplied.
use_cache: bool | None
Default: True
Whether to use cache for the request. Defaults to True.
Data
- standard
- sec
symbol: str | None
Symbol representing the entity requested in the data.
name: str | None
Name of the entity.
value: float
The reported value of the fact or concept.
reported_date: date | None
The date when the report was filed.
period_beginning: date | None
The start date of the reporting period.
period_ending: date | None
The end date of the reporting period.
fiscal_year: int | None
The fiscal year.
fiscal_period: str | None
The fiscal period of the fiscal year.
symbol: str | None
Symbol representing the entity requested in the data.
name: str | None
Name of the entity.
value: float
The reported value of the fact or concept.
reported_date: date | None
The date when the report was filed.
period_beginning: date | None
The start date of the reporting period.
period_ending: date | None
The end date of the reporting period.
fiscal_year: int | None
The fiscal year.
fiscal_period: str | None
The fiscal period of the fiscal year.
cik: int | str
Central Index Key (CIK) for the requested entity.
location: str | None
Geographic location of the reporting entity.
form: str | None
The SEC form associated with the fact or concept.
frame: str | None
The frame ID associated with the fact or concept, if applicable.
accession: str
SEC filing accession number associated with the reported fact or concept.
fact: str
The display name of the fact or concept.
unit: str | None
The unit of measurement for the fact or concept.
calendar_year: int | None
Calendar year the value is aligned to (by the calendar quarter/year of the period end, not the fiscal calendar).
calendar_period: str | None
Calendar period the value is aligned to: 'FY' or 'Q1'-'Q4'.