How sathvikboina/recession-ews works
This is a label-first recession early-warning research pipeline, not yet a forecasting system: the README says feature tables and models have not been built. Its implemented workflow scopes candidate series, fetches and harmonises data, builds a frozen BEAI recession chronology, then compares it with NBER dates. The graph also preserves the documented runtime configuration and Phase 2 specification/dictionary deliverables. Model, feature, and dashboard stages are omitted because they are explicitly not started; unsampled pipeline links rely on README documentation.
Main entry points: 03_labels.py Label runner · harmonize.py Quarterly harmonisation · build.py BEAI builder · runtime.py Window utilities
Components 22
Scope and specification
- Dictionary generator
build.py - Study specification
spec.py - Runtime configuration
config - Collection shortlist
scripts/scope_catalog.py - Window utilities
src/ews/runtime.py
Data collection
- FRED collection
scripts/fetch_fred.py - Raw downloads
data/raw - Quarterly harmonisation
scripts/harmonize.py - Interim data
data/interim - Clean panel
data/clean
Recession labeling
- Label runner
scripts/03_labels.py - BEAI builder
src/ews/labels/build.py - Dynamic factor
src/ews/labels/dfm.py - BBQ dating
src/ews/labels/bbq.py - Diffusion gate
src/ews/labels/diffusion.py - Frozen-input checks
src/ews/labels/freeze.py - Episode renumbering
src/ews/labels/ids.py
Validation and outputs
- Frozen label artifacts
outputs/labels - NBER comparison
scripts/04_compare_nber.py - Validation results
outputs/results
Other components
- Researcher
- NBER chronology
Connections 24
- Researcher → Collection shortlist: sets collection scope
README.md - Study specification → Dictionary generator: drives generation
build.py - Researcher → Runtime configuration: configures runtime
README.md - Runtime configuration → Collection shortlist: defines scope
- Runtime configuration → Window utilities: sets study window
src/ews/runtime.py - Collection shortlist → FRED collection: selects series
README.md - FRED collection → Raw downloads: writes downloads
README.md - Raw downloads → Quarterly harmonisation: supplies inputs
README.md - Quarterly harmonisation → Interim data: stages data
README.md - Quarterly harmonisation → Clean panel: writes harmonised panel
README.md - Clean panel → Label runner: supplies growth panel
scripts/03_labels.py - Label runner → Frozen-input checks: checks frozen inputs
scripts/03_labels.py - Label runner → Episode renumbering: renumbers episodes
scripts/03_labels.py - Label runner → BEAI builder: builds chronology
src/ews/labels/build.py - BEAI builder → Dynamic factor: estimates factor
src/ews/labels/build.py - BEAI builder → BBQ dating: dates turning points
src/ews/labels/build.py - BEAI builder → Diffusion gate: gates episodes
src/ews/labels/build.py - Label runner → Frozen label artifacts: writes frozen outputs
scripts/03_labels.py - Frozen label artifacts → NBER comparison: provides label chronology
README.md - NBER chronology → NBER comparison: provides reference dates
README.md - NBER comparison → Validation results: writes comparisons
README.md - FRED collection → Window utilities: uses shared window
scripts/fetch_fred.py - Quarterly harmonisation → Window utilities: uses shared window
scripts/harmonize.py - Label runner → Window utilities: reads reporting window
scripts/03_labels.py