Table of Contents


File

delta_co_var.m

Name

delta_co_var

Synopsis

delta_co_var - Calculates the marginal contribution (delta CoVaR) of an institution to systemic risk.

Introduction

NOTE: PART OF A SET OF 2 RELATED FILES:

Adrian and Brunnermeier (2010) propose to measure systemic risk via the conditional value-at-risk (CoVaR) of the financial system, conditional on institutions being in a state of distress. An institutions contribution to systemic risk is defined as the difference between CoVaR conditional on the institution being in distress and CoVaR in the median state of the institution. The CoVaR systemic risk measure is able to identify the risk on the system by individually systemically important institutions, which are so interconnected and large that they can cause negative risk spillover effects on others, as well as by smaller institutions that are systemic when acting as part of a herd. Furthermore, CoVaR is a measure which does not rely on contemporaneous price movements and thus can be used to anticipate systemic risk. The CoVaR measure captures institutional externalities such as too big to fail, too interconnected to fail, and crowded trade positions.

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_returns
Name:
output_returns
Description:

The returns of the system.

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

Tx1 matrix

  1. Rows represent dates.

input_returns
Name:
input_returns
Description:

The returns of the institution whose contribution we want to quantify.

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

Tx1 matrix

  1. Rows represent dates.

lagged_factors_returns
Name:
lagged_factors_returns
Description:

The lagged returns (lag = 1) for the factors as used in eq. 6 of the paper. Represents distances between origin node and destination nodes.

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

(T+1)x1 matrix, where 1 row is added due to lagging.

  1. Rows represent dates.

quantile
Name:
quantile
Description:

The quantile we want to use (0.05 or 0.01) in the paper.

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

scalar


Outputs

dcovar
Name:
dcovar
Description:

The marginal contribution (delta CoVaR) of an institution (input_returns) to systemic risk (output_returns).

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




% Default value quantile = 0.05
if nargin < 4
    quantile = 0.05;
end

if nargin < 3
    lagged_factors_returns = [];
end

num_periods = size(output_returns,1);
median_percentile = 0.5;

% Calculate the median state of the input institution
X = [ones(num_periods,1) lagged_factors_returns(1:end-1,:)];
y = input_returns;
betas = quantile_regression(y,X,median_percentile,0);
if nargin<3
    % lagged_factors_returns is empty
    median_input_state = betas(1);
else
    median_input_state = [1 lagged_factors_returns(end,:)]*betas;
end

% Calculate the distressed state of the input institution
betas = quantile_regression(y,X,quantile,0);
if nargin < 3
    % lagged_factors_returns is empty
    distressed_input_state = betas(1);
else
    distressed_input_state = [1 lagged_factors_returns(end,:)]*betas;
end


% Quantile regression of the output_institution or system on lagged factors
% and input institution
X = [ones(num_periods,1) input_returns lagged_factors_returns(1:end-1,:)];
y = output_returns;
betas = quantile_regression(y,X,quantile,0);

% Definition of delta_co_var equation (9)
dcovar = betas(2)*(distressed_input_state - median_input_state);

Examples

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

 output_returns = [-0.01, 0.03, -0.02, 0.05, 0.03, 0.03]';
 input_returns = [0.01, 0.04, -0.02, -0.03, 0.004, 0.03]';
 lagged_factors_returns = [0.07, 0.11, 0.10, 0.16, 0.08, 0.12, 0.01]';
 quantile = 0.05;

 dcovar = delta_co_var(output_returns, input_returns, ...
 lagged_factors_returns, quantile);

References

Adrian, T., & Brunnermeier, M. K. (2011). CoVaR (No. w17454). National Bureau of Economic Research.

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