File
credit_funding_shock.m
Name
credit_funding_shock
Synopsis
credit_funding_shock - Chan-Lau et al. (2009) simulates credit funding shock on banking system.
Introduction
Chan-Lau, Espinosa, and Sole (2009) and the IMFs 2009 Global Financial Stability Report (International Monetary Fund, 2009) contain two network models of interbank exposures to assess the network externalities of a bank failure using institutional data. Network analysis, which can track the reverberation of a credit event or liquidity squeeze throughout the system, can provide important measures of financial institutions resilience to the domino effects triggered by financial distress. The starting point of any network analysis is the construction of a matrix of inter-institution exposures that includes gross exposures among financial institutions. Once an exposure matrix is in place, simulations can explore the effects of the individual default of each bank and then track the domino effects triggered by this event. For each bank, one can compute how vulnerable bank A is to bank Bs default and which banks cause the most defaults.
License
=============================================================================
Copyright 2011, Dimitrios Bisias, Andrew W. Lo, and Stavros Valavanis
COPYRIGHT STATUS: This work was funded in whole or in part by the Office of
Financial Research under U.S. Government contract TOSOFR-11-C-0001, and is,
therefore, subject to the following license: The Government is granted for
itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
worldwide license to reproduce, prepare derivative works,
distribute copies to the public, perform and display the work.
All other rights are reserved by the copyright owner.
THIS SOFTWARE IS PROVIDED "AS IS". YOU ARE USING THIS SOFTWARE AT YOUR OWN RISK. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS, OR THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=============================================================================
Inputs
Outputs
Code
% Run warning message
warning('OFRwp0001:UntestedCode', ...
['This version of the source code is very preliminary, ' ...
'and has not been thoroughly tested. Users should not rely on ' ...
'these calculations.']);
num_banks = length(capitals);
initial_capitals = capitals;
defaulted_banks = zeros(num_banks,1);
examined_defaulted_banks = zeros(num_banks,1);
% Set to 1 the bank that triggers the credit and funding shock
defaulted_banks(default_bank) = 1;
% As long as there is a bank that has defaulted but we have not yet
% simulated its consequences
while sum(defaulted_banks ~=examined_defaulted_banks)~=0
triggered_bank = find(defaulted_banks~=examined_defaulted_banks,1);
examined_defaulted_banks(triggered_bank) = 1;
for i=1:num_banks
if i~=triggered_bank
capitals(i) = capitals(i) - delta*rho ...
*interbank_loans(triggered_bank, i) ...
- lambda*interbank_loans(i,triggered_bank);
end
end
% If the capital is negative the bank has defaulted
defaulted_banks(capitals < 0) = 1;
end
capital_losses = initial_capitals - capitals;
% For the defaulted banks the losses are equal to their initial capital
capital_losses(defaulted_banks>0) = initial_capitals(defaulted_banks>0);
Examples
NOTE: Numbers used in the examples are arbitrary valid values.
They do not necessarily represent a realistic or plausible scenario.
interbank_loans = ...
[70000, 15000, 24000, 52453;
23420, 24252, 10000, 35354;
98763, 45666, 96555, 05000;
09800, 54444, 04336, 67520];
default_bank = 3;
capitals=[100000;200000;300000;400000];
lambda = 1; rho = .35; delta = 1;
[capital_losses defaulted_banks] = credit_funding_shock(...
default_bank,capitals, interbank_loans,lambda, rho, delta);
References
Chan-Lau et al. 2009). Assessing the Systemic Implications of FinancialLinkages. IMF.