New variables: KOSPI, GOVT_10Y, IMPORT_PRICE, DISHONOR_RATE,
HOUSING_PRICE, HOUSEHOLD_DEBT, IMPORT_AMT, USDKRW, CSI, M2
- CSV cache: data/cache/macro_ecos.csv (no repeated API calls)
- --force to refresh, --no-api for fallback only
- 26 years (2000-2025) fallback data for all variables
BUG: Formula used (d - sqrt_rho*z) but correct is (d + sqrt_rho*z)
- Our thresholds are cumulative ascending (AAA→CCC→D)
- Higher Z should push probability mass left (better ratings)
- Previous: Z+ = higher PD = bad economy (WRONG)
- Fixed: Z+ = lower PD = good economy (matches paper)
Verification:
- 1998 IMF crisis: Zt=-2.12 (negative = bad ✅)
- 2006 boom: Zt=+1.53 (positive = good ✅)
- Pipeline 8/8 validation pass
- Removed CORP_AA_LOGR (log of rate = problematic near zero)
- Rate variables restricted to DIFF only (no LOG/PCT/LOGR)
- Added economic sign consistency checks for all 45 features
- New optimal 3-var: CREDIT_SPREAD_LAG1, IPI_LAG1, EXPORT_DIFF
- All coefficient signs economically consistent
- R²=0.586 (trade-off: lower R² but correct economics)
- Added IPI + EXPORT to ECOS queries and fallback data
- Zt restricted to 2000-2025 in analysis (26 obs)
- Pipeline 8/8 validation pass
- GDP: 111Y002/10111 -> 902Y015/KOR (international comparative stats)
- Unemployment: 901Y027/3 -> 901Y027/I61BC (correct item for rate)
- CD rate: 817Y002/010502000 -> 721Y001/2010000 (market interest rates)
- CPI: now computes YoY growth from level index (pct_change)
- Leading index: monthly (M) fetch + annual average (no annual data available)
- Fix DataFrame merge: dedup index, dropna before concat
- Fix NaN in scenario Z paths: fallback to z_scenario
- Update config.yaml with verified stat codes