Probability of Default Rating Modeling with R
Minimum price
Suggested price

Probability of Default Rating Modeling with R

Comprehensive overview of the modeling processes, principles, and designs

About the Book

Credit risk refers to the potential loss incurred when borrowers fail to make payments on their debts. This book focuses on a Probability of Default (PD) rating modeling, widely considered a cornerstone of credit risk.

The motivation for writing this book arises from two primary factors. Firstly, despite the substantial increase in the number of books and articles over the last decade, significant misalignment continues to exist between practical application and academic research. Secondly, recent progress in analytics and technology has seemingly shifted the focus in credit risk towards tools, sometimes neglecting the fundamental principles and objectives of the modeling process. Conversations surrounding programming languages and algorithms can overshadow the crucial task of capturing and addressing the most important business inputs within the model.

Following the motivation, this book offers an overview of the critical steps in developing and validating a probability of default models. Moreover, it presents practical examples that aim to guide readers through the entire modeling process, with a particular emphasis on design rather than focusing solely on statistical methods. These examples aim to equip and inspire readers to design a tailored approach that aligns with their specific model's implementation environment. Although the book demonstrates the exercises in the statistical package `R`, the tool should not be in the foreground. Rather than emphasizing the code itself, we encourage readers to adopt a process-oriented perspective when approaching the code. This approach enables readers to replicate the same or similar designs using their preferred software. While the book primarily emphasizes the modeling processes within the banks with Internal Based Models (IRB banks), it is essential to note that the described methods are not limited solely to them. The methods can be extended and applied to non-IRB banks as well. Readers and practitioners are encouraged to select and implement the chapters that best suit their specific use cases, focusing on managerial models.

Finally, the author encourages readers to engage in critical thinking as they progress through the contents, considering that not all methods utilized in real-world scenarios are suitable for every circumstance, and the effectiveness of each method may not be universal.

About the Author

Andrija Djurovic
Andrija Djurovic

Andrija Djurovic is a credit risk professional with over ten years of experience in credit risk modeling. His expertise encompasses modeling Probability of Default, Loss Given Default, Exposure At Default, the development of scoring models, macroeconomic modeling, and portfolio analysis. With comprehensive statistical knowledge spanning academia to industry, his proficiency extends to crafting tailored analytics applications. Notably, Andrija is the author and developer of essential `R` (monobin, monobinShiny, PDtoolkit, LGDtoolkit and `Python` (monobinpy) packages tailored for credit risk modeling.

To learn more, visit his LinkedIn profile at, github page at, or connect directly through email at

Table of Contents

  • Preface

  • 1 Introduction to R
  • 1.1 R objects
  • 1.2 Data import
  • 1.3 Data manipulation and aggregation
  • 1.4 Data export
  • 1.5 Sampling
  • 1.6 Linear and logistic regression
  • 1.7 Loops
  • 1.8 User-defined functions

  • 2 Variable types and measurement scales

  • 3 Ranking model development
  • 3.1 Modeling datasets
  • 3.2 Univariate analysis
  • 3.3 Bivariate analysis
  • 3.3.1 Statistical and expert binning of numeric risk factors
  • Monotonic binning
  • U-shape binning
  • 3.3.2 Statistical and expert binning of categorical risk factors
  • 3.3.3 Risk factor standalone discriminatory power analysis
  • 3.3.4 Risk factor stability analysis
  • 3.3.5 Risk factor correlation analysis
  • 3.4 Multivariate analysis
  • 3.4.1 Blockwise (modular) variable selection
  • Staged blocks
  • Embedded blocks
  • Ensemble blocks
  • 3.4.2 Blockwise approach with different development samples
  • 3.4.3 Analysis of discriminatory power
  • 3.4.4 Rating scale

  • 4 Ranking model calibration

  • 5 Ranking model uncertainty
  • 5.1 Bootstrap method
  • 5.2 Conformal inference

  • 6 Margin of conservatism

  • 7 Periodic model validation
  • 7.1 PD model structure
  • 7.2 Review of estimates
  • 7.3 Margin of conservatism challengers

  • 8 Fairness analysis

  • 9 Machine learning support for the ranking model development
  • 9.1 Case study 1: Machine learning for risk factor engineering
  • 9.2 Case study 2: Risk factor selection and non-linearity identification with model challenger
  • 9.3 Case study 3: Two-stage modeling approach

  • Appendix

  • Bibliography

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $12 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub