Processed Compustat
The reusable annual Compustat panel provides one standardized, consolidated,
USD financial-statement record per (gvkey, fyear). It retains selected source
fields only; analysis-specific controls are constructed downstream.
flowchart LR
raw[(Project-raw annual Compustat)] --> select[Filter and select one annual record]
select --> output[(Processed annual Compustat)]
classDef support fill:#fff0cc,stroke:#a66b00,stroke-width:2px
classDef reusable fill:#e2f2e7,stroke:#3b7a4b,stroke-width:2px
class raw support
class output reusable
Inputs
Build
| Component |
Location |
| Builder |
shared/data/build_processed_compustat.py |
| Runtime |
hct-tower-model-cuda-… (CPU execution) |
| Entry point |
python -m shared.data.build_processed_compustat --config shared/config/config_full.yaml |
Output
| Dataset |
File / location |
Grain |
Key and variables |
| Processed annual Compustat |
compustat_annual.parquet in /data/full/processed/ |
Firm-fiscal year |
Key: gvkey, fyear; retained fields include datadate, at, che, sale, xrd, csho, prcc_f, sic, and naics |
The builder filters indfmt = INDL, popsrc = D, datafmt = STD,
consol = C, and curcd = USD. When Compustat has multiple updates for one
firm-year, it prefers final = Y, then the latest fdate, pdate, and
datadate; unresolved conflicting ties stop the build. The output preserves
source levels only. Ratios, logs, growth, timing shifts, and winsorization are
constructed in the relevant regression-ready builder.