default_cascade: Default Cascade

Description Usage Arguments Value Examples

View source: R/lib_Network_Evaluations.R

Description

Computes bank defaults via the default cascade algorithm.

Usage

1
default_cascade(L, ea, el = 0, recoveryrate = 0)

Arguments

L

liability matrix

ea

vector of external assets

el

vector of external liabilites (default 0)

recoveryrate

recovery rate in [0,1] (defaults to 0)

Value

vector indicating which banks default (1=default, 0= no default)

Examples

1
2
3
4
5
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)

systemicrisk documentation built on May 30, 2017, 1:47 a.m.

Search within the systemicrisk package
Search all R packages, documentation and source code