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, else ceq+pstk, else at-lt) + deferred taxes (txditc) - preferred stock (pstkrv, else pstkl, else pstk); rows with be <= min_book_equity are dropped. op = (revt - cogs - xsga - xint)/be. inv = year-over-year growth in total assets (at), by gvkey. Growth is measured only between an observation and the immediately preceding fiscal year — a datadate exactly 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_change would 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 at datadate would look ahead. So this emits an ``avail_date`` = ``datadate`` + ``report_lag_months`` column (month-end stamped) and downstream view builders join point-in-time on avail_date, never on datadate. The default report_lag_months=6 is 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. Use compustat_annual_formation_clean() when the study requires the calendar-year rule. (The sibling compustat_quarterly_clean dates availability off the actual rdq announcement, 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.