Matlab codes for Systemic Risk project