Variet Agent
f35ab389d5
feat(data): add 6 new ECOS variables (건설투자/총고정자본형성/총저축률/국내총투자율/수출입GNI/제조업가동률) to 37-variable pool
2026-03-11 17:13:21 +09:00
Variet Agent
2406dac6a2
docs: session close - devlog update, Phase 3-6 complete
2026-03-11 16:25:58 +09:00
Variet Agent
8a0d6e7574
docs: update methodology with KAP-based PD floor values and WR->D correction logic
2026-03-11 16:22:08 +09:00
Variet Agent
a4c9a702ad
feat(pipeline): wire 7x7 Zt + 8x8 CCC expansion into main.py lifetime PD
2026-03-11 16:19:58 +09:00
Variet Agent
a406d98226
feat(data): add CCC interpolator module (7x7 -> 8x8 expansion)
2026-03-11 16:07:30 +09:00
Variet Agent
2b94cc802d
feat(pipeline): update transition_matrices and config for 7x7 Zt estimation
2026-03-11 16:00:07 +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
0762fcc5d8
docs: session close — devlog, known-issues, verification xlsx
...
- known-issues: Zt sign convention bug, ECOS coverage
- devlog: 2026-03-11 (5 items)
- results: pipeline_verification.xlsx, transition_matrix_audit.xlsx
2026-03-11 08:06:11 +09:00
Variet Agent
0e1e0e5cf2
feat(tools): comprehensive pipeline verification Excel generator
...
10 sheets: TTC, thresholds, yearly TMs, Zt estimation detail,
conditional TM formula breakdown, macro raw/features/correlation,
regression model, and formula summary
2026-03-11 08:02:36 +09:00
Variet Agent
cc55acc330
feat(analysis): v3 re-analysis with 31 ECOS variables
...
Best model: CREDIT_SPREAD_LAG1 + USDKRW + HOUSING_PRICE (R²=0.646)
- 31 raw vars → 80+ features (DIFF/LAG1/PCT/spreads)
- 2267 valid combos searched (collinearity filtered)
- All Top 10 sign-consistent
- Zt sign corrected: Z+ = 호황 (Belkin convention)
2026-03-11 07:55:36 +09:00
Variet Agent
49c7661888
feat(data): expand to 31 macro variables with full fallback
...
Added 10 new variables:
- FACILITY_INVEST (설비투자지수)
- RETAIL_SALES (소매판매액지수)
- CURRENT_ACCOUNT (경상수지)
- EMPLOYED (취업자수)
- EMPLOYMENT_RATE (고용률)
- OIL_PRICE (두바이유 연평균)
- COINCIDENT (동행종합지수)
- BSI_MANUF (제조업 BSI 전망)
- CONSTRUCTION_DONE (건설기성액)
- SPI (서비스업생산지수)
Total: 31 variables × 26 years (2000-2025)
2026-03-11 07:52:04 +09:00
Variet Agent
92ce84ad96
feat(data): comprehensive ECOS fetcher with 21+ variables, CSV caching
...
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
2026-03-11 07:45:52 +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
93887f49dd
refactor(macro): sign-consistent re-analysis, rate DIFF only
...
- 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
2026-03-11 07:17:33 +09:00
Variet Agent
811d6ee843
feat(macro): comprehensive variable exploration, R²=0.028→0.747
...
- New: data/macro_analysis.py (15 base × 6 transforms = 116 candidates)
- Top correlations: CORP_AA_LOGR(r=-0.75), credit spread, term spread
- Exhaustive 3-var search (1749 combos), best adj.R²=0.71
- Modified: data/macro_data.py
- Added GOVT_3Y, CORP_AA, CORP_BBB ECOS queries + fallback data
- New: compute_derived_features() for optimal 3 predictors
- Modified: main.py
- Computes derived features + passes combined input to stepwise
- Scenario paths now include derived features for prediction
- Selected 3 variables: CORP_AA_LOGR, CPI_GROWTH, CREDIT_SPREAD_LAG1
- All 8/8 validation tests pass (incl. R² now Pass)
2026-03-11 06:55:02 +09:00
Variet Agent
8af743e6f3
feat(data): parse 3-agency PDF transition matrices to CSV #task-290
...
- New: data/parse_pdf_matrices.py (KR/NICE/SCI PDF parser)
- KR: text-based parser (space-separated numbers + dashes)
- NICE: text-based parser (clean numeric format)
- SCI: pdfplumber table extraction (column-position-aware)
- WR redistribution, B이하→B mapping, CCC extrapolation from PD patterns
- Modified: data/transition_matrices.py (added source='real' loader)
- Modified: config.yaml (data.transition_source: 'real')
- Modified: main.py (reads transition source from config)
- Output: 112 CSV files (KR/NICE/SCI/AVG × 28 years)
2026-03-11 01:07:27 +09:00
Variet Agent
ebdc6b805b
chore: migrate .agent/ to .agents/ directory structure
2026-03-11 00:31:59 +09:00
Variet Agent
6aaff48856
docs: fill .agents/references with actual project content (architecture, tech-stack, conventions)
2026-03-10 23:02:19 +09:00
Variet Agent
bc38d7e933
docs: devlog + known-issues (ECOS API codes, CP949, pandas fillna)
2026-03-10 22:57:02 +09:00
Variet Agent
9fba224623
fix(ecos): correct all 6 ECOS API stat/item codes #task-292
...
- 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
2026-03-10 22:53:51 +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