Simulating Loss Given Default

Overview


Loss given default is the amount of the asset that is lost when it defaults. That is, after a default, part of the asset may still be recoverable. For instance, when a mortgage defaults, the bank can still take possession of the house and sell it, to recover the mortgage value.

One to model losses is to model the recoveries (payments) that occur after default. In particular, one could model both the size of recovery payments as well as the dates on which those recoveries occur.

For some applications, this level of detail is necessary. For others, it is sufifcient to

Implementation



A simple way to simulate a loss given default is to measure (or assume) an average loss and a standard deviation of loss, and then simulate a Beta Distribution with the given mean and standard deviation.

The Beta distribution is often chosen because it is a distribution over values between 0 and 1, with zero probability outside.


let bt = await import('/lib/statistics/distributions/beta/v1.0.0/beta.mjs');

let alpha = bt.alpha(0.4, 0.1);
let beta = bt.beta(0.4, 0.1);

let mean = bt.mean(alpha,beta);
let variance = bt.variance(alpha,beta);

let results = [];
for(let i=0;i<1000; i++){
    let lgd = bt.random(alpha, beta);
    results.push(lgd);
}
					
Try it!

Contents