View source: R/lib_Network_Evaluations.R
default_cascade | R Documentation |
Computes bank defaults via the default cascade algorithm.
default_cascade(L, ea, el = 0, recoveryrate = 0)
L |
liability matrix |
ea |
vector of external assets |
el |
vector of external liabilites (default 0) |
recoveryrate |
recovery rate in [0,1] (defaults to 0) |
vector indicating which banks default (1=default, 0= no default)
ea <- c(1/2,5/8,3/4)
el <- c(3/2,1/2,1/2)
x <- 0.5
L <- matrix(c(0,x,1-x,1-x,0,x,x,1-x,0),nrow=3)
default_cascade(L,ea,el)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.