## 2.1 Constructing Economy-level PD Indices

## Source details

**Canonical URL:** [2.1 Constructing Economy-level PD Indices](https://www.imf.org/-/media/files/publications/wp/2022/english/wpiea2022153-print-pdf.pdf)

## Other formats

- [Markdown version](/-/media/files/publications/wp/2022/english/wpiea2022153-print-pdf.pdf.md)
- [Structured JSON version](/-/media/files/publications/wp/2022/english/wpiea2022153-print-pdf.pdf.json)

---

### Data source and nature of the PD measure
- Quarterly PD data: Credit Research Initiative database of the National University of Singapore (NUS-CRI PD).
- PD derivation: reduced form model (Duan et al., 2012) using market-based variables (distance-to-default (Merton, 1974)), accounting-based firm-specific attributes, and macro-financial factors including stock returns, cash-to-asset ratio, current assets-to-current liabilities ratio, net-income-to-total-asset ratio, relative market cap and relative market-to-book ratio.
- Forecast performance: accuracy ratio of 80% in 12 month forecasts.
- Coverage: daily PD of firm-level corporate bonds with maturities up to 5 years; analysis focuses on 12-month default probability for non-financial sector firms.

### Construction of economy-level PD indices
- Aggregation: capital-weighted averages of firm-level PDs at the end of each quarter.
- Firm capital (beginning of each year): stock price × common shares outstanding (Compustat Global).
- Matching: NUS-CRI PD matched to Compustat Global using ISIN.

### Matching, imputation, and sample coverage
- Total firm-quarter observations: 2,749,611.
- Matched with firm capital data: 2,367,880 firm-quarter observations.
- Imputation procedure for missing capital:
  - First: median of other firms’ capital values in same sector, quarter and economy.
  - Second: median of other firms’ capital values in same quarter and economy.
- Minimum coverage rule: at least 20 firms for each economy-quarter observation.
- Final coverage after discarding insufficient observations: 61,960 firms from 88 economies.
- Earliest data: starts in March 1990.
- Sample end for paper: last quarter of 2021.

*Source: wpiea2022153-print-pdf — 2.1 Constructing Economy-level PD Indices.*

---

### Appendix A — Model Estimates and Periods of High Corporate Sector Distress

### Markov Regime-switching model key parameters
- Mean of PDs in high-PD regime: around 3.7 times the ones in low-PD regime.
- Volatility of innovation in PDs: around 5.9 times higher in high-PD regime than in low-PD regime.
- Identification threshold: posterior probability ≥ 50% for high-PD regime marks distress.
- Sample cutoff: economies with more than 10 years of observations; sample includes 66 economies after cutoff.
- Total identified episodes: 193 episodes of distress events.
- Average time in distress: economies experience corporate distress 18% of the time on average.
- Documented captured events include: 1995 Mexico crisis, 1997 Asian crisis, 2000-01 dot-com bubble/burst, 2012 European Debt crisis, 2007-08 Global Financial Crisis, and high corporate distress starting in 2020 due to Covid-19.
- Overlap with banking crises: many overlaps, but several corporate distress episodes occur without overlapping banking crises; most external crises are covered by corporate distress periods.

### Posterior summaries (Table 3 exact values)
- ρ: Posterior Mean 0.913; Standard deviation 0.01; Median 0.913; 5% Quantile 0.902; 95% Quantile 0.925
- δ+1: Posterior Mean 3.68; Standard deviation 0.85; Median 3.68; 5% Quantile 2.33; 95% Quantile 5.09
- γ+1: Posterior Mean 5.9; Standard deviation 0.15; Median 5.9; 5% Quantile 5.63; 95% Quantile 6.17
- p11: Posterior Mean 0.95; Standard deviation 0.00; Median 0.95; 5% Quantile 0.94; 95% Quantile 0.96
- p22: Posterior Mean 0.81; Standard deviation 0.01; Median 0.81; 5% Quantile 0.78; 95% Quantile 0.83

---

### 4 An Early-warning System for Corporate Distress

### Objective, target variable, and classification
- Goal: predict onset of corporate distress periods within a one-year horizon using corporate distress definition from Section 3 and predictors from Section 2.
- Observation classes: pre-distress periods, distress periods, calm periods. Model focuses on distinguishing pre-distress from calm periods; distress periods discarded when estimating and evaluating.
- Notation: Cit = 1 when corporate sector distress in economy i starts at time t; Cit+1,t+h = 1{∃s ∈ [t+1,t+h] s.t. Cis = 1}. Model estimates Prob(Cit+1,t+h = 1 | xit) = f(xit).

### Models estimated
- Five classifiers: Logit Lasso, Linear Discriminant Analysis (LDA), Support Vector Machine (SVM), Random Forest (RF), Extreme Gradient Boost (XGBoost).

### Model combination and estimated weights
- Aggregation: optimal pooling approach (Geweke and Amisano, 2011), combined model ˆf(x) = Σm=1^M wm ˆfm(x) subject to Σm wm = 1 and 0 ≤ wm ≤ 1.
- Empirical weights (fixed after selection based on predictors before 2004Q1):
  - XGBoost: 76%
  - Logit regression: 5%
  - LDA: 19%
  - SVM: 0%
  - Random Forest: 0%

### Cross-validation adaptations (H-block)
- Time-dependent cross-validation: divide T into K consecutive time blocks Tk; define Bk,test = {(i,t) | t ∈ Tk} and Bk,train leaving gaps of h before and 2h after Bk,test to reduce dependence.
- Forecast horizon focus: 4 quarters.
- Hyper-parameters selected by maximizing cross-validation AUROC using data up to 2005Q1; 5-fold cross-validation on predictors before 2004Q1 used in weight estimation.

### Out-of-sample exercise specifics
- Exercise starts: 2005Q1.
- Avoid forward-looking bias: training predictors are at least 4 quarters behind testing set.
- First training set uses predictors before 2004Q1.
- Re-estimation frequency: each Q1 of the year.
- Missing data handling:
  - Impute missing predictors with sample median when estimating and forecasting, except:
    - XGBoost handles missing data internally.
    - LDA generates probability conditional on available predictors.
  - Observations with > 10 missing predictors excluded.
- Forecasts: conditional on predictors in each quarter of the year, using model estimated at Q1.

### Model performance (exact values)
- Out-of-sample AUROC (Table 4):
  - All Economies: XGBoost 0.65; Logit 0.64; SVM 0.55; Random Forest 0.59; LDA 0.64; Combination 0.67
  - Advanced Economy: XGBoost 0.68; Logit 0.63; SVM 0.55; Random Forest 0.61; LDA 0.63; Combination 0.68
  - Emerging Market: XGBoost 0.62; Logit 0.65; SVM 0.54; Random Forest 0.57; LDA 0.65; Combination 0.65
- Out-of-sample Log-likelihood (Table 4):
  - All Economies: XGBoost −1083.42; Logit −1163.00; SVM −1476.90; Random Forest −1146.92; LDA −1274.32; Combination −1071.11
  - Advanced Economy: XGBoost −583.98; Logit −666.75; SVM −866.67; Random Forest −646.96; LDA −758.36; Combination −590.81
  - Emerging Market: XGBoost −499.45; Logit −496.25; SVM −610.23; Random Forest −499.96; LDA −515.96; Combination −480.31
- Cross-validation AUROC (10-fold on whole sample; Table 5):
  - All Economies: XGBoost 0.68; Logit 0.66; SVM 0.56; Random Forest 0.67; LDA 0.70; Combination 0.71
  - Advanced Economy: XGBoost 0.70; Logit 0.68; SVM 0.57; Random Forest 0.69; LDA 0.71; Combination 0.72
  - Emerging Market: XGBoost 0.66; Logit 0.63; SVM 0.54; Random Forest 0.63; LDA 0.67; Combination 0.68
- Cross-validation Log-likelihood (Table 5):
  - All Economies: XGBoost −1550.17; Logit −1572.41; SVM −2215.94; Random Forest −1539.27; LDA −1736.38; Combination −1471.33
  - Advanced Economy: XGBoost −919.30; Logit −940.87; SVM −1380.72; Random Forest −924.51; LDA −1027.45; Combination −883.95
  - Emerging Market: XGBoost −630.86; Logit −631.54; SVM −835.22; Random Forest −614.76; LDA −708.94; Combination −587.38
- Temporal AUROC robustness:
  - Time blocks: 1995-1999, 2000-2004, 2005-2009, 2010-2014, 2015-2020.
  - Combined model AUROC > 0.6 in all time blocks except 1995-1999.
  - Underperformance in 1995-1999 attributed to many missing predictors reducing AUROC of four sub models below 0.55.

---

### 4.4 Interpreting Model Predictions with Shapley Values

### Methodology and interpretability
- Use Shapley values (Shapley, 1953) via SHAP Python package (Lundberg and Lee, 2017) to attribute model output to predictors.
- Additivity: sum of predictors’ Shapley values plus a constant equals model prediction.
- Importance: interpretability is crucial because model outputs are statistical extrapolations of past corporate distress events.

### Top predictors (by mean absolute Shapley value) and sign interpretation
- Top-five contributors:
  - Fed Funds shadow rate
  - 12-month default probability
  - policy rate
  - dollar annual appreciation
  - market index return of the past year
- Predictors that, when negative, contribute positively to crisis probability (i.e., negative Shapley values imply higher crisis risk when observed negative):
  - dividend yield
  - change in cash-to-asset ratio
  - capital expenditure to asset ratio
  - change in return on assets
  - interest coverage ratio
- Sign-consistent findings:
  - Tight global financial conditions (Fed Funds shadow rate as strongest predictor) increase corporate distress risk.
  - Policy rate tightens local financial conditions; increases raise distress risk.
  - High and rapidly increasing capital expenditure increases likelihood of corporate distress.
  - Valuation measures (market index growth, price-earnings ratio, market-to-book, dividend yield) signal over-valued stock prices and potential corrections and distress.
  - Balance-sheet vulnerabilities with “right sign”:
    - high net debt to asset ratio increases risk
    - high capital expenditure to asset ratio increases risk
    - low cash to asset ratio increases risk
    - low interest coverage ratio increases risk

### Contributions by variable categories (mean absolute Shapley values)
- Predictor classes: firm-level balance-sheet variables; market valuation; domestic macroeconomic variables; global financial conditions (includes USD appreciation and Fed Funds shadow rate).
- Relative contributions:
  - Top two categories (similar): global financial condition variables and balance-sheet variables.
  - Third: valuation variables (about half contribution of top two).
  - Fourth: domestic macroeconomic variables (about half contribution of top two).
- Interpretation: unexpected changes in global financial conditions combined with firms’ indebtedness have highest signaling value for systemic corporate distress; valuation deviations and domestic macro variables have lower collective power.

### Application — Corporate Distress Risk Index for Emerging Markets
- Forward-looking index: four-quarter horizon; time coverage begins in 2005.
- Index captures major EM crises: 2007-08 Global Financial Crisis and 2020 Covid shock.
- Decomposition notes:
  - Gap between total risk index and aggregate Shapley values stems from a model constant common across economies each quarter.
  - Ahead of GFC: spike driven by loose global financial conditions and valuation anomalies.
  - At GFC onset: EM corporates saw increasing balance sheet vulnerabilities and higher default probabilities.
  - 2020Q1 surge: balance sheet vulnerabilities and tight global financial conditions; subsequent subsidence with looser global financial conditions.
  - 2022Q2 increase: driven by tightening global financial conditions and balance sheet vulnerabilities.

---

### Macroeconomic Implications: Initial Findings

### Regression framework (quarterly) and unconditional effect
- Regression: Y_it = c_it + β_unconditional Prob_it + ε_it  (Eq. 13).
- Key unconditional estimates (first row of Table 4):
  - GDP growth during high corporate distress periods: lower by 3.0% relative to low stress periods (reported as −2.96 ∗∗∗ (0.43)).
  - Unconditional effect on credit growth: −2.1% (reported as −2.06 ∗ (1.13)) and marginally significant at the 10% level.

### AE vs EM effects (with fixed effects; Eq. 14)
- GDP growth reduction:
  - AEs: −2.4% (reported as −2.40 ∗∗∗ (0.53)).
  - EMs: −3.9% (reported as −3.93 ∗∗∗ (0.66)).
- Credit growth effects:
  - AEs: no significant effect (reported 0.28 (1.00)).
  - EMs: credit growth reduced by −6.5% (reported as −6.49 ∗∗∗ (2.06)).
- Implication: corporate distress negatively affects GDP in both AEs and EMs, with adverse credit effects concentrated in EMs.

### Comparison with banking/financial crises (conditional regressions; Eq. 15)
- GDP growth decreases:
  - Corporate distress: −1.6% (reported as −1.60 ∗∗∗ for AE Nonfinancial row; summary states GDP decreases by 1.6% during corporate distress versus 3.8% during banking crises).
  - Banking crises: −3.8% (reported as −3.82 ∗∗∗ in some rows; summary indicates 3.8%).
- Credit growth:
  - During banking crises: decreases around −5.6% (reported −5.62 ∗∗∗ (1.08)).
  - Effect of corporate distress on credit (when no concurrent banking crisis): insignificant overall, but in EMs credit declines.
- AE/EM split for pure corporate distress (rows 6–10 of Table 6):
  - Pure corporate distress reduces GDP growth:
    - AEs: −1.6% (reported −1.60 ∗∗∗ (0.47)).
    - EMs: −2.2% (reported −2.23 ∗∗∗ (0.43)).
  - Credit growth during pure corporate distress:
    - AEs: increases by 0.8% (reported 0.84 (0.76), not statistically significant).
    - EMs: reduces credit by −3.8% (reported −3.80 ∗∗ (1.57)).
- Interpretation: credit channel significant for EMs even absent banking crises.

### Exchange rates and FDI effects (Table 7 exact values)
- High corporate distress regimes associated with:
  - EM currency depreciation: −8.86 ∗∗∗ (1.80).
  - EM foreign direct investment decrease: −19.87 ∗∗∗ (4.62).
  - AE exchange rate and FDI impacts: insignificant.
- High PDs during corporate distress periods without concurrent financial crises:
  - EM exchange rates decline by −6.23 ∗∗∗ (1.83).
  - EM foreign direct investment decreases by −11.52 ∗∗∗ (3.87).
  - AE impacts: insignificant.
- Financial vs Nonfinancial splits show larger effects in financial-sector distress rows:
  - EM Financial FDI: −41.69 ∗∗∗ (7.58).

### Robustness and causality caveats
- Results robust to controls for concurrent banking crises.
- Analysis does not establish causality or Granger causality between corporate distress and other macroeconomic crises.
- Suggested mechanism for sharp credit decreases in EMs: sudden stops in capital inflows reducing credit supply and amplifying corporate distress.

---

### Policy Implications, Caveats, and Future Research

### Policy implications
- Corporate distress has milder macro impact than banking crises but larger effects on GDP and credit growth in EMs than AEs.
- Preemptive policies and surveillance of corporate sector stability and linkages to the rest of the economy can mitigate macroeconomic costs of systemic bankruptcies.
- Integrated policy frameworks that understand risks created by monetary, fiscal and financial policies across economy segments help avoid systemic crises and long-lasting costs.
- Close and timely monitoring of corporate vulnerabilities and contingency planning are important.

### Caveats and limitations
- Analysis limited to publicly listed firms; SMEs and private firms excluded.
- Focused on advanced and emerging/frontier economies; low-income economies and fragile states not covered.
- High-frequency longitudinal data requirements constrain economy coverage; extensions planned as more data become available.

### Future research directions
- More thorough analysis of macroeconomic impacts of corporate distress.
- Analysis of policy effectiveness around corporate crises and role of macroprudential policy in avoiding systemic financial crises.
- Examination of sectoral differences and public vs private ownership.
- Investigation into reasons for AE vs EM differences documented.

*Source: wpiea2022153-print-pdf — 4.4 Interpreting Model Predictions with Shapley Values (excerpt) and Appendix A.*

### 2.1    Constructing Economy-level PD Indices .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .6

### 2.1 Constructing Economy-level PD Indices

### Data source and nature of the PD measure
- Quarterly PD data obtained from the Credit Research Initiative database of the National University of Singapore (NUS-CRI PD).
- The probability of default (PD) is derived from a reduced form model (Duan et al., 2012) that draws on market-based variables (such as distance-to-default (Merton, 1974)), accounting-based firm-specific attributes, and macro-financial factors including: stock returns, cash-to-asset ratio, current assets-to-current liabilities ratio, net-income-to-total-asset ratio, relative market cap and relative market-to-book ratio.
- The model performs well in shorter horizons, achieving an accuracy ratio of 80% in 12 month forecasts.
- The dataset covers the daily probability of default of firm-level corporate bonds with maturities up to 5 years; the analysis focuses on the default probability of 12-month corporate bonds (excluding the financial sector).

### Construction of economy-level PD indices
- Economy-level PD indices are constructed as capital-weighted averages of firm-level PDs at the end of each quarter.
- At the beginning of each year, firm-level capital is calculated as: stock price × common shares outstanding (from Compustat Global).
- NUS-CRI PD is matched with Compustat Global using ISIN.

### Matching, imputation, and sample coverage
- Total firm-quarter observations: 2,749,611.
- Matched with firm capital data: 2,367,880 firm-quarter observations.
- Missing capital values imputation procedure:
  - First impute with the median of other firms’ capital values in the same sector, quarter and from the same economy.
  - If still missing, further impute with the median of other firms’ capital values in the same quarter and from the same economy.
- To avoid bias from limited coverage, impose a minimum of 20 firms for each economy-quarter observation.
- After discarding economy-quarter observations with insufficient firm coverage, the resulting economy-level PD indices cover 61,960 firms from 88 economies.
- Earliest data starts in March 1990.
- For the purposes of this paper, the sample ends in the last quarter of 2021.

*Source: wpiea2022153-print-pdf — 2.1    Constructing Economy-level PD Indices.*

### Appendix A.

### Appendix A.

### 3.2 Model Estimates and Periods of High Corporate Sector Distress
- Key parameter estimates from the Markov Regime-switching model:
  - The mean of PDs during the high-PD regime is around 3.7 times the ones in low-PD regime.
  - The volatility of innovation in PDs is around 5.9 times higher in the high-PD regime than in the low-PD regime.
- Identification and sample:
  - Posterior probability of the corporate distress regime is presented as a heat map; a threshold of 50% on the posterior probability of a high-PD regime is used to identify distress periods.
  - Economies with more than 10 years of observations are included when estimating the model; after imposing the minimum sample length cutoff, the sample includes 66 economies.
  - The full list of corporate distress periods is in Table A1 in the Appendix (not reproduced here).
- Episodes and coverage:
  - The definition captures documented events: 1995 Mexico crisis, 1997 Asian crisis, 2000-01 dot-com bubble/burst, 2012 European Debt crisis, 2007-08 Global Financial Crisis, and high corporate distress in many economies starting in 2020 due to Covid-19.
  - From the late 1990s both advanced economies and emerging markets experienced prolonged high corporate sector distress that ended in the early 2000s.
  - Total identified episodes: 193 episodes of distress events.
  - Economies experience corporate distress in 18% of the time on average.
- Comparison with banking and external crises:
  - Many high corporate distress periods overlap with banking crises, but several high corporate distress episodes occur with no overlapping banking crisis.
  - Banking crisis identification is borrowed from Laeven and Valencia (2020) with the sample ending in 2017.
  - Several high corporate distress periods in the early 2000s (dot-com bubble) and early 2010s (European debt crisis) occurred with no simultaneous banking crises.
  - Most external crises are covered by corporate distress periods.

### 4 An Early-warning System for Corporate Distress
- Objective and target variable:
  - Build a machine-learning model to predict the onset of corporate distress periods within a one-year horizon, using the corporate distress definition in Section 3 and the predictors in Section 2.
  - Observations are classified into three categories: pre-distress periods, distress periods, and calm periods. The model focuses on differentiating pre-distress periods from calm periods and discards distress periods when estimating and evaluating the model.
  - Let Cit be an indicator equal to 1 when a corporate sector distress event in economy i starts at time t. Define Cit+1,t+h = 1{∃s ∈ [t+1,t+h] s.t. Cis = 1}. The model outputs Prob(Cit+1,t+h = 1 | xit) = f(xit).
- Model types estimated:
  - Five models of distinctive functional form are estimated: Logit Lasso, linear discriminant analysis (LDA), support vector machine (SVM), random forest (RF) and extreme gradient boost classifier (XGBoost).
  - Details of these methods are described in Appendix C (not reproduced here).

### 4.1 Model Combination
- Aggregation approach:
  - Combine the five models using the optimal pooling approach in Geweke and Amisano (2011) rather than selecting a single model.
  - The combined model is ˆf(x) = Σm=1^M wm ˆfm(x) subject to Σm=1^M wm = 1 and 0 ≤ wm ≤ 1.
  - Optimal weights minimize cross-entropy between the combined model and the true data-generating process; empirically weights are estimated by maximizing a likelihood function adapted from Eq. (7).
- Cross-validation caveat:
  - When estimating weights, xit should not be included in the sample used to estimate ˆfm when computing ˆfm(xit); this is addressed via adapted cross-validation for panel data with time-series and cross-section dependence.
- Estimated weights (empirical result):
  - The combined model is the sum of 76% of XGBoost, 5% of Logit regression and 19% of LDA.
  - The SVM and Random Forest have zero weights.
  - Hyper-parameters and model weights are kept fixed after selecting them based on predictors before 2004Q1.

### 4.2 H-block Cross-validation
- Motivations and adaptations:
  - Pre-distress panel data exhibit cross-sectional dependence and time autocorrelation of the target variable Cit+1,t+h, violating independence assumptions of traditional leave-k-out cross-validation.
  - Adapt block cross-validation based on Burman et al. (1994) and Racine (2000): put consecutive time periods into the same validation set and leave time gaps between training and validation sets.
- Construction:
  - For K-fold cross-validation, divide T = {1,2,...,T} into K blocks of consecutive time blocks:
    - Tk = {t | (k−1) bT/Kc + 1 ≤ t ≤ k bT/Kc} for 1 ≤ k < K.
    - TK = {t | (K−1) bT/Kc + 1 ≤ t ≤ T}.
  - Define Bk,test = {(i,t) | i = 1,...,N; t ∈ Tk}.
  - Define Bk,train = {(i,t) | i = 1,...,N; t < min Tk − h or t > max Tk + 2h}, leaving a gap of h before Bk,test and a gap of 2h after Bk,test to reduce dependence.
- Implementation details:
  - The method is used for selection of model weights and hyper-parameters.
  - Focus on a forecast horizon of 4 quarters.
  - Hyper-parameters for each model are selected to maximize cross-validation AUROC, using data up to 2005Q1.
  - Use a 5-fold cross-validation on predictors before 2004Q1 in weight estimation as in Eq. (12).

### 4.3 Model Performance
- Evaluation approaches:
  - Two approaches: out-of-sample “back-testing” (recursive re-estimation as new data arrives) and h-block cross-validation that evaluates expected performance of model estimated from the full sample.
  - Performance metrics: log-likelihood and Area Under the Receiver Operating Characteristic Curve (AUROC).
- Out-of-sample exercise specifics:
  - The out-of-sample exercise starts in 2005Q1.
  - To avoid forward-looking bias, training data only uses observations available before the testing data; predictors in training are at least 4 quarters behind corresponding testing set.
  - The first training set uses predictors before 2004Q1.
  - Each model is re-estimated in Q1 of each year.
  - Missing predictors are imputed using sample median when estimating the model and making forecasts, with exceptions: XGBoost handles missing data internally, while LDA generates probability conditional on the predictors available.
  - Observations with more than 10 missing predictors are excluded.
  - Forecasts are generated conditional on predictors in each quarter of the year, using the model estimated at Q1 of the year.
- Out-of-sample results:
  - The combined model generates an out-of-sample AUROC of 0.67 which is highest across all sub models.
  - AUROC computed separately for advanced economies (AEs) and emerging markets (EMs) yields similar results, indicating robustness across groups.
  - The combined model has the highest out-of-sample log-likelihood relative to sub-models.
- Cross-validation (whole sample) results:
  - A 10-fold cross-validation on the whole sample yields qualitatively similar results to the out-of-sample exercise.
  - The cross-validation AUROC of the combined model is 0.71 which is higher than the out-of-sample AUROC.
  - The improvement may be attributed to reduced estimation errors from using a larger sample.
- Temporal robustness:
  - AUROC computed in time blocks: 1995-1999, 2000-2004, 2005-2009, 2010-2014 and 2015-2020.
  - With the exception of the period 1995-1999, the combined model has an AUROC above 0.6 in all time blocks.
  - Underperformance in 1995-1999 is possibly due to many missing predictors in the earlier sample period, which reduces AUROC of four out of five sub models below 0.55.

*wpiea2022153-print-pdf — Appendix A.*

### 4.4    Interpreting Model Predictions with Shapley Values

### 4.4    Interpreting Model Predictions with Shapley Values

### Shapley methodology and interpretability
- Flexible machine learning models improve predictive power but reduce interpretability relative to linear models.
- Interpretability is important because model outputs are statistical extrapolations of past corporate distress events and should not be applied automatically to all future circumstances.
- Shapley values (Shapley, 1953) from cooperative game theory are used to attribute the model output to each predictor; their additive property ensures the sum of each predictor’s Shapley value plus a constant equals the model prediction.
- The SHAP Python package based on the algorithm in Lundberg and Lee (2017) is used to compute Shapley values.

### Top predictors and sign interpretation
- Top-five contributors (by mean absolute Shapley value) are:
  - Fed Funds shadow rate
  - 12-month default probability
  - policy rate
  - dollar annual appreciation
  - market index return of the past year
- Predictors that contribute negatively to crisis probability (i.e., when these values are negative they contribute positively to crisis probability):
  - dividend yield
  - change in cash-to-asset ratio
  - capital expenditure to asset ratio
  - change in return on assets
  - interest coverage ratio
- Remaining predictors: increases in their values raise corporate distress risk.
- Individual Shapley value distributions are consistent with prior expectations:
  - Tight financial conditions increase corporate distress risk; the Fed Funds shadow rate is the most powerful predictor and proxies global financial conditions and the global financial cycle a la Rey (2015).
  - The policy rate proxies local financial conditions and their tightening when increasing.
  - High and rapidly increasing capital expenditure increases likelihood of corporate distress.
  - Valuation measures (previous market index growth, price-earnings ratio, market-to-book value, dividend yield) signal over-valued stock prices and potential subsequent corrections and distress.
  - Traditional balance-sheet vulnerabilities with the “right sign” in predicting distress:
    - high net debt to asset ratio increases risk
    - high capital expenditure to asset ratio increases risk
    - low cash to asset ratio increases risk
    - low interest coverage ratio increases risk

### Contributions by variable categories
- Predictors are grouped into four classes: firm-level balance-sheet variables, market valuation, domestic macroeconomic variables, and global financial conditions (the global financial condition category includes USD appreciation and Fed Funds shadow rate).
- The Shapley value of each category equals the summation of Shapley values of individual predictors in that category.
- Mean absolute Shapley values by category:
  - Top two categories (similar contributions): global financial condition variables and balance-sheet variables. Implication: firms’ financial health and indebtedness have the highest signaling value for looming systemic corporate distress.
  - Third: valuation variables (contribution about half of top two).
  - Fourth: domestic macroeconomic variables (contribution about half of top two).
- Interpretation: unexpected changes in global financial conditions (interest rates and other push factors) could trigger systemic corporate bankruptcies given firms’ exposure to international developments; deviations from fundamentals and asset price bubbles also collectively precede corporate distress to a lesser degree; domestic macro variables (inflation, GDP slowdowns, domestic financial cycles, banking sector exposure) have relatively lower collective power.

### 4.4.1    Application — Corporate Distress Risk Index for Emerging Markets
- The average model results for emerging markets (EMs) illustrate a forward-looking Corporate Distress Risk Index with a four-quarter horizon (i.e., the risk index at end-2021 shows the probability of corporate distress in 2022).
- Time coverage begins in 2005.
- The risk index evolution captures key past corporate crises in EMs, namely the 2007-08 Global Financial Crisis and 2020 Covid shock.
- Decomposition insights:
  - The gap between the total risk index and aggregate Shapley values of variables is due to a model constant that is the same for all economies in each quarter.
  - Ahead of the GFC, the risk index spike was driven by loose global financial conditions and market valuation anomalies.
  - At the onset of the GFC (stemming from AEs), EM corporates suffered from increasing balance sheet vulnerabilities and higher default probabilities.
  - The 2020Q1 surge reflected corporates’ balance sheet vulnerabilities and tight global financial conditions; the risk subsided in subsequent quarters with looser global financial conditions.
  - In 2022Q2, an increase in systemic corporate distress probability is observed, driven by tightening global financial conditions and balance sheet vulnerabilities.

### Macroeconomic implications: initial findings
- Aim: examine behavior of GDP growth, bank credit to nonfinancial corporations (NFCs), foreign direct investment (FDI) and exchange rates around corporate distress episodes identified by the model using a panel of advanced economies (AEs) and emerging markets (EMs).
- Regression framework (quarterly frequency) for unconditional effect:
  - Y_it = c_it + β_unconditional Prob_it + ε_it  (Eq. 13)
- Key estimates (first row of Table 4):
  - On average, GDP growth during high corporate distress periods is lower by 3.0% relative to low stress periods.
  - The unconditional effect on credit growth is -2.1% and marginally significant at the 10% level.
- AE vs EM effects (Eq. 14 with fixed effects):
  - High corporate distress regime reduces GDP growth by 2.4% for AEs and by 3.9% for EMs.
  - Credit growth effects:
    - No significant effect on AEs.
    - Credit growth is reduced by 6.5% for EMs.
  - Implication: corporate distress has significant negative effects on GDP growth for both AEs and EMs, but adverse credit effects are concentrated in EMs.
- Comparison with banking/financial crises:
  - Conditional regressions separating corporate-distress-only periods (no concurrent banking crises) use:
    - Y_it = c_it + β_Nonfinancial Dummy_Nonfinancial,it + β_Financial Dummy_Financial,it + ε_it  (Eq. 15)
  - Findings (rows 4–5 of Table 6):
    - GDP growth decreases by 1.6% during corporate distress versus 3.8% during banking crises.
    - During banking crises, credit growth decreases by around 5.6% while the effect of corporate distress on credit is insignificant.
    - Conclusion: corporate distress has a milder effect on GDP growth than banking crises.
  - Differences with prior literature (Giesecke et al. (2014)) may reflect:
    - Cross-economy panel (55 economies) rather than single-country analysis.
    - Use of forward-looking default probabilities derived from Merton’s distance to default and firm-level solvency/liquidity measures instead of realized default data.
- AE/EM split for pure corporate distress (rows 6–10 of Table 6):
  - Pure corporate distress reduces GDP growth by 1.6% for AEs and 2.2% for EMs.
  - Credit growth during pure corporate distress:
    - For AEs: high PD regimes increase credit growth by 0.8% (not statistically significant).
    - For EMs: high PD regimes reduce credit by 3.8%.
  - Implication: the credit channel is significant for EMs even without concurrent banking crises.
- Exchange rates and FDI (Table 7):
  - High corporate distress regimes are associated with:
    - EM currency depreciation of about 8.8%.
    - Decrease in FDI by 20% for EMs.
  - Impacts on AE exchange rates and FDI are insignificant.
  - High PDs during corporate distress periods without concurrent financial crises:
    - EM exchange rates decline by 6.2%.
    - EM foreign direct investment decreases by 11.5%.
    - Impacts on AEs are insignificant.
- Robustness and causal inference:
  - Results are robust to concurrent banking crises controls.
  - The analysis does not establish causality or Granger causality between corporate distress and other macroeconomic crises.
  - One possible mechanism for sharp credit decreases in EMs is sudden stops in capital inflows, which can reduce credit supply and amplify corporate distress effects.

### Policy implications and caveats
- Policy implications:
  - Corporate distress has a milder impact than banking crises but larger effects on GDP and credit growth in EMs than AEs.
  - Spillover and spillback channels warrant preemptive policies to mitigate macroeconomic costs of systemic bankruptcies and corporate crises.
  - Surveillance of corporate sector stability and its linkages to the rest of the economy can provide early signals of accumulating risks and supports integrated policy frameworks.
  - Understanding risks created by monetary, fiscal and financial policies across economy segments can help policymakers avoid systemic crises and long-lasting costs.
  - Close and timely monitoring of corporate vulnerabilities and implementation of contingency plans are important.
- Caveats and limitations:
  - Analysis limited to publicly listed firms due to data availability; SMEs and private firms are excluded.
  - Focus limited to advanced and emerging/frontier economies; low-income economies and fragile states are not covered.
  - High-frequency longitudinal data requirements constrain economy coverage; extensions planned as more data becomes available.
- Future research directions:
  - More thorough analysis of macroeconomic impacts of corporate distress.
  - Analysis of policy effectiveness around corporate crises and the role of macroprudential policy in avoiding systemic financial crises.
  - Examination of sectoral differences and public vs private ownership.
  - Further investigation into reasons for AE vs EM differences documented in this paper.

*Source: 4.4 Interpreting Model Predictions with Shapley Values (excerpt) — wpiea2022153-print-pdf*

### References

### wpiea2022153-print-pdf - References

### Key bibliography themes
- Studies on zombie firms, zombie lending, and corporate debt overhang: Acharya et al. (2020); Andrews and Petroulakis (2019); Caballero, Hoshi, and Kashyap (2008); Jord`a, Kornejew, Schularick, and Taylor (2020).
- Corporate default, credit risk, and default prediction models: Altman (1968); Campbell, Hilscher, and Szilagyi (2008); Das et al. (2007); Duan, Sun, and Wang (2012); Duffie, Saita, and Wang (2007); Koopman, Lucas, and Schwaab (2012); Shumway (2001); Merton (1974).
- Machine learning, model interpretation, and uncertainty: Chen and Guestrin (2016) (XGBoost); Lundberg and Lee (2017); Pedregosa et al. (2011) (Scikit-learn); Gross and Población (2019) on model uncertainty; Hoeting et al. (1999) on Bayesian model averaging.
- Macroeconomic interactions with credit and cycles: Claessens, Kose, and Terrones (2012); Giesecke et al. (2014); Pesaran et al. (2006); Rey (2015); Wu and Xia (2016).
- Databases and data sources: The Credit Research Initiative of the National University of Singapore (2019); Laeven and Valencia (2020); IMF (2021) Global financial stability report.

### Economy-level PD indices: Summary statistics (Table 1)
- Table lists for each economy: Starting period, N observations, N firms covered, Average, Standard deviation, 25 quartile, Median, 75 quartile.
- Selected exact entries (format: Economy — Starting period — N observations — N firms covered — Average — Standard deviation — 25 quartile — Median — 75 quartile):
  - Argentina — 1995Q3 — 1055 — 60.62 — 0.53 — 0.27 — 0.50 — 0.76
  - Australia — 1992Q1 — 119 — 1,044 — 0.14 — 0.11 — 0.08 — 0.10 — 0.16
  - China — 1995Q2 — 106 — 1,936 — 1.13 — 1.00 — 0.33 — 0.56 — 2.06
  - India — 1994Q2 — 110 — 2,006 — 0.87 — 0.38 — 0.55 — 0.86 — 1.15
  - United States — 1990Q4 — 1243 — 3,672 — 0.42 — 0.44 — 0.11 — 0.19 — 0.68
  - United Kingdom — 1990Q1 — 127 — 1,036 — 0.17 — 0.14 — 0.08 — 0.13 — 0.20
- Notes: The third column labeled ’N observations’ shows the number of quarters when the economy level index is available. The fourth column labeled ’N firms covered’ shows the average number of firms each quarter.

### Predictors: Definitions and data sources (Table 2)
- Panel A: Balance-sheet Variables and PDs (label — definition — source). Examples:
  - Investment Rate — Median of capital expenditure to lagged capital stock of firms from each economy — Compustat Global
  - Debt to Asset Ratio — Median of debt to asset ratio across firms from each economy — Compustat Global
  - Default probability 12 month — Capital-weighted averages of 12-month default probability across non-financial firms from each economy — NUS Credit Research Initiative
  - Interest Coverage Ratio (moving average) — Annual moving averages of median of interest coverage ratio across firms from each economy — Compustat Global
- Panel B: Macroeconomic Variables (label — definition — source). Examples:
  - GDP gap — One-sided GDP gap, computed by HP filter with Lambda = 1,600 — World Economic Outlook
  - Inflation — YoY% inflation rate — World Economic Outlook
  - Foreign Reserve gap — One-sided foreign reserve gap, computed by HP filter with Lambda = 1,600 — International Financial Statistics - IMF Data
  - Fed Funds Shadow Rate — Wu-Xia Shadow Federal Funds Rate — Federal Reserve Bank of Atlanta
- Panel C: Stock Price Valuation (label — definition — source). Examples:
  - Dividend Yield — Dividend Yield — Datastream
  - Market Index Growth — YoY% return of market index — Datastream
  - Price Earning Ratio — Price Earning Ratio — Datastream

### Markov regime-switching model: Posterior key parameters (Table 3)
- Parameters and posterior summaries (exact values):
  - ρ: Posterior Mean 0.913; Standard deviation 0.01; Median 0.913; 5% Quantile 0.902; 95% Quantile 0.925
  - δ+1: Posterior Mean 3.68; Standard deviation 0.85; Median 3.68; 5% Quantile 2.33; 95% Quantile 5.09
  - γ+1: Posterior Mean 5.9; Standard deviation 0.15; Median 5.9; 5% Quantile 5.63; 95% Quantile 6.17
  - p11: Posterior Mean 0.95; Standard deviation 0.00; Median 0.95; 5% Quantile 0.94; 95% Quantile 0.96
  - p22: Posterior Mean 0.81; Standard deviation 0.01; Median 0.81; 5% Quantile 0.78; 95% Quantile 0.83

### Model performance: Out-of-sample and cross-validation (Tables 4 and 5)
- Out-of-sample AUROC (exact values):
  - All Economies: XGBoost 0.65; Logit 0.64; SVM 0.55; Random Forest 0.59; LDA 0.64; Combination 0.67
  - Advanced Economy: XGBoost 0.68; Logit 0.63; SVM 0.55; Random Forest 0.61; LDA 0.63; Combination 0.68
  - Emerging Market: XGBoost 0.62; Logit 0.65; SVM 0.54; Random Forest 0.57; LDA 0.65; Combination 0.65
- Out-of-sample Log-likelihood (exact values):
  - All Economies: XGBoost −1083.42; Logit −1163.00; SVM −1476.90; Random Forest −1146.92; LDA −1274.32; Combination −1071.11
  - Advanced Economy: XGBoost −583.98; Logit −666.75; SVM −866.67; Random Forest −646.96; LDA −758.36; Combination −590.81
  - Emerging Market: XGBoost −499.45; Logit −496.25; SVM −610.23; Random Forest −499.96; LDA −515.96; Combination −480.31
- Cross-validation AUROC (exact values):
  - All Economies: XGBoost 0.68; Logit 0.66; SVM 0.56; Random Forest 0.67; LDA 0.70; Combination 0.71
  - Advanced Economy: XGBoost 0.70; Logit 0.68; SVM 0.57; Random Forest 0.69; LDA 0.71; Combination 0.72
  - Emerging Market: XGBoost 0.66; Logit 0.63; SVM 0.54; Random Forest 0.63; LDA 0.67; Combination 0.68
- Cross-validation Log-likelihood (exact values):
  - All Economies: XGBoost −1550.17; Logit −1572.41; SVM −2215.94; Random Forest −1539.27; LDA −1736.38; Combination −1471.33
  - Advanced Economy: XGBoost −919.30; Logit −940.87; SVM −1380.72; Random Forest −924.51; LDA −1027.45; Combination −883.95
  - Emerging Market: XGBoost −630.86; Logit −631.54; SVM −835.22; Random Forest −614.76; LDA −708.94; Combination −587.38

### Conditional growth effects during high corporate distress (Tables 6 and 7)
- Conditional growth rates of GDP and Credit to Private Non-financial Sector during High Corporate Distress Periods, Relative to Low Corporate Distress Periods (exact values and standard errors in parentheses where provided):
  - Unconditional: GDP −2.96 ∗∗∗ (0.43); Credit −2.06 ∗ (1.13)
  - AE (Advanced Economies): GDP −2.40 ∗∗∗ (0.53); Credit 0.28 (1.00)
  - EM (Emerging Markets): GDP −3.93 ∗∗∗ (0.66); Credit −6.49 ∗∗∗ (2.06)
  - Nonfinancial: GDP −1.82 ∗∗∗ (0.34); Credit −0.78 (0.82)
  - Financial: GDP −4.03 ∗∗∗ (0.50); Credit −5.62 ∗∗∗ (1.08)
  - AE Nonfinancial: GDP −1.60 ∗∗∗ (0.47); Credit 0.84 (0.76)
  - AE Financial: GDP −4.15 ∗∗∗ (0.69); Credit −3.82 ∗∗∗ (0.76)
  - EM Nonfinancial: GDP −2.23 ∗∗∗ (0.43); Credit −3.80 ∗∗ (1.57)
  - EM Financial: GDP −3.75 ∗∗∗ (0.63); Credit −9.03 ∗∗∗ (2.58)
- Conditional growth rates of Exchange Rates and Foreign Direct Investment during High Corporate Distress Periods, Relative to Low Corporate Distress Periods (exact values and standard errors where provided):
  - Unconditional: Exchange Rate −3.38 ∗∗∗ (1.09); Foreign Direct Investment −8.38 ∗∗∗ (2.75)
  - AE: Exchange Rate −0.53 (0.94); Foreign Direct Investment −3.85 (2.84)
  - EM: Exchange Rate −8.86 ∗∗∗ (1.80); Foreign Direct Investment −19.87 ∗∗∗ (4.62)
  - Nonfinancial: Exchange Rate −2.40 ∗∗ (0.98); Foreign Direct Investment −5.85 ∗∗ (2.31)
  - Financial: Exchange Rate −2.51 ∗∗∗ (0.96); Foreign Direct Investment −9.60 ∗∗∗ (3.68)
  - AE Nonfinancial: Exchange Rate −0.25 (0.87); Foreign Direct Investment −2.79 (2.59)
  - AE Financial: Exchange Rate −0.44 (0.71); Foreign Direct Investment −4.30 ∗∗ (2.04)
  - EM Nonfinancial: Exchange Rate −6.23 ∗∗∗ (1.83); Foreign Direct Investment −11.52 ∗∗∗ (3.87)
  - EM Financial: Exchange Rate −7.80 ∗∗∗ (2.24); Foreign Direct Investment −41.69 ∗∗∗ (7.58)

### Figures and diagnostics (figure captions overview)
- Figures referenced include:
  - Figure 1: Average PD Indices and Number of Economies in Corporate Distress across Advanced Economies and Emerging Markets (panels: (a) Average PD Indices; (b) Number of Economies in Corporate Distress).
  - Figure 2: Probability of Default Indices and Posterior Probability for US, Japan, China, Brazil.
  - Figure 3: Posterior Probability of the High Corporate Distress Regime (panels: (a) Posterior; (b) Crises Periods).
  - Figures comparing Corporate Distress Periods to Banking Crises Periods; to Currency and Sovereign Debt Crises Periods.
  - Figure 6: Predictor Availability.
  - Figure 7: Cross-validation AUROC.
  - Figure 8: Summary of Shapley Values (panels: (a) Mean absolute Shapley values; (b) Shapley values distribution).
  - Figure 9: Summary of Shapley Values of Predictors from Different Categories.

### MCMC algorithm to identify corporate distress (Appendix A)
- Priors and identification:
  - p11 and p22: independent priors Beta(1,1).
  - δ ∼ N(0,∞) with positive constraints (flat Gaussian prior).
  - ρ ∼ N(0,∞) with constraint ρ ∈ (0,1).
  - 1/(1 + γ)^2 has prior Gamma(2,2).
  - μ_iL ∼ N(0,∞) (flat Gaussian prior); 1/σ^2_iL has prior Gamma(2,2).
- Notation:
  - ˜S_it denotes vector of states ˜S_iT = [S_i1, S_i2, ..., S_iT].
  - ˜y_iT denotes vector of observations ˜y_iT = [PD_i1, PD_i2, ..., PD_iT].
- MCMC sampling steps (exact sequence):
  1. Initial values of p11, p22, δ, γ, ρ, μ_iL, σ^2_iL (i ∈ {1,2,...,N}) are proposed.
  2. For each i = 1,2,...,N, sample vector of states ˜S_iT = [S_i1, S_i2, ..., S_iT] from f(˜S_iT | p11, p22, δ, γ, ρ, μ_iL, σ^2_iL, ˜y_iT) using multi-move Gibbs-sampling as proposed in Carter and Kohn (1994).
  3. For each i = 1,2,...,N, sample μ_iL from f(μ_iL | ˜S_iT, p11, p22, δ, γ, ρ, σ^2_iL, ˜y_iT).
  4. For each i = 1,2,...,N, sample σ^2_iL from f(σ^2_iL | ˜S_iT, p11, p22, δ, γ, ρ, μ_iL, ˜y_iT).
  5. Sample p11, p22 from f(p11, p22 | ˜S_1T, ˜S_2T, ..., ˜S_NT).
  6. Sample ρ from f(ρ | ˜S_iT, p11, p22, δ, γ, μ_iL, σ^2_iL, ˜y_iT, for all i ∈ {1,2,...,N}).
  7. Sample δ from f(δ | ˜S_iT, p11, p22, ρ, γ, μ_iL, σ^2_iL, ˜y_iT, for all i ∈ {1,2,...,N}).

*wpiea2022153-print-pdf - References*

### 8.  Sampleγfromf

### 8.  Sampleγfromf

### B Constructing Predictors from Compustat — data and financial-ratio definitions
- Sample: quarterly data on listed non-financial corporations for 55 economies from S&P Compustat North America and Compustat Global.
- Exclusions: financial firms (banks, diversified financial, and insurance firms).
- Final sample: an unbalanced panel of 56,758 non-financial firms over 1995q1-2021q3.
- Construction: compute balance-sheet ratio for individual firms and take cross-sectional median at each quarter.
- Definitions of financial ratios:
  - Investment Rate = Capital Expenditure / Previous-Quarter Value of Property, Plant and Equipment
  - Net Current Asset to Asset Ratio = (Current Asset-Current Liabilities) / Asset
  - Debt to Asset Ratio = (Debt in Current Liabilities+Long-term Debt) / Asset
  - Interest Coverage Ratio = Earning before interest and taxes / Interest expense
  - Net Debt to Asset Ratio = (Debt in Current Liabilities+Long-term Debt-(Current Liability-Debt in Current Liabilities)) / Asset
  - ROA = ( 0.625·Earning before interest and taxes) / (Asset + Lagged Asset/2)
  - Short-term Investment to Liability Ratio = Cash and Equivalent / Liabilities
- Data adjustments and quality filters:
  - Drop observations for missing assets and liabilities.
  - Drop observations when acquisitions are larger than 5% of total assets.
  - Winsorize variables at the 1%/99% percentiles at the economy level.
  - Drop economies with fewer than 5 firms at each point in time.
  - Compute medians for each indicator at each point in time and for each economy only when the coverage is at least 30% of all firms reporting data.
  - Use annual moving average of quarterly interest coverage ratio, investment rate and ROA to filter out seasonality in quarterly earnings and investments.

### C Machine Learning Models and Hyperparameter Selection — overview
- The study elaborates on classifiers used and hyperparameter tuning via cross-validation where applicable.
- Models discussed: Logistic Regression with Regularization; Random Forest; Support Vector Machine (SVM); Linear Discriminant Analysis (LDA); Extreme Gradient Boosting Tree (Xgboost).

### C.1 Logistic Regression with Regularization — formulation and tuning
- Model form: Prob(y_i = 1) = exp(X′_i β) / (1 + exp(X′_i β)), where β is a column vector.
- Estimation: ˆβ = arg min_β [ −(1/N) Σ_{i=1}^N ( y_i ln Prob(y_i = 1) + (1−y_i) ln(1−Prob(y_i = 1)) ) + C‖β‖_2^2 ].
- Hyperparameter: C controls the amount of regularization; larger C → greater amount of shrinkage.

### C.2 Random Forest — decision-tree base, averaging, and tuned hyperparameters
- Decision tree splits: choose variable j and split s to minimize
  min_{j,s} [ N_L ̄y_L(j,s)(1− ̄y_L(j,s)) + N_R ̄y_R(j,s)(1− ̄y_R(j,s)) ].
- Random forest specifics:
  - Each tree trained on a bootstrap sample (with replacement).
  - At each split, best split selected from a random subset of predictors of specified size.
- Hyperparameters selected via cross-validation:
  - Maximum height (depth) of individual trees.
  - Size of predictor subset for splits.
  - Number of individual trees to combine.
- Implementation note: other hyperparameters left at Scikit-learn defaults in RandomForestClassifier to reduce computation.

### C.3 Support Vector Machine — formulation, kernels, calibration
- Linear SVM: define hyperplane {x: f(x) = x′β + β_0 = 0} and solve
  min_{β,β_0} 1/2 ‖β‖^2 + (C/N) Σ_{i=1}^N ξ_i
  subject to ξ_i ≥ 0, y_i (x′_i β + β_0) ≥ 1 − ξ_i ∀i.
- Decision function: ˆG(x) = sign[ x′ˆβ + ˆβ_0 ].
- Kernel trick via inner product K(x_1,x_2) = ⟨h(x_1), h(x_2)⟩. Three kernel choices noted:
  - dth degree polynomial: K(x_1,x_2) = (γ⟨x_1,x_2⟩ + κ)^d
  - Radial basis: K(x_1,x_2) = exp(−γ‖x_1−x_2‖^2)
  - Neural network: K(x_1,x_2) = tanh(γ⟨x_1,x_2⟩ + κ)
- Scikit-learn defaults used to reduce tuning burden: γ = 1/number of features, κ = 0.
- Hyperparameters selected by cross-validation: kernel K and cost C.
- Probability estimates: SVC does not yield probabilities directly; probabilities obtained by fitting a logit model on SVC scores, with logit parameters calibrated internally via cross-validation in SVC.

### C.4 Linear Discriminant Analysis — Gaussian assumption and shrinkage covariance
- Generative model: classes 0 and 1 generated independently with probabilities 1−p and p respectively; conditional on class c, features ~ N(μ_c, Σ), c ∈ {0,1}.
- Posterior probability for class 1: p φ(x_i|μ_1, Σ) / [ (1−p) φ(x_i|μ_0, Σ) + p φ(x_i|μ_1, Σ) ] .
- Estimation:
  - p = sample frequency of class 1.
  - μ_0 and μ_1 = sample means of features in each class.
- Covariance shrinkage to reduce estimation error:
  - ˆΣ_s = (1−α) ˆΣ + α (N^{-1} tr(ˆΣ)) I, where N is number of features and α is selected by cross-validation.
- Advantage: Bayesian LDA allows rigorous treatment of missing predictors by generating posterior from existing predictors without imputation.
- Implementation: customized LDA functions.

### C.5 Extreme Gradient Boosting Tree (Xgboost) — additive training, regularization, and specific settings
- Additive model: ˆy_i = Σ_{k=1}^K f_k(x_i), trained sequentially to minimize Σ_{i=1}^N l(y_i, ˆy^{(k−1)}_i + f_k(x_i)) + Ω(f_k).
- Complexity penalty: Ω(f) = γ T + 1/2 λ ‖w‖^2, where T is number of leaves and w ∈ R^T are leaf scores.
- Regularization techniques: shrinkage (multiply f_k by η with 0 < η < 1), subsampling of observations, approximate split finding.
- Implementation choices to reduce overfitting and computation:
  - Use an equal average of 50 trees as basis predictors f_k.
  - Set maximum depth = 3.
  - Number of samples per tree = 8 (2-years of observation).
  - Random sample size per tree = 50% of total sample size.
  - λ in Ω = 1.
  - Scale the gradient of samples with y_i = 1 (pre-distress periods) to 5 to address unbalanced classes.
- Hyperparameters tuned by cross-validation: total number of iterations K, γ in Ω, and shrinkage parameter η.
- Debiasing Xgboost probabilities for comparability across models:
  - Prob_unbiased = Prob_biased / (5 + Prob_biased).

### Table A1: Corporate Distress Episodes
- Table A1 lists periods of corporate distress by country. Examples include:
  - Argentina: 2000Q2-2002Q1, 2006Q4-2008Q3, 2012Q2-2012Q2, 2015Q3-2015Q3
  - Australia: 1997Q4-1998Q1, 2000Q1-2000Q2, 2001Q3-2004Q1, 2008Q3-2009Q3, 2020Q1-2021Q1
  - Brazil: 1998Q2-1999Q1, 2001Q3-2002Q3, 2015Q4-2016Q1
  - Canada: 2000Q2-2003Q1, 2008Q3-2009Q1
  - China: 2006Q1-2006Q4, 2008Q1-2009Q1, 2011Q3-2011Q3, 2015Q3-2015Q3, 2021Q3-2022Q1
  - France: 2000Q2-2003Q2
  - Germany: 1995Q1-1995Q1, 2000Q2-2003Q2
  - United Kingdom: 2000Q2-2003Q1, 2008Q2-2009Q2, 2018Q4-2020Q4
  - United States: 2000Q2-2003Q1, 2008Q4-2009Q1
  - Vietnam: 2008Q1-2008Q4, 2011Q4-2012Q3, 2016Q3-2017Q1, 2020Q1-2020Q1
- (Table A1 in the source contains additional country-specific distress-period entries.)

*Understanding and Predicting Systemic Corporate Distress: A Machine-learning Approach — Working Paper No. WP/2022/153*

---


_Source: https://www.imf.org/-/media/files/publications/wp/2022/english/wpiea2022153-print-pdf.pdf_
