Sources and standardization
Primary source
CVM open data portal — DFP (standardized financial statements, annual) of listed
companies, from 2010 onward, CSV.
https://dados.cvm.gov.br/dados/CIA_ABERTA/DOC/DFP/DADOS/
ODbL license (commercial use and redistribution of derivatives permitted, with attribution to CVM). Prices, when used for multiples, will come exclusively from end-of-day/historical B3 data (COTAHIST), whose distribution B3's commercial policy (items 7.9/7.10) declares free.
How the data is treated
- Raw preserved. Every CVM row is stored as it came (scale already in R$: files in "MIL" — thousands scale — are multiplied by 1000). A new standardization rule never requires downgrading the history.
- Consolidated first. We use the consolidated statements; if the company does
not consolidate in a given year, we fall back to the individual ones and the
choice is recorded (
fato.agreg). The decision is made per fiscal year, not per company: 1,244 company-years use the individual statements because no consolidated one exists for that year.
At the boundary, comparing two years compares two perimeters. 67
companies switch basis somewhere in the series, across 88 fiscal years, and
growth, ROA, ROE and the Piotroski score all straddle that switch. A real
case: TELEBRÁS 2014 shows +268.3% revenue growth because the 2014
consolidated figure (155.5m) is compared against the 2013 individual one
(42.2m); on the same basis, revenue actually fell 26%. The number is
correct for the accounts it cites and misleading as an economic change, so
every indicator in this situation carries the base_contabil_mudou flag. We
do not recompute on the individual basis: that would throw away the
consolidated statements, which are the right basis for the year they exist
in. Which of the two readings matters is the reader's call — our job is to
say there are two.
3. Only the ÚLTIMO fiscal year feeds the indicators. The PENÚLTIMO comparative
(ORDEM_EXERC ÚLTIMO / PENÚLTIMO = current / prior presentation — the same
fiscal year reported one year later) serves as a cross-check: a divergence
above 0.5% is a restatement and is recorded in the reapresentacao table —
visible, never silently corrected.
4. Versions. CVM publishes restatements with an increasing VERSAO (version
number); the highest one always prevails.
5. Signs normalized by accounting identity, never by guesswork. The sign
convention for cost and income tax varies between companies in the CVM files
(real case: Vale 2022 reports cost as positive). The published sign is the only
one that closes the identity — cost: revenue + cost = gross profit; income
tax: pre-tax income + income tax = profit from continuing operations. A
legitimate tax credit closes the identity without a flip and is preserved.
Every flip is recorded in fato.origem
(sinal_normalizado_pela_identidade); if no sign closes it, the value stays as
it came and the DRE invariant flags it.
6. Items without a fixed account (e.g. D&A) are extracted by a declared rule
(text search in the indirect-method DFC, block 6.01) and the exact origin is
recorded in fato.origem. When the rule does not find the item, the value is
NULL with a flag — never estimated.
Declared limitations
- IFRS 16 (2019): structural break in debt and EBIT; 2018→2019 comparisons carry that effect.
- Corporate breaks documented in
dados_b3/empresas.py(e.g. Ambev S.A. only exists as a record from 2013 onward). - Financial companies out of the MVP: they have their own chart of accounts.
- DFP is annual; the quarterly layer (ITR) will be added with the same methodology.