ModelRisk example · General techniques
Credit Portfolio Losses Two Ways
A year's default losses: simulated, built by Fast Fourier Transform, and summed product by product.
From the model’s saved run
Portfolio A: whole loss on default
Monte Carlo, the FFT sampled, and the FFT exactly.
| Measure | Monte Carlo | FFT, sampled | Exact |
|---|---|---|---|
| Mean | 9,757 | 9,738 | 9,746 |
| Standard deviation | 723 | 727 | 719 |
| VaR (95%) | 10,951 | 10,948 | 10,944 |
| Expected shortfall (95%) | 11,268 | 11,282 | 11,258 |
S-curve (cumulative probability) of Monte Carlo, FFT, VaR (95%), FFT from the saved simulation.
The business question
Portfolio A has 2,135 obligors, each with an 8.3% chance of defaulting in the year. A default loses a Lognormal amount with mean 55 and standard deviation 12 ($ thousand). Portfolio B has 5,384 obligors with a 2.3% chance; a default loses a fraction of the exposure (a Beta), and the exposure itself is uncertain (a Lognormal with mean 100 and standard deviation 10).
For A, the total is simulated (VoseAggregateMC) and built numerically by Fast Fourier Transform, which gives the VaR and the expected shortfall without simulation noise. For B, VoseSumProduct adds the products of exposure and fraction in one step, against an explicit sum with a row per possible default.
- Who it is for
- Credit risk analysts and anyone modelling the total of a random number of losses: defaults, claims, failures.
- Main outputs
- For a portfolio where each default loses a whole amount: the total loss by Monte Carlo and by FFT, its mean, spread, 95% VaR and expected shortfall, exact from the FFT · for a portfolio where each default loses a fraction of its exposure: the total by VoseSumProduct and row by row · how much of the risk comes from the number of defaults.
How the model works
Five sheets after this one, read from left to right. Each one feeds the next.
Inputs sheet
Obligors, default probability and loss for each portfolio; the confidence level (95%).
Portfolio A sheet
The number of defaults is Binomial and each loss Lognormal. Monte Carlo: VoseAggregateMC adds one simulated loss per simulated default. FFT: VoseAggregateFFTObject builds the total's distribution; its VaR comes from VoseAggregateFFT with U, and its expected shortfall from VoseIntegrate over the density VoseAggregateFFTProb.
Portfolio B sheet
The number of defaults is drawn once; VoseSumProduct adds that many products of an exposure and a loss fraction. The Row by row sheet does the same the long way: a row per possible default, zero beyond the number drawn.
Results sheet
Mean, standard deviation, VaR and expected shortfall both ways, and the share of the variance from the number of defaults.
ModelRisk techniques
Find similar models
- Product
- Type
- Application
- Uses
The results in detail
Portfolio B: loss as a fraction of the exposure
VoseSumProduct against the row-by-row sum.
| Measure | Sum product | Row by row | Exact |
|---|---|---|---|
| Mean | 2,876 | 2,877 | 2,875 |
| Standard deviation | 266 | 265 | 264 |
| VaR (95%) | 3,325 | 3,326 | |
| Expected shortfall (95%) | 3,448 | 3,442 |
Where the risk comes from
Share of the total's variance from the number of defaults; the rest is the size of each loss.
S-curve (cumulative probability) of VoseSumProduct, Row by row from the saved simulation.
| Portfolio | Share |
|---|---|
| A: whole loss | 95% |
| B: fraction of the exposure | 93% |
How to read these results
- Portfolio A expects about 177 defaults a year at about 55 each: an expected loss of 9,746. One year in 20 the loss exceeds the VaR of about 10,940, and those worst years average about 11,260 (the expected shortfall).
- Monte Carlo and FFT describe the same total. The FFT builds its distribution numerically, so its VaR and expected shortfall carry no sampling noise. The simulated ones agree within it.
- Portfolio B: when a default loses a fraction of an uncertain exposure, VoseSumProduct adds the products in one step. The row-by-row sum gives the same distribution but needs a row per possible default.
- In both, the number of defaults drives most of the risk (95% and 93% of the variance): what each default costs matters far less than how many there are. With correlated defaults, which these examples leave out, that number becomes much more uncertain.
See it move. Open the workbook, change an input on the Inputs sheet and run the simulation: every table and chart on this page updates in Excel.
Inputs and assumptions
Every assumption in the model, with its uncertainty and where it comes from. The figures are illustrative.
Portfolio A: a default loses a whole amount 4 inputs
| Assumption | Unit | Value |
|---|---|---|
| Obligors | obligors | 2135 |
| Probability of default in the year | 8.3% | |
| Loss on a default: meanLognormal | $ thousand | 55.0 |
| Loss on a default: standard deviation | $ thousand | 12.0 |
Portfolio B: a default loses a fraction of the exposure 6 inputs
| Assumption | Unit | Value |
|---|---|---|
| ObligorsAt most 200 defaults are modelled row by row (checked) | obligors | 5384 |
| Probability of default in the year | 2.3% | |
| Exposure: meanLognormal | $ thousand | 100.0 |
| Exposure: standard deviation | $ thousand | 10.0 |
| Loss fraction: Beta αMean α ÷ (α + β) = 23% | 13.0 | |
| Loss fraction: Beta β | 43.0 |
Risk measures 1 input
| Assumption | Unit | Value |
|---|---|---|
| Confidence level for VaR and expected shortfall | 95% |
Units and conventions
- VaR
- The loss exceeded with probability 1 − confidence (here 5%): the 95th percentile.
- Expected shortfall
- The mean loss in the worst 5% of years (CVaR).
- $ thousand
- All amounts.
Key assumptions and limitations
- Independence
- Obligors default independently, and loss sizes are independent. Real defaults are correlated (a downturn raises them all), which widens the distribution a lot.
- One year
- Each obligor defaults at most once in the year.
- Data
- The portfolios are those of ModelRisk's earlier Credit Risk Single Portfolio and Credit Risk Separated examples. Their units are not stated, $ thousand is assumed.
How to use it
- Set the portfolios on the Inputs sheet.
- Run a simulation from the ModelRisk ribbon (10,000 samples with a fixed seed are set); the FFT's exact VaR and expected shortfall need none.
- Prefer VoseAggregateFFT for tail measures of a single portfolio and VoseSumProduct for products; keep row by row only to show what the functions do.
ModelRisk functions used
- VoseBinomialObject, VoseLognormalObject, VoseBetaObject
- Distributions as objects.
- VoseAggregateMC
- A total: a number of losses, then one simulated loss for each, added up.
- VoseAggregateFFTObject, VoseAggregateFFT, VoseAggregateFFTProb
- The total's distribution by Fast Fourier Transform: object, sample or percentile, density.
- VoseIntegrate
- Numerical integration: here the expected shortfall from the FFT density.
- VoseSumProduct
- The sum of N products of independent draws, in one step.
- VoseSimPercentile, VoseSimCVARp
- VaR and expected shortfall of the simulation.
Further reading
- Monte Carlo simulation explained (Vose guide)
- Vose, D. (2008). Risk Analysis: A Quantitative Guide, 3rd edition. Wiley: credit risk and aggregate distributions.
Download the workbook and run it yourself. It opens in Excel with ModelRisk. The free trial runs every example model.
Related example models
- ModelRisk★★★★★Correlated Insurance PoliciesFive lines of policies whose bad years come together: what correlation does to the total.Five lines of claims with deductibles and limits, linked by a Clayton copula, against the same lines taken as independent.
- ModelRisk★★★★★Operational Risk Capital (FFT)How much capital covers a year of operational losses at 99.9%?Forty-five frequency–severity cells combined by FFT into one annual loss: the 99.9th percentile and capital by risk type.
- ModelRisk★★★★★Moments of an Aggregate DistributionThe mean, spread, skewness and kurtosis of a year's total claims, without simulating, and what they are good for.Exact moments of a random sum, and distributions matched to them, checked against simulation.
An illustrative example: the figures are invented for teaching and do not describe a real company, project or asset. Last updated 9 October 2026.