پارسی   English   العربیه

Credit Risk Modeling using Excel and VBA, 2nd Edition


This book provides practitioners and students with a hands-on introduction to modern credit risk modeling. The authors begin each chapter with an accessible presentation of a given methodology, before providing a step-by-step guide to implementation methods in Excel and Visual Basic for Applications (VBA). The book covers default probability estimation (scoring, structural models, and transition matrices), correlation and portfolio analysis, validation, as well as credit default swaps and structured finance. Several appendices and videos increase ease of access.

The second edition includes new coverage of the important issue of how parameter uncertainty can be dealt with in the estimation of portfolio risk, as well as comprehensive new sections on the pricing of CFSs and CDOs, and a chapter on predicting borrower-specific loss given default with regression models. In all, the authors present a host of applications – many of which go beyond standard Excel or VBA usages, for example, how to estimate logit models with maximum likelihood, or how to quickly conduct large-scale Monte Carlo simulations.

Clearly written with a multitude of practical examples, the new edition of Credit Risk Modeling using Excel and VBA will prove an indispensable resource for anyone working in, studying or researching this important field.

Praise for the first edition

“In one place, Löffler and Posch provide all that is needed to install a state-of-the-art risk management system, including a broad understanding of different risk management frameworks, detailed estimation techniques for dertiving PD, LGD, and correlation parameters, and programming tools for putting thesr methods into practice.”Richard Cantor, Chief Credit Officer, Moody’s Investor Service

Gunter Löffler is Professor of Finance at the University of Ulm in Germany. His current research interests are on credit risk and empirical finance. Previously, Gunter was Assistant Professor at Goethe University Frankfurt, and served as an internal consultant in the asset management division of Commerzbnk, His Ph.D. in finance is from the University of Mannheim. Gunter has studied at Heidelberg and Cambridge Universities.

Peter N. Posch is Assistant Professor of Finance at the University of Ulm in Germany. Previously Peter was co-head of credit treasury at a large bank, where he also traded credit derivatives and other fixed income products for the bank’s proprietary books. His Ph.D. in finance on the dynamics of credit risk is from the University of Ulm. Peter has studied economics, philosophy and law at the University of Bonn.

Preface to the 2nd edition.

Preface to the 1st edition.

Some Hints for Troubleshooting.

1 Estimating Credit Scores with Logit.

Linking scores, default probabilities and observed default behavior.

Estimating logit coefficients in Excel.

Computing statistics after model estimation.

Interpreting regression statistics.

Prediction and scenario analysis.

Treating outliers in input variables.

Choosing the functional relationship between the score and explanatory variables.

Concluding remarks.


Logit and probit.

Marginal effects.

Notes and literature.

2 The Structural Approach to Default Prediction and Valuation.

Default and valuation in a structural model.

Implementing the Merton model with a one-year horizon.

The iterative approach.

A solution using equity values and equity volatilities.

Implementing the Merton model with a T -year horizon.

Credit spreads.



Notes and literature.



3 Transition Matrices.

Cohort approach.

Multi-period transitions.

Hazard rate approach.

Obtaining a generator matrix from a given transition matrix.

Confidence intervals with the binomial distribution.

Bootstrapped confidence intervals for the hazard approach.

Notes and literature.


Matrix functions.

4 Prediction of Default and Transition Rates.

Candidate variables for prediction.

Predicting investment-grade default rates with linear regression.

Predicting investment-grade default rates with Poisson regression.

Backtesting the prediction models.

Predicting transition matrices.

Adjusting transition matrices.

Representing transition matrices with a single parameter.

Shifting the transition matrix.

Backtesting the transition forecasts.

Scope of application.

Notes and literature.


5 Prediction of Loss Given Default.

Candidate variables for prediction.

Instrument-related variables.

Firm-specific variables.

Macroeconomic variables.

Industry variables.

Creating a data set.

Regression analysis of LGD.

Backtesting predictions.

Notes and literature.


6 Modeling and Estimating Default Correlations with the Asset Value Approach.

Default correlation, joint default probabilities and the asset value approach.

Calibrating the asset value approach to default experience: the method of moments.

Estimating asset correlation with maximum likelihood.

Exploring the reliability of estimators with a Monte Carlo study.

Concluding remarks.

Notes and literature.

7 Measuring Credit Portfolio Risk with the Asset Value Approach.

A default-mode model implemented in the spreadsheet.

VBA implementation of a default-mode model.

Importance sampling.

Quasi Monte Carlo.

Assessing Simulation Error.

Exploiting portfolio structure in the VBA program.

Dealing with parameter uncertainty.


First extension: Multi-factor model.

Second extension: t-distributed asset values.

Third extension: Random LGDs.

Fourth extension: Other risk measures.

Fifth extension: Multi-state modeling.

Notes and literature.

8 Validation of Rating Systems.

Cumulative accuracy profile and accuracy ratios.

Receiver operating characteristic (ROC).

Bootstrapping confidence intervals for the accuracy ratio.

Interpreting caps and ROCs.

Brier score.

Testing the calibration of rating-specific default probabilities.

Validation strategies.

Testing for missing information.

Notes and literature.

9 Validation of Credit Portfolio Models.

Testing distributions with the Berkowitz test.

Example implementation of the Berkowitz test

Representing the loss distribution.

Simulating the critical chi-square value.

Testing modeling details: Berkowitz on subportfolios.

Assessing power.

Scope and limits of the test.

Notes and literature.

10 Credit Default Swaps and Risk-Neutral Default Probabilities.

Describing the term structure of default: PDs cumulative, marginal and seen from today.

From bond prices to risk-neutral default probabilities.

Concepts and formulae.


Pricing a CDS.

Refining the PD estimation.

Market values for a CDS.


Estimating upfront CDS and the 'Big Bang' protocol.

Pricing of a pro-rata basket.

Forward CDS spreads.


Pricing of swaptions.

Notes and literature.


Deriving the hazard rate for a CDS.

11 Risk Analysis and Pricing of Structured Credit: CDOs and First-to-Default Swaps.

Estimating CDO risk with Monte Carlo simulation.

The large homogeneous portfolio (LHP) approximation.

Systemic risk of CDO tranches.

Default times for first-to-default swaps.

CDO pricing in the LHP framework.

Simulation-based CDO pricing.

Notes and literature.


Closed-form solution for the LHP model.

Cholesky decomposition.

Estimating PD structure from a CDS.

12 Basel II and Internal Ratings.

Calculating capital requirements in the Internal Ratings-Based (IRB) approach.

Assessing a given grading structure.

Towards an optimal grading structure.

Notes and literature.

Appendix A1 Visual Basics for Applications (VBA).

Appendix A2 Solver.

Appendix A3 Maximum Likelihood Estimation and Newton’s Method.

Appendix A4 Testing and Goodness of Fit.

Appendix A5 User-defined Functions.