Table of Contents


File

linear_granger_causality.m

Name

linear_granger_causality

Synopsis

linear_granger causality - calculates the significance (p-value) of the Granger causal effect of institution 1 (input_institution_returns) on institution two (output_institution_returns) beyond that of institution two's own historical values, 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

input_institution_returns
Name:
input_institution_returns
Description:

The time series returns of institution one (regressor variable).

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

Tx1 matrix

  1. Rows represent dates.

output_institution_returns
Name:
output_institution_returns
Description:

The time series returns of the institution two (response variable).

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

Tx1 matrix

  1. Rows represent dates.

Outputs

p_value
Name:
p_value
Description:

P-value indicating significance of specific granger causality relationship.

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

scalar


p_value_robust
Name:
p_value_robust
Description:

P-value indicating significance of specific granger causality relationship using robust method.

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_periods = size(input_institution_returns,1);
% Form the response in the regression equation
y = output_institution_returns(2:num_periods,1);

% Form the regressors
X = [output_institution_returns(1:num_periods-1) input_institution_returns( ...
1:num_periods-1)];

% Truncation lag fraction for the HAC is chosen .1
[betas, V_hat] = hac_regression(y,X,0.1);

p_value_robust = 1 - normcdf(betas(2)/sqrt(V_hat(2,2)/(num_periods-1)));

% a check for the usual estimator
residuals = y - X*betas;
s_squared = residuals'*residuals/(num_periods-3);
C = inv(X'*X);
t_stat = betas(2)/sqrt(s_squared*C(2,2));
p_value = 1-normcdf(t_stat);

Examples

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

 input_institution_returns = [ -0.0402,-0.0221, 0.0410, 0.0457, 0.0464]';

 output_institution_returns = [ -0.1015,-0.0215, 0.0469,-0.0105, 0.0649]';

 [p_value_robust p_value] = linear_granger_causality( ...
 input_institution_returns, output_institution_returns)

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.