Table of Contents


File

dynamic_causality_index.m

Name

dynamic_causality_index

Synopsis

dynamic_causality_index - calculates dynamic causality index from the adjacency matrix of inter-institutional Granger causal relationships to measure interconnectedness based on Billio et al. (2010).

Introduction

NOTE: PART OF A SET OF 8 RELATED FILES:

To investigate the dynamic propagation of systemic risk, the authors measure the direction of the relationship between institutions using Granger causality. Specifically, the authors analyze the pairwise Granger causalities between the t and t + 1 monthly returns of the 4 indexes; they say that X Granger-causes Y if c1 has a p-value of less than 5%; similarly, they say that Y Granger-causes X if the p-value of b1 is less than 5%. They adjust for autocorrelation and heteroskedasticity in computing the p-value.

The above Granger-causality analysis can be undertaken at the static level, i.e., over a given period, find the causal relationships or at the dynamic level, where the analysis is run at 36-month rolling windows and for each window, the dynamic causality index (DCI) is calculated as:

DCIt = number of causal relationships in window / total possible number of causal relationships

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

asset_returns
Name:
asset_returns
Description:

Time series returns by date and per institution.

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

TxK matrix

  1. Rows represent dates.
  2. Columns represent returns per K institution.

statistical_significance_threshold
Name:
statistical_significance_threshold
Description:

The threshold for p-value that indicates if the linear Granger causal relationship is statistically significant.

Type:
float
Range:
[0,.1)
Dimensions:

scalar


Outputs

connection_matrix_robust
Name:
connection_matrix_robust
Description:

K x K boolean adjacency matrix tabulates if a statistically significant linear Granger causality relationship exists between institutions. If connection_matrix(i,j) = 1, then institution i Granger-causes institution j.
Corrects for autocorrelations and heteroskedasticity. Note: values are yes/no flags, represented as 1/0 values, respectively.

Type:
float
Range:
{0, 1}
Dimensions:

KxK matrix

  1. Rows represent institutions.
  2. Columns represent institutions.

connection_matrix
Name:
connection_matrix
Description:

K x K adjacency matrix tabulates if a statistically significant linear Granger causality relationship exists between institutions. If connection_matrix(i,j) = 1, then institution i affects institution j.
Does NOT correct for autocorrelations and heteroskedasticity. Note: values are yes/no flags, represented as 1/0 values, respectively.

Type:
float
Range:
{0, 1}
Dimensions:

KxK matrix

  1. Rows represent institutions.
  2. Columns represent institutions.

dci
Name:
dci
Description:

The dynamic causality index is calculated as the ratio of the total count of linkages between institutions for the robust matrix divided by the total possible number of interinstitutional linkages.

Type:
float
Range:
(0,1)
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.']);

%


num_institutions = size(asset_returns,2);
connection_matrix_robust = zeros(num_institutions);
connection_matrix = zeros(num_institutions);

% For each pair of different institutions find the p-value of their linear
% Granger causal relationship and if this relationship is significant
for i = 1:num_institutions
    for j = 1:num_institutions
        if i~=j
            [p_value_robust p_value] = linear_granger_causality( ...
            asset_returns(:,i), asset_returns(:,j));
            if p_value_robust < statistical_significance_threshold
                % The relationship is significant
                connection_matrix_robust(i,j) = 1;
            end
            if p_value < statistical_significance_threshold
                % The relationship is significant
                connection_matrix(i,j) = 1;
            end

        end
    end
end

% Maximum possible number of relationships are all the pairs of different
% institutions
maximum_possible_num_causal_relationships = num_institutions^2 ...
- num_institutions;
num_causal_relationships = sum(sum(connection_matrix_robust));

% Dynamic Causality Index
dci = num_causal_relationships/maximum_possible_num_causal_relationships;

Examples

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

 asset_returns = [0.02, 0.03, 0.007, -0.03, 0.01, 0.01; ... 
                  0.01, -0.06, -0.02, 0.02, 0.07, -0.05; ... 
                  0.07, -0.04, 0.09, 0.07, -0.03, 0.08]';

 statistical_significance_threshold = 0.1;

 [connection_matrix_robust, connection_matrix, dci] = ...
  dynamic_causality_index(asset_returns,...
  statistical_significance_threshold);

References

Billio et al. (2010). Econometric measures of systemic risk in the finance and insurance sectors (No. w16223). National Bureau of Economic Research.

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