6 Commits

Author SHA1 Message Date
Variet Agent
d1ddf06e5d feat(model): KAP YTM PD floor integration, expanded 226-var search, ADF fix (AIC->BIC), Model#2 with 6-test diagnostics
- Replace hardcoded DEFAULT_PD_FLOORS with build_complete_pd_floor_table() (KAP bond YTM)
- Fix ADF test: autolag='AIC' -> 'BIC' for small sample (N=26) robustness
- Expand variable search: 40 -> 226 vars (log/diff/return/lag2), 1.9M combos
- Select Model #2: HOUSING_PRICE + CREDIT_SPREAD_LAG1 + CURRENT_ACCOUNT_R
- Add 6-test diagnostics table to AR1 sheet (ADF/LB/DW/BP/ARCH/Shapiro)
- Add Korean variable names for transformed variables
- Generate report v7 with full diagnostics
2026-03-12 00:06:23 +09:00
Variet Agent
87725b7c19 feat: 3-variable macro model (USDKRW+RETAIL_SALES+INVEST_RATE), forced_vars support, methodology sync 2026-03-11 17:30:06 +09:00
Variet Agent
b8514c1251 feat(data): implement market-implied PD floor and 7x7 transition matrix parsing #task-290 2026-03-11 15:53:38 +09:00
Variet Agent
d61c538308 fix(critical): complete Zt sign alignment across all modules
Fixed ALL instances of (d - sqrt_rho*z) -> (d + sqrt_rho*z):
- models/vasicek.py: conditional_transition_matrix() (used by lifetime PD)
- data/transition_matrices.py: _generate_model_consistent_matrix()
- models/credit_cycle.py: already fixed in previous commit

Added sign convention docs:
- vasicek.py conditional_pd() uses Basel convention (Z↑=loss↑)
- conditional_transition_matrix() uses Belkin convention (Z↑=호황)
- Both conventions documented in module docstrings

Pipeline 8/8 validation pass after fix
2026-03-11 07:36:52 +09:00
Variet Agent
1a4cc873d9 fix(critical): Zt sign convention — align with Belkin & Suchower (1998)
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
2026-03-11 07:30:15 +09:00
Variet Agent
3a9374c61a feat: Lifetime PD (50yr) - Belkin & Suchower + Vasicek model
- Belkin & Suchower (1998) credit cycle index (Zt) estimation via WLS
- Vasicek single-factor conditional PD/TM model
- Macro-Zt OLS regression with stepwise variable selection
- 3-scenario (boom/neutral/recession) 50yr PD projection
- Statistical validation suite (ADF, Ljung-Box, R2, ARCH)
- BOK ECOS API integration with fallback data
- Visualization module (7 chart types)
- Detailed theoretical methodology docs/methodology.md
2026-03-10 21:57:34 +09:00