A toolbox for systemic risk based on liabilities matrices. Contains a Gibbs sampler for liabilities matrices where only row and column sums of the liabilities matrix as well as some other fixed entries are observed. Includes models for power law distribution on the degree distribution.