Credit Risk Fundamentals › Portfolio Credit Risk

Michael BrenndoerferDecember 21, 20253 min read
Quantitative FinanceAll chapters
Part 10 of 15Risk Management and Financial Risk Controls
Chapter 54Credit Risk Fundamentals › Portfolio Credit Risk
Reading section 10 of 15 · Portfolio Credit Risk · 3 minSection 10 of 15 · 3 min

Book contents

Section 10 of 15 · 3 min read

Credit Risk Fundamentals › Portfolio Credit RiskOne section · Sections in this chapter10 / 15 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Individual loan metrics tell only part of the story. Portfolio effects, such as diversification and concentration, significantly affect total credit risk. A well-diversified portfolio of many small exposures to borrowers in different industries and regions will have much lower risk than a concentrated portfolio with large exposures to a few correlated borrowers. Understanding these portfolio dynamics is essential for managing credit risk at the enterprise level.

In[29]:
Code
def portfolio_expected_loss(portfolio_df):
    """Calculate total portfolio expected loss (additive)."""
    return portfolio_df["Expected_Loss"].sum()


def portfolio_unexpected_loss_independent(portfolio_df):
    """
    Calculate portfolio UL assuming independence.
    Under independence, variances add, so UL = sqrt(sum of squared ULs).
    """
    return np.sqrt((portfolio_df["UL"] ** 2).sum())


def portfolio_unexpected_loss_correlated(portfolio_df, default_correlation):
    """
    Calculate portfolio UL with default correlation.
    Uses simplified one-factor model approach.
    """
    n = len(portfolio_df)
    uls = portfolio_df["UL"].values

    # Correlation adds covariance terms
    # Var(sum) = sum(var) + 2*sum(cov)
    variance_sum = (uls**2).sum()

    # Add correlation effect
    covariance_sum = 0
    for i in range(n):
        for j in range(i + 1, n):
            covariance_sum += 2 * default_correlation * uls[i] * uls[j]

    return np.sqrt(variance_sum + covariance_sum)


# Calculate portfolio metrics
port_el = portfolio_expected_loss(portfolio)
port_ul_ind = portfolio_unexpected_loss_independent(portfolio)
port_ul_corr = portfolio_unexpected_loss_correlated(
    portfolio, default_correlation=0.20
)
Out[30]:
Console
Portfolio Credit Risk Summary
=======================================================
Total Exposure:                    $28.0M
Portfolio Expected Loss:           $86,145
Portfolio UL (independent):        $415,977
Portfolio UL (20% correlation):    $529,314

Diversification Effect (independent): 50.6%
Correlation Impact:                    +27.2%

Default correlation substantially increases portfolio unexpected loss, and the magnitude of this effect is often surprising. During systemic crises, many borrowers deteriorate simultaneously, causing correlated defaults that overwhelm diversification benefits. When correlations spike, the portfolio that appeared well-diversified under normal conditions can experience concentrated losses. This phenomenon was tragically demonstrated in the structured credit market during 2008, when assumed correlations proved far too low. CDO tranches rated AAA based on historical correlation assumptions suffered unexpected losses because the underlying mortgage borrowers defaulted together at rates that the models had deemed virtually impossible.

Out[31]:
Visualization
Grouped bars for Companies A through E comparing expected loss with unexpected loss in thousands of dollars. Company D is highest at about $56 thousand expected and $274 thousand unexpected loss, followed by Company B at about $8 thousand and $218 thousand.
Expected and unexpected loss contributions across five borrowers. Company D has the largest value for both measures because its high PD and LGD outweigh its smaller exposure; Company B's $10M exposure produces the second-largest unexpected loss.

The comparison highlights how PD, LGD, and exposure jointly drive both credit risk measures. Company D contributes the most expected and unexpected loss because its high probability of default and 60% LGD outweigh its relatively small exposure. Company B's $10M exposure still produces the second-largest unexpected loss despite its better rating. This distinction matters for capital allocation, which focuses on buffering against unexpected rather than expected losses. Expected losses are a cost of doing business that should be covered by loan pricing and provisions; unexpected losses are the tail risks that require capital buffers to ensure institutional solvency.