Table of Contents


File

co_risk.m

Name

co_risk

Synopsis

co_risk - calculates the conditional co-risk between two institutions

Introduction

NOTE: PART OF A SET OF 2 RELATED FILES:

The Co-Risk measure, first proposed in the IMFs 2009 Global Financial Stability Review (International Monetary Fund, 2009a), examines the co-dependence between the CDS of various financial institutions. It is more informative than unconditional risk measures because it provides a market assessment of the proportional increase in a firms credit risk induced, directly and indirectly, from its links to another firm. Note that the approach used is based on quantile regression, a concept also used in CoVaR (see Adrian and Brunnermeier (2010), a summary of which is presented in Section E.1). The quantile regression approach permits a more accurate estimation of the co-movements of financial institutions risk factors (or co-risk estimates) under distress, taking into account their nonlinear relationship.

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

output_cds_spreads
Name:
output_cds_spreads
Description:

The CDS spreads time series for the output firm or Y.

Type:
float
Range:
(0,10000)
Dimensions:

Tx1 matrix

  1. Row represents dates.

input_cds_spreads
Name:
input_cds_spreads
Description:

The CDS spreads time series for the input firm or X.

Type:
float
Range:
(0,10000)
Dimensions:

Tx1 matrix

  1. Rows represent dates.

risk_factors_series
Name:
risk_factors_series
Description:

Risk-factors time series R, 5 risk factors used in paper.

Type:
float
Range:
(-inf,+inf)
Dimensions:

TxR matrix

  1. Rows represent dates.
  2. Columns represent risk factor values.

q
Name:
q
Description:

Indicates desired quantile of the distribution for regression. The paper uses q = 0.95 to indicate distressed regime.

Type:
float
Range:
(0,1)
Dimensions:

scalar


risk_factors_values
Name:
risk_factors_values
Description:

The values of the risk factors at the period we calculate the co-risk.

Type:
float
Range:
(-inf,+inf)
Dimensions:

1xR matrix

  1. Columns represent risk factor values.

Outputs

c
Name:
c
Description:

The conditional co-risk measure.

Type:
float
Range:
(-inf,+inf)
Dimensions:

scalar


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.']);


%
% Parameters:
% output_cds_spreads The cds-spreads time series for the output firm. A nx1
% vector
% input_cds_spreads The cds-spreads time series for the input firm. A nx1
% vector
% risk_factors_series Risk-factors time series. A n x k matrix
% q the quantile. The paper uses q = 0.95
% risk_factors_values the values of the risk factors at the period we 
% calculate the co-risk. A 1 x k vector
% use_cvx  The method to use in quantile_regression. See notes there.

num_dates = size(output_cds_spreads,1);

% Run the quantile regression
y = output_cds_spreads;
X = [ones(num_dates,1) risk_factors_series input_cds_spreads];
betas = quantile_regression(y, X, q, false);  
    % See quantile_regression for the fourth option.

% Calculate the q-percentile of cds-spreads time series
input_cds_quantile = prctile(input_cds_spreads,100*q);
output_cds_quantile = prctile(output_cds_spreads,100*q);

c = 100*((betas(1) + betas(end)*output_cds_quantile+betas(2:end-1)' ...
    *risk_factors_values')/input_cds_quantile-1);

Examples

NOTE: Numbers used in the examples are arbitrary valid values.
They do not necessarily represent a realistic or plausible scenario.

 output_cds_spreads = [0.04, 0.01, 0.08, 0.09, 0.01]';

 input_cds_spreads = [0.01, 0.01, 0.04, 0.03, 0.06]';

 risk_factors_series = ...
 [-1.2, 0.1; ...
  -1.1, 0.7; ...
  -0.8, 0.2; ...
  -1.3, 1.8; ...
   0.3, 2.3];

 q = 0.95

 risk_factors_values = [-1.2, 0.1]

 c = co_risk(output_cds_spreads, input_cds_spreads, ...
 risk_factors_series,q,risk_factors_values);

References

International Monetary Fund. (2009). Global Financial Stability Report: Responding to the Financial Crisis and Measuring Systemic Risks (working paper). Washington, DC: IMF.

Bisias et al. (2012). A survey of systemic risk analytics (Working paper #0001). Washington, DC: Office of Financial Research, 112-114.