numeraire_dataset.zones.clean.compustat_annual_clean#
- numeraire_dataset.zones.clean.compustat_annual_clean(funda: DataFrame, *, min_book_equity: float = 0.0, report_lag_months: int = 6) DataFrame[source]#
Tidy annual Compustat: book equity, operating profitability, and asset-growth investment.
be= stockholders’ equity (seq, elseceq+pstk, elseat-lt) + deferred taxes (txditc) - preferred stock (pstkrv, elsepstkl, elsepstk); rows withbe <= min_book_equityare dropped.op= (revt-cogs-xsga-xint)/be.inv= year-over-year growth in total assets (at), bygvkey. Growth is measured only between an observation and the immediately preceding fiscal year — adatadateexactly twelve months earlier. It is missing for a firm’s first observation, across a skipped year or a mid-history fiscal-year-end change (where the prior row is not twelve months back), and when either the current or the immediately preceding row contains a missing asset value. The builder never carries an older asset value across such a gap or a missing-value row; row-adjacency alone (which pandas’pct_changewould use) is not treated as year-adjacency.Heuristic point-in-time availability. Annual fundamentals are not public at the fiscal-period end (
datadate); the 10-K is filed months later. Joining a return panel atdatadatewould look ahead. So this emits an ``avail_date`` = ``datadate`` + ``report_lag_months`` column (month-end stamped) and downstream view builders join point-in-time onavail_date, never ondatadate. The defaultreport_lag_months=6is a per-record fixed-lag heuristic, not the Fama–French calendar-year portfolio-formation rule. In particular, adding six months to a January or March fiscal-year end would make it eligible during that same calendar year, whereas the Fama–French rule waits until the following June. The lag remains an explicit parameter for backward compatibility and exploratory robustness; changing it changes the recipe hash. Usecompustat_annual_formation_clean()when the study requires the calendar-year rule. (The siblingcompustat_quarterly_cleandates availability off the actualrdqannouncement, which is finer-grained; the annual file carries no announcement date, so a fixed lag is used.)Output columns:
gvkey, datadate, avail_date, be, op, inv, at.