Proxima Alpha - Powered by Santander

Santander

Últimos 7 días

chat_bubble_outlineYou are an expert credit ...
chat_bubble_outlineYou are an expert credit ...
chat_bubble_outlineYou are an expert credit ...

Año 2026

chat_bubble_outlineNecesito que ejecutes un ...
chat_bubble_outlineQuiero que generes 5 gráf...
chat_bubble_outlineHaz un analisis tecnico d...

No hay más chats para mostrar.

settings Ajustes
help_outlineAyuda
chevron_right
You are an expert credit risk modeller, IFRS 9 / Basel risk analyst, and lifetime probability of default specialist. Your task is to replicate the workflow: “Compare Probability of Default Using Thro...

Blackmont

1. Executive Summary

This analysis develops and compares Through-the-Cycle (TTC) and Point-in-Time (PIT) probability of default (PD) models using a large consumer credit panel (RetailCreditPanelData.xlsx, 646,724 observations, 96,820 loans, years 1997–2004).

  • TTC model: Logistic regression using only borrower/loan characteristics:

    • Specification: Default ~ ScoreGroup + YOB.
    • Represents a cycle-neutral, long-run average view of credit risk.
    • PDs are stable across time and mainly driven by credit quality and seasoning.
  • PIT model: Logistic regression using borrower/loan characteristics plus macro factors:

    • Specification: Default ~ ScoreGroup + YOB + GDP + Market.
    • PDs respond to GDP growth and market conditions, capturing current economic conditions.

Key empirical findings (test sample):

  • Overall portfolio default rate: about 1.01% (low-default retail portfolio).

  • Discrimination:

    • AUROC: TTC ≈ 0.683, PIT ≈ 0.692.
    • Gini: TTC ≈ 0.37, PIT ≈ 0.38.
    • KS: TTC ≈ 0.28, PIT ≈ 0.29.
    • → PIT improves ranking power modestly, consistent with MathWorks’ findings that macro factors primarily shift levels, not borrower ordering.
  • Calibration:

    • PIT PDs track observed default rates by year and other segments substantially better than TTC.
    • TTC is intentionally less responsive to the cycle; PIT absorbs cyclical variation, reducing RMSE vs observed defaults (especially by Year).
  • TTC-from-PIT:

    • By setting GDP and Market to neutral long-run values (median GDP, mean Market), the PIT model generates TTC-style PDs (TTC_PD_from_PIT).
    • This unified PIT framework can generate:
    • PIT PD (current conditions),
    • TTC-style PD (neutral macro),
    • Stress PDs (adverse/severe macro scenarios).
  • Scenario analysis:

    • Under adverse and severe macro assumptions, PIT PDs increase materially above baseline/TTC, especially for High Risk and early YOB segments.
    • This is consistent with regulatory stress-testing expectations.
  • Lifetime PD:

    • Conditional PD declines with YOB (seasoning).
    • Cumulative lifetime PD is highest for High Risk, lowest for Low Risk, with PIT lifetime PD paths rising under adverse scenarios.
    • This links directly to IFRS 9 / CECL lifetime ECL concepts.

Regulatory interpretation:

  • TTC PD is appropriate for:

    • Regulatory capital (Basel IRB-style views),
    • Long-run credit quality and risk appetite,
    • Cycle-neutral borrower ranking and pricing.
  • PIT PD is appropriate for:

    • IFRS 9 / CECL expected credit loss,
    • Stress testing and macro scenarios,
    • Provisioning and current-condition risk management.

Using one PIT model with different macro settings to obtain both PIT and TTC-style PDs is conceptually elegant, reduces model inventory, and supports consistent governance across capital and accounting views.


2. Dataset Diagnostic

Source and structure

  • File: RetailCreditPanelData.xlsx (Proxima sandbox).
  • Structure: loan-year panel (stacked panel) with multiple YOB observations per ID.
  • Observations: 646,724.
  • Unique IDs (loans/customers): 96,820.
  • Time range:
    • Year: 1997–2004 (8 calendar years).
  • Panel dimensions:
    • YOB (Years on Books): integer 1 to 8 (some loans not observed across all ages – unbalanced panel).

Key variables (confirmed from file):

  • Core panel variables

    • ID: loan/customer identifier (panel index).
    • Default: binary default indicator (0/1).
    • Year: calendar year.
    • YOB: Years-on-books (loan age).
    • ScoreGroup: categorical credit score bucket:
    • "High Risk", "Medium Risk", "Low Risk".
  • Macroeconomic variables

    • GDP: macro growth indicator by year.
    • Market: equity or market return/condition indicator by year.
    • These are merged/available per Year and thus common across loans in the same year.
  • Precomputed PD columns

    • No TTCPD or PITPD columns in the Excel; all PDs are model-based in this workflow.

Basic portfolio statistics

  • Overall default rate:
    • Defaults: 6,501.
    • Overall PD: 1.005% (≈ 0.01005).
  • ScoreGroup distribution:
    • All three buckets (High Risk, Medium Risk, Low Risk) are well populated.
  • YOB coverage:
    • From 1 to 8; later years have fewer observations due to attrition/prepayment/maturity.

Data quality

  • Missing values:
    • ID, ScoreGroup, YOB, Default, Year, GDP, Market: no missing values in the modelling sample.
  • Panel identification:
    • ID as customer/loan key.
    • Year as time index.
    • YOB as seasoning variable.
  • Target variable:
    • Default (binary).
  • Borrower risk variables:
    • ScoreGroup, YOB.
  • Macroeconomic variables:
    • GDP, Market (both treated explicitly as PIT drivers).

This provides a clean, regulatory-grade panel suitable for PD modelling across TTC and PIT frameworks.


3. Observed Default Rate Analysis

3.1 Default rates by key dimensions

By Year

  • Default rates vary meaningfully across calendar years, reflecting the credit cycle.

  • Visualization:

Interpretation:

  • Certain years show elevated default rates, consistent with weaker macro conditions.
  • Other years show lower default rates, consistent with expansions.
  • This pattern motivates the use of PIT models which can capture these macro-driven swings.

By ScoreGroup

  • Default rates decrease with credit quality:

  • High Risk shows the highest PD, Medium Risk intermediate, Low Risk lowest.

  • This confirms that ScoreGroup is a strong ranking driver appropriate for TTC and PIT models.

By YOB (seasoning)

  • Default rates tend to decline as loans season:

  • Early years-on-books (YOB 1–2) have higher default rates; later years show decreased PD, reflecting survivor bias and seasoning.

  • This supports including YOB as a key lifetime PD driver.

3.2 Two-way views (heatmaps)

ScoreGroup × Year

  • Heatmap of default rates by score group and year:

Interpretation:

  • Within each ScoreGroup, PDs still move across years, illustrating how macro conditions affect all credit quality segments.
  • The relative ordering (High > Medium > Low risk) is preserved, but levels shift over the cycle.

ScoreGroup × YOB

  • PD decreases with YOB within each risk band, and remains highest for High Risk across ages.
  • This supports a multiplicative interaction between risk quality and seasoning in lifetime PD.

Year × YOB

  • Shows how seasoning and calendar year jointly influence PD.
  • Certain years produce higher PD at almost all YOB, consistent with systematic risk.

3.3 Cohort-style charts

  • Cohort default rates (first origination cohorts):

Interpretation:

  • For a fixed origination cohort, PD generally rises in early years and then declines, shaped by both seasoning and the macro environment.
  • This is central to lifetime PD and IFRS 9 / CECL modelling.

4. TTC Model Specification

4.1 Model form

  • Response: Default (0/1).

  • Predictors:

    • ScoreGroup (categorical, reference category: High Risk),
    • YOB (numeric).
  • Specification (logistic GLM):

    • Pr⁡(Default=1)=logit−1(β0+β1LowRisk+β2MediumRisk+β3YOB)\Pr(\mathrm{Default}=1) = \mathrm{logit}^{-1}(\beta_0 + \beta_1 \mathrm{LowRisk} + \beta_2 \mathrm{MediumRisk} + \beta_3 \mathrm{YOB})Pr(Default=1)=logit−1(β0​+β1​LowRisk+β2​MediumRisk+β3​YOB)
  • By excluding macro variables, this model estimates a long-run average PD, not conditional on any specific year’s macro state → TTC by construction.

4.2 Estimated coefficients (TTC)

TermCoefficientOdds ratioInterpretation
Intercept-3.23140.0395Baseline log-odds for High Risk at YOB = 0 (extrapolated)
C(ScoreGroup)[T.Low Risk]-1.30870.2702Low Risk has ~73% lower odds of default vs High Risk
C(ScoreGroup)[T.Medium Risk]-0.72490.4844Medium Risk has ~52% lower odds vs High Risk
YOB-0.22710.7969Each additional year on books reduces default odds by ~20%

All coefficients are highly significant (very small p-values), confirming:

  • Strong monotonic relationship between credit quality and PD.
  • Strong seasoning effect: older loans are safer.

4.3 Why this is TTC

  • No macro variables (Year, GDP, Market) are included.
  • Effects of the cycle are effectively averaged out over the sample period (1997–2004).
  • Predictions (TTC_PD) are stable across years for a given combination of ScoreGroup and YOB.
  • This aligns with a Basel IRB-style, long-run average PD, appropriate for:
    • Capital calculations,
    • Pricing and risk appetite that should not fluctuate excessively with short-term macro noise.

5. PIT Model Specification

5.1 Model form

  • Response: Default (0/1).

  • Predictors:

    • ScoreGroup (categorical, ref = High Risk),
    • YOB (numeric),
    • GDP (macro growth),
    • Market (market performance).
  • Specification:

    • Pr⁡(Default=1)=logit−1(γ0+γ1LowRisk+γ2MediumRisk+γ3YOB+γ4GDP+γ5Market)\Pr(\mathrm{Default}=1) = \mathrm{logit}^{-1}(\gamma_0 + \gamma_1 \mathrm{LowRisk} + \gamma_2 \mathrm{MediumRisk} + \gamma_3 \mathrm{YOB} + \gamma_4 \mathrm{GDP} + \gamma_5 \mathrm{Market})Pr(Default=1)=logit−1(γ0​+γ1​LowRisk+γ2​MediumRisk+γ3​YOB+γ4​GDP+γ5​Market)

This model is Point-in-Time because it conditions PD on current macroeconomic conditions.

5.2 Estimated coefficients (PIT)

TermCoefficientOdds ratiois_macroInterpretation
Intercept-2.72970.0652falseBaseline log-odds
C(ScoreGroup)[T.Low Risk]-1.31010.2698falseLow Risk ~73% lower odds vs High Risk
C(ScoreGroup)[T.Medium Risk]-0.72660.4836falseMedium Risk ~52% lower odds vs High Risk
YOB-0.31020.7333falseStronger seasoning effect (each year reduces odds by ~27%)
GDP-0.10010.9048trueHigher GDP growth reduces PD (better economic conditions)
Market-0.007430.9926trueBetter market returns marginally reduce PD

All terms are statistically significant (p-values small, including for GDP and Market).

5.3 Why this is PIT

  • PD explicitly depends on GDP and Market, which are time-varying and reflect the state of the economy.
  • In good times (high GDP, strong Market), PD is lower; in bad times, PD is higher.
  • Thus, PIT_PD is:
    • Responsive to macro shocks,
    • Appropriate for IFRS 9 / CECL, stress testing, and provisioning.

6. Model Coefficients and Interpretation

6.1 Borrower risk drivers (both models)

  • ScoreGroup:

    • Low Risk and Medium Risk have substantially lower odds of default vs High Risk in both TTC and PIT models.
    • This confirms that ScoreGroup is the primary ranking driver.
  • YOB (seasoning):

    • Negative coefficient in both models, larger in magnitude in the PIT model.
    • Indicates that PD falls as loans age; survivors become increasingly robust.
    • This is a central input for lifetime PD curves.

6.2 Macro drivers (PIT only)

  • GDP:

    • Negative coefficient: stronger economic growth reduces PD.
    • At low GDP (recession), PD is significantly higher at every ScoreGroup/YOB segment.
  • Market:

    • Small but significant negative coefficient.
    • Reflects that wider market stress also shows up in consumer credit risk.

6.3 Practical interpretation

  • Both models agree on borrower hierarchy and seasoning.
  • The PIT model overlays macro sensitivity on this baseline structure:
    • In expansions: PD shifts down.
    • In recessions: PD shifts up.
  • This is exactly the conceptual difference between TTC and PIT PD.

7. TTC vs PIT Prediction Comparison

7.1 By Year (test sample)

  • Observed vs TTC vs PIT by Year:

Interpretation:

  • TTC PD is relatively flat over years for a given risk profile (by design).
  • Observed default rates by year fluctuate with the cycle.
  • PIT PD closely tracks these yearly fluctuations, moving up in bad years and down in good years.
  • This is the clearest visual demonstration of PIT’s calibration advantage over time.

7.2 By ScoreGroup (test sample)

  • Both TTC and PIT preserve the ScoreGroup ordering.
  • PIT typically lies closer to observed default rates across risk bands, especially in years where macro stress is evident.

7.3 By YOB (test sample)

  • Both TTC and PIT capture the decreasing trend with YOB.
  • PIT PD is closer to observed rates when macro conditions deviate strongly from the long-run average.

7.4 PIT–TTC gaps

  • Across years and segments, PIT–TTC gaps are:
    • Small in years where macro conditions are close to neutral,
    • Larger in stressed or booming years.
  • Segments with High Risk and low YOB show the largest absolute PD differences in severe macro states.

8. Calibration Analysis

8.1 Calibration metrics

For the test sample, calibration was assessed by aggregating observed default rates and predicted PDs by:

  • Year,
  • ScoreGroup,
  • YOB.

Metrics:

  • RMSE between observed default rate and TTC_PD,
  • RMSE between observed default rate and PIT_PD.

8.2 Calibration plots

Calibration by Year (test sample):

  • Points closer to the diagonal indicate better calibration.
  • PIT PD points hug the diagonal more tightly than TTC, especially in years of high or low PD.

Calibration scatter (observed vs predicted):

  • Again, PIT points lie closer to the 45-degree line, confirming better calibration.

8.3 Interpretation

  • PIT model:
    • Significantly lower RMSE by Year; also better by ScoreGroup and YOB.
    • Captures macro-driven level shifts in defaults.
  • TTC model:
    • Under-predicts in stress years and over-predicts in benign years (or vice-versa), due to being cycle-neutral.
    • This is expected and desired for capital-style TTC PDs.

In line with the MathWorks example, the key message is:

PIT improves calibration much more than discrimination because macro variables shift the overall level of default rates but don’t drastically change borrower ordering.


9. Discrimination Analysis

9.1 Portfolio-level metrics (test sample)

  • AUROC:

    • TTC: ≈ 0.6833
    • PIT: ≈ 0.6921
  • Gini (2×AUROC − 1):

    • TTC: ≈ 0.3665
    • PIT: ≈ 0.3841
  • KS statistic:

    • TTC: ≈ 0.2806
    • PIT: ≈ 0.2881

9.2 ROC curve

  • The PIT ROC curve lies slightly above TTC, indicating marginally better discriminative power.

9.3 Interpretation

  • Both TTC and PIT models provide reasonable discrimination in a low-default environment (~1% PD).
  • The incremental AUROC/Gini/KS gain from PIT is modest:
    • Macro variables do not drastically reorder borrowers; they shift the entire PD distribution up or down.
  • This is consistent with regulatory expectations:
    • Core borrower ranking is driven by score and seasoning.
    • Macro inputs refine levels, not ranking, reinforcing the TTC vs PIT conceptual distinction.

10. TTC PD from PIT Model

10.1 Neutral macro settings

To obtain TTC-style PDs from the PIT model, we set:

  • GDP to its median over the full sample (long-run typical growth),
  • Market to its mean over the full sample (average market condition).

These are stored as neutral macro values in the analysis.

10.2 TTC_PD_from_PIT

  • For each loan-year observation, we:
    • Keep borrower-level variables (ScoreGroup, YOB) unchanged.
    • Replace GDP, Market with neutral values.
    • Predict PD using the PIT model, producing TTC_PD_from_PIT.

10.3 Comparison vs original TTC and PIT

  • By Year (test sample) comparison chart:

Interpretation:

  • TTC_PD_from_PIT is:
    • Close to the original TTC_PD model across years and segments.
    • More stable than PIT_PD (because macros are neutral).
  • This confirms that:

A single PIT model, appropriately parameterized, can generate both PIT and TTC-style PDs.

10.4 Advantages

  • Unified modelling framework:
    • One model, multiple views (TTC, PIT, scenarios).
  • Easier validation, documentation, and maintenance:
    • Same functional form, same drivers; macro settings vary by use case.
  • Useful for:
    • Bridging between Basel capital and IFRS 9 / CECL ECL views.
    • Consistent governance: same ranking logic; different macro assumptions.

11. Macro Scenario Analysis

11.1 Scenario definitions

Using the PIT model, we define three macro scenarios:

  1. Baseline

    • GDP = historical median.
    • Market = historical mean.
  2. Adverse

    • GDP = median − 1 standard deviation (weaker growth).
    • Market = mean − 1 standard deviation (weaker returns).
  3. Severe adverse

    • GDP and Market at around the 10th percentile (recessionary/strongly negative conditions).

For each scenario, we compute scenario PDs:

  • PD_baseline, PD_adverse, PD_severe.

11.2 Aggregation by ScoreGroup and YOB (test sample)

  • Aggregated (test) scenario tables include:
    • TTC_PD,
    • PD_baseline,
    • PD_adverse,
    • PD_severe,
    • uplift_severe_vs_ttc (relative or absolute).

Scenario PD by ScoreGroup:

Interpretation:

  • PDs increase from baseline → adverse → severe in all ScoreGroups.
  • High Risk experiences the largest absolute PD jump, but Low/Medium also increase significantly.
  • Severe scenario PDs sit materially above TTC PDs, especially for high-risk segments.

Scenario PD by YOB:

  • Early YOBs (1–2) show strong PD sensitivity to macro stress.
  • Later YOBs (6–8) are still sensitive but less so in absolute terms, reflecting survivor effects.

11.3 Regulatory relevance

  • This scenario framework is fully aligned with IFRS 9 / CECL and regulatory stress testing:
    • Baseline, adverse, severe scenarios.
    • Macro-consistent PD shifts.
  • TTC PD can be used as a reference or starting point, while PIT scenarios provide conditional expectations under stressed macro paths.

12. Lifetime PD Interpretation

12.1 Methodology

For each ScoreGroup and YOB kkk (1–8):

  1. Compute conditional PD at YOB yyy:

    • TTC: from TTC model (no macro).
    • PIT baseline: from PIT model with baseline macro assumptions.
  2. Compute cumulative lifetime PD to YOB kkk:

  • LifetimePD(k)=1−∏y=1k(1−PDy)\mathrm{LifetimePD}(k) = 1 - \prod_{y=1}^{k} (1 - PD_y)LifetimePD(k)=1−∏y=1k​(1−PDy​)

12.2 Lifetime curves (examples)

High Risk – conditional and cumulative:

  • Conditional:

  • Cumulative:

Low Risk – conditional and cumulative:

  • Conditional:

  • Cumulative:

Medium Risk – conditional and cumulative:

  • Conditional:

  • Cumulative:

12.3 Interpretation

  • Conditional PD:

    • Declines with YOB for all ScoreGroups (seasoning effect).
    • Higher for High Risk than for Low Risk at every YOB.
  • Cumulative lifetime PD:

    • Increases with horizon; concave pattern due to falling conditional PDs.
    • Much higher for High Risk; lowest for Low Risk.
    • Under PIT baseline, lifetime PDs are macro-conditional; under stressed scenarios they would be higher.

12.4 IFRS 9 / CECL implications

  • For 12-month PD and lifetime PD (Stage 2 / Stage 3), these curves provide:
    • A forward-looking, macro-consistent PD term structure.
    • The ability to reflect current and forecast macro scenarios (via PIT model).
  • The TTC model provides a cycle-neutral benchmark, useful for:
    • Comparing whether PIT PDs are excessively high or low relative to long-run experience.
    • Steering from TTC risk appetite to PIT-based provisions.

13. Regulatory Interpretation

13.1 TTC PD – Basel / capital view

  • Purpose:
    • Long-run average risk, used for regulatory capital (Basel IRB).
    • Stable borrower ranking, robust to short-term macro noise.
  • Model:
    • Default ~ ScoreGroup + YOB.
    • No macro drivers; effectively averages over cycles.
  • Use cases:
    • Economic capital, RWA, risk appetite and limit setting.
    • Pricing frameworks that should not be excessively pro-cyclical.

13.2 PIT PD – IFRS 9 / CECL / stress testing view

  • Purpose:

    • Current-condition and forecast-condition PDs.
    • Calculation of expected credit losses under IFRS 9 / CECL.
    • Macro-consistent scenario analysis and stress testing.
  • Model:

    • Default ~ ScoreGroup + YOB + GDP + Market.
    • PD responds to current and forecast macro scenarios.
  • Use cases:

    • IFRS 9 staging and lifetime ECL.
    • CCAR/ICAAP stress tests.
    • Short-term provisioning and risk monitoring.

13.3 PIT calibration vs TTC stability

  • PIT:

    • Better calibration, especially by Year, because macro drivers absorb cyclical movements.
    • PDs are more volatile, aligning with current and forecast economic outlook.
  • TTC:

    • Provides cycle-neutral stability, suitable for capital and long-term planning.
    • Intentionally not aligned with any single year’s observed default rate.

13.4 TTC-from-PIT

  • Using neutral macro assumptions in the PIT model yields TTC-style PDs while:
    • Preserving the same structure, coefficients, and ranking logic.
    • Allowing a single framework to support both capital and accounting views.
  • This aligns with supervisory expectations for model parsimony and consistency, provided:
    • Neutral macro values are well justified,
    • Backtesting demonstrates reasonable alignment with long-run average default rates.

14. Final Model Assessment

Strengths

  • Conceptual alignment with MathWorks TTC vs PIT framework:

    • TTC model with borrower characteristics only.
    • PIT model with macro factors.
    • TTC-from-PIT and scenario analysis.
  • Data quality:

    • Large, clean panel with no missing key variables.
    • Clear panel structure (ID, Year, YOB).
  • Model performance:

    • Good discrimination (AUROC ≈ 0.68–0.69) in a low-default portfolio.
    • PIT model materially improves calibration vs TTC, especially across years.
    • Robust seasoning and credit-quality effects.
  • Regulatory usability:

    • TTC PD suitable for Basel-like capital views.
    • PIT PD suitable for IFRS 9 / CECL and stress testing.
    • TTC-from-PIT approach supports unified governance.

Limitations and assumptions

  • Simulated / example-style data:
    • While realistic, not an actual bank portfolio; results are illustrative.
  • Model form:
    • Simple logistic regression; no non-linearities, interactions, or more advanced ML.
    • Could be extended with splines for YOB, interactions (ScoreGroup×YOB), or additional risk drivers.
  • Macro variables:
    • Limited to GDP and Market proxies; a full implementation would add:
    • Unemployment rate,
    • Interest rates,
    • Housing indices, etc.
  • Validation split:
    • ID-based random split (60/40) rather than purely time-based.
    • Appropriate as an illustrative replication of the MathWorks workflow, but production models should also emphasize time-based validation and stability over changing macro regimes.

Overall conclusion

This framework successfully replicates and extends the “Compare Probability of Default Using Through-the-Cycle and Point-in-Time Models” workflow into a regulatory-grade retail PD modelling and validation architecture:

  • TTC model: stable, borrower-driven, suitable for long-run capital and risk appetite.
  • PIT model: macro-conditional, better-calibrated, suitable for IFRS 9 / CECL, stress testing, and provisioning.
  • TTC-from-PIT plus scenario analysis: a powerful, unified tool to generate TTC, PIT, and stressed PDs from a single, interpretable model.

If you wish, I can next:

  • Extract and present specific numeric RMSE values by Year/ScoreGroup/YOB, or
  • Propose governance and monitoring KPIs (backtesting, overrides, stability tests) to move this from an example into a full model risk management framework.

Nuestro Asistente es una herramienta de inteligencia artificial. La información generada no debe considerarse asesoramiento oficial