Standardized Numeric Financials¶
Calcbench extracts all of the GAAP numbers in section 8, face statments and footnotes, of the 10-K/Qs. Face financials from earnings press-releases and 8-Ks are also included.
Standardized¶
Calcbench standardizes +1000 metrics to handle differences in filers’s tagging. The list of stardized points is @ https://www.calcbench.com/home/standardizedmetrics
- calcbench.standardized(company_identifiers=[], metrics=[], fiscal_year=None, fiscal_period=None, start_date=None, end_date=None, point_in_time=False, filing_id=None, exclude_unconfirmed_preliminary=False, pit_V2=True)¶
Standardized Numeric Data.
The data behind the multi-company page, https://www.calcbench.com/multi.
Example https://github.com/calcbench/notebooks/blob/master/python_client_api_demo.ipynb
- Parameters
company_identifiers (
Sequence
[Union
[str
,int
]]) – Tickers/CIK codes. eg. [‘msft’, ‘goog’, ‘appl’, ‘0000066740’]. If not specified get data for all companies.metrics (
Sequence
[str
]) – Standardized metrics. Full list @ https://www.calcbench.com/home/standardizedmetrics eg. [‘revenue’, ‘accountsreceivable’]. If not specified get all metrics.fiscal_year (
Optional
[int
]) – Fiscal year for which to get data. If not specified get all history.fiscal_period (
Union
[Period
,Literal
[0, 1, 2, 3, 4],None
]) – Fiscal period for which to get data. If not specified get all history.start_date (
Union
[datetime
,date
,None
]) – Restrict to records received on or after (inclusive) this date/datetimeend_date (
Union
[datetime
,date
,None
]) – Restric to records received prior (exclusive) thie date/datetimepoint_in_time (
bool
) – Include timestamps when data was published and revision chains.filing_id (
Optional
[int
]) – Filing ID for which to get data. Get all of the data reported in this filing.exclude_unconfirmed_preliminary (
Optional
[bool
]) – Exclude points from press-releases or 8-Ks that have not been “confirmed” in an XBRL filing. Preliminary points have a higher error rate than XBRL points.
- Returns
Dataframe
Columns:
Standardized data with a timestamp when it was published by Calcbench.
A record is returned for each filing in which a metric value changed (was revised).
If the company files an 8-K with revenue = $100 then a week later files a 10-K with revenue = $100 one record will be returned for that period. It will have preliminary=True and XBRL=True.
If the company files an 8-K with revenue = $100 and then a week later files a 10-K with revenue = $200, two records will be returned. One with revenue = $100, a revision_number=0, date_reported of 8-K, preliminary=True and XBRL=False. You will see a second line with revenue = $200, a revision_number=1, and date_reported of the 10-K, preliminary=False and XBRL=False.
If the value is revised in subsequent XBRL filings you will see a record for each filing with an incremented revision number.
- value
The value of the fact
- revision_number
0 indicates an original, unrevised value for this fact. 1, 2, 3… indicates subsequent revisions to the fact value. https://knowledge.calcbench.com/hc/en-us/search?utf8=%E2%9C%93&query=revisions&commit=Search
- preliminary
True indicates the number was parsed from non-XBRL 8-K or press release from the wire
- XBRL
Indicates the number was parsed from XBRL
- period_start
First day of the fiscal period for this fact
- period_end
Last day of the fiscal period for this fact
- date_reported
Timestamp (EST) when Calcbench published this fact.
In some cases, particularly prior to 2015, this will be the filing date of the document as recorded by the SEC. To exclude these points remove points where the hour is 0.
- metric
The metric name, see the definitions @ https://www.calcbench.com/home/standardizedmetrics
- calendar_year
The calendar year for this fact. https://knowledge.calcbench.com/hc/en-us/articles/223267767-What-are-Calendar-Years-and-Periods-What-is-TTM-
- calendar_period
The calendar period for this fact
- fiscal_year
Company reported fiscal year for this fact
- fiscal_period
Company reported fiscal period for this fact
- ticker
Ticker of reporting company
- CIK
SEC assigned Central Index Key for reporting company
- calcbench_entity_id
Internal Calcbench identifier for reporting company
- filing_type
The document type this fact came from, 10-K|Q, S-1 etc…
Usage:
>>> d = calcbench.standardized(company_identifiers=['msft'], >>> point_in_time=True,) >>> ) >>> # Put the data in a format amiable to arithmetic on columns >>> d = calcbench.standardized(company_identifiers=['msft', 'orcl'], metrics=['StockholdersEquity', 'NetIncome']) >>> d = d.unstack("metric")["value"] >>> return_on_equity = d['NetIncome'] / d['StockholdersEquity']
- calcbench.standardized_raw(company_identifiers=[], metrics=[], start_year=None, start_period=None, end_year=None, end_period=None, entire_universe=False, accession_id=None, point_in_time=False, include_trace=False, update_date=None, all_history=False, year=None, period=None, period_type=None, use_fiscal_period=False, all_face=False, all_footnotes=False, filing_id=None, all_non_GAAP=False, all_metrics=False, pit_V2=True, start_date=None, end_date=None, exclude_unconfirmed_preliminary=False)¶
Standardized data.
Get normalized data from Calcbench. Each point is normalized by economic concept and time period.
- Parameters
company_identifiers (
Sequence
[Union
[str
,int
]]) – a sequence of tickers (or CIK codes), eg [‘msft’, ‘goog’, ‘appl’]metrics (
Sequence
[str
]) – a sequence of metrics, see the full list @ https://www.calcbench.com/home/standardizedmetrics eg. [‘revenue’, ‘accountsreceivable’]start_year (
Optional
[int
]) – first year of datastart_period (
Union
[Period
,Literal
[0, 1, 2, 3, 4],None
]) – first quarter to get, for annual data pass 0, for quarters pass 1, 2, 3, 4end_year (
Optional
[int
]) – last year of dataend_period (
Union
[Period
,Literal
[0, 1, 2, 3, 4],None
]) – last_quarter to get, for annual data pass 0, for quarters pass 1, 2, 3, 4entire_universe – Get data for all companies, this can take a while, talk to Calcbench before you do this in production.
accession_id (
Optional
[int
]) – Calcbench Accession IDinclude_trace (
bool
) – Include the facts used to calculate the normalized value.year (
Optional
[int
]) – Get data for a single year, defaults to annual data.period_type (
Optional
[PeriodType
]) – Either “annual” or “quarterly”include_preliminary – Include data from non-XBRL 8-Ks and press releases.
exclude_errors – Run another level of error detections, only works for PIT preliminary
filing_id (
Optional
[int
]) – Filing id for which to get data. corresponds to the filing_id in the objects returned by the filings API.all_non_GAAP (
bool
) – include all non-GAAP metrics from earnings press releases such as EBITDA_NonGAAP. This is implied when querying by filing_id.all_metrics – All metrics.
start_date (
Union
[datetime
,date
,None
]) – points modified from this date (inclusive). If no time is specified all points from that date are returned.end_date (
Union
[datetime
,date
,None
]) – points modified until this date (exclusive). If not time is specified point modified prior to this date are returned.
- Return type
Sequence
[StandardizedPoint
]- Returns
A list of dictionaries with keys [‘ticker’, ‘calendar_year’, ‘calendar_period’, ‘metric’, ‘value’].
- class calcbench.api_query_params.Period(value)
An enumeration.
- Annual = 0
- H1 = 5
First half of year
- Other = 9
- Q1 = 1
- Q2 = 2
- Q3 = 3
- Q3Cum = 6
First three quarters of year
- Q4 = 4
- class calcbench.api_query_params.PeriodType(value)
An enumeration.
- Annual = 'annual'
- Combined = 'combined'
- Quarterly = 'quarterly'
- TrailingTwelveMonths = 'TTM'
- class calcbench.api_query_params.CompanyIdentifierScheme(value)¶
An enumeration.
- CentralIndexKey = 'CIK'¶
- Ticker = 'ticker'¶
- class calcbench.api_query_params.PeriodType(value)¶
An enumeration.