This framework calculates and analyses the following systemic risk measures:
- COMPONENT MEASURES
Absorption Ratio
by Kritzman et al. (2010)CATFIN
by Allen et al. (2012)Correlation Surprise
by Kinlaw & Turkington (2012)Turbulence Index
by Kritzman & Li (2010)Principal Component Analysis
- CONNECTEDNESS MEASURES
DCI (Dynamic Causality Index)
by Billio et al. (2011)"In & Out" Connections
by Billio et al. (2011)"In & Out - Other" Connections
by Billio et al. (2011)Network Centralities: Betweenness, Degree, Closeness, Clustering, Eigenvector & Katz
- CROSS-QUANTILOGRAM MEASURES
Full Cross-Quantilograms
by Han et al. (2016)Partial Cross-Quantilograms
by Han et al. (2016)
- CROSS-SECTIONAL MEASURES
CoVaR & Delta CoVaR (Conditional Value-at-Risk)
by Adrian & Brunnermeier (2008)MES (Marginal Expected Shortfall)
by Acharya et al. (2010)SES (Systemic Expected Shortfall)
by Acharya et al. (2010)SRISK (Conditional Capital Shortfall Index)
by Brownlees & Engle (2010)Idiosyncratic Metrics: Beta, Value-at-Risk & Expected Shortfall
- DEFAULT MEASURES
D2C (Distance To Capital)
by Chan-Lau & Sy (2007)D2D (Distance To Default)
by Vassalou & Xing (2004)DIP (Distress Insurance Premium)
by Black et al. (2012)SCCA (Systemic Contingent Claims Analysis)
by Jobst & Gray (2013)
- LIQUIDITY MEASURES
ILLIQ (Illiquidity Measure)
by Amihud (2002)RIS (Roll Implicit Spread)
by Hasbrouck (2009)Classic Indicators: Hui-Heubel Liquidity Ratio, Turnover Ratio & Variance Ratio
- REGIME-SWITCHING MEASURES
2-States Model: High & Low Volatility
3-States Model: High, Medium & Low Volatility
4-States Model: High & Low Volatility With Corrections
Indicators: Average Probability of High Volatility, Joint Probability of High Volatility
- Main References: Billio et al. (2010), Maheu et al. (2010), Abdymomunov (2011)
- SPILLOVER MEASURES
SI (Spillover Index)
by Diebold & Yilmaz (2014)Spillovers From & To
by Diebold & Yilmaz (2014)Net Spillovers
by Diebold & Yilmaz (2014)
Some of the aforementioned models have been improved or extended according to the methodologies described in the V-Lab Documentation, which represents a great source of systemic risk measurement.
The project has been published in "MATLAB Digest - Financial Services"
of May 2019. If you found it useful to you, please consider making a donation to support its maintenance and development:
The minimum required Matlab version is R2014b
. In addition, the following products and toolboxes must be installed in order to properly execute the script:
- Computer Vision System Toolbox
- Curve Fitting Toolbox
- Econometrics Toolbox
- Financial Toolbox
- Image Processing Toolbox
- Optimization Toolbox
- Parallel Computing Toolbox
- Simulink Control Design
- Statistics and Machine Learning Toolbox
- System Identification Toolbox
- Create a properly structured database (see the paragraph below).
- Edit the
run.m
script following your needs. - Execute the
run.m
script.
Datasets must be built following the structure of default ones included in every release of the framework (see Datasets
folder). Below a list of the supported Excel sheets and their respective content:
-
Shares: prices or returns expressed in logarithmic scale of the benchmark index (the column can be labeled with any desired name and must be placed just after observation dates) and the firms, with daily frequency.
-
Volumes: trading volume of the firms expressed in currency amount, with daily frequency.
-
Capitalizations: market capitalization of the firms, with daily frequency.
-
CDS: the risk-free rate expressed in decimals (the column must be called
RF
and must be placed just after observation dates) and the credit default swap spreads of the firms expressed in basis points, with daily frequency. -
Balance Sheet Components: the balance sheet components of the firms expressed in omogeneous observations frequency, currency and scale, structured as below:
- Assets: the book value of assets.
- Equity: the book value of equity.
- Separate Accounts: the separate accounts of insurance firms.
-
State Variables: systemic state variables, with daily frequency.
-
Groups: group definitions, based on key-value pairs where the
Name
field represents the group names and theCount
field represents the number of firms to include in the group. The sum of theCount
fields must be equal to the number of firms. For example, the following groups definition:Firms in the Shares Sheet: A, B, C, D, E, F, G, H
Insurance Companies: 2
Investment Banks: 2
Commercial Banks: 3
Government-sponsored Enterprises: 1produces the following outcome:
"Insurance Companies" contains A and B
"Investment Banks" contains C and D
"Commercial Banks" contains E, F and G
"Government-sponsored Enterprises" contains H
The main dataset (Datasets\Example_Large.xlsx
), based on the US financial sector, defines the following entities and data over a period of time ranging from 2002
to 2019
(both included):
- Group 1: Insurance Companies (5)
- American International Group Inc. (AIG)
- The Allstate Corp. (ALL)
- Berkshire Hathaway Inc. (BRK)
- MetLife Inc. (MET)
- Prudential Financial Inc. (PRU)
- Group 2: Investment Banks (6)
- Bank of America Corp. (BAC)
- Citigroup Inc. (C)
- The Goldman Sachs Group Inc. (GS)
- J.P. Morgan Chase & Co. (JPM)
- Lehman Brothers Holdings Inc. (LEH)
- Morgan Stanley (MS)
- Group 3: Commercial Banks (7)
- American Express Co. (AXP)
- Bank of New York Mellon Corp. (BK)
- Capital One Financial Corp. (COF)
- PNC Financial Services Inc. (PNC)
- State Street Corp. (STT)
- US Bancorp (USB)
- Wells Fargo & Co. (WFC)
- Group 4: Government-sponsored Enterprises (2)
- Federal Home Loan Mortgage Corp / Freddie Mac (FMCC)
- Federal National Mortgage Association / Fannie Mae (FNMA)
- FFR: the effective federal funds rate rate.
- TBILL_DELTA: the percent change in the 3M treasury bill rate.
- CREDIT_SPREAD: the difference between the BAA corporate bond rate and the 10Y treasury bond rate.
- LIQUIDITY_SPREAD: the difference between the 3M GC repo rate and the 3M treasury bill rate.
- TED_SPREAD: the difference between the 3M USD LIBOR rate and the 3M treasury bill rate.
- YIELD_SPREAD: the difference between the 10Y treasury bond rate and the 3M treasury bond rate.
- DJ_CA_EXC: the excess returns of the DJ US Composite Average with respect to the S&P 500.
- DJ_RESI_EXC: the excess returns of the DJ US Select Real Estate Securities Index with respect to the S&P 500.
- VIX: the implied volatility index.
-
The minimum allowed dataset must include the
Shares
sheet with a benchmark index and at least3
firms. Observations must have a daily frequency and, in order to run consistent calculations, their minimum required amount is253
, which translates into a full business year plus an additional observation at the beginning of the time series. They must have been previously validated and preprocessed by:- discarding illiquid series (unless necessary);
- detecting and removing outliers;
- removing rows with NaNs or filling the gaps through interpolation.
-
It is not mandatory to include financial time series used by unwanted measures. Optional financial time series used by included measures can be omitted, as long as their contribution isn't necessary. Below a list of required and optional time series for each category of measures:
- Component Measures:
- Required: shares (any).
- Optional: none.
- Connectedness Measures:
- Required: shares (any).
- Optional: groups.
- Cross-Quantilogram Measures:
- Required: shares (any).
- Optional: state variables.
- Cross-Sectional Measures:
- Required: shares (any), capitalizations, assets, equity.
- Optional: separate accounts, state variables.
- Default Measures:
- Required: shares (any), capitalizations, cds, assets, equity.
- Optional: none.
- Liquidity Measures:
- Required: shares (prices), volumes, capitalizations.
- Optional: state variables.
- Regime-Switching Measures:
- Required: shares (any).
- Optional: none.
- Spillover Measures:
- Required: shares (any).
- Optional: none.
- Component Measures:
-
Firms whose
Shares
value is constantly null in the tail of the time series, for a span that includes at least5%
of the total observations, are considered to bedefaulted
. Firms whoseEquity
value is constantly null in the tail of the time series, for a span that includes at least5%
of the total observations, are considered to beinsolvent
. This allows the scripts to exclude them from computations starting from a certain time point onward; defaulted firms are excluded by all the measures, while insolvent firms are excluded only by SCCA default measures. -
If the dataset parsing process is too slow, the best way to solve the issue is to provide a standard unformatted Excel spreadsheet (
.xlsx
) or a binary Excel spreadsheet (.xlsb
). Once a dataset has been parsed, the script stores its output so that the parsing process happens only at first run. -
Some scripts may take very long time to finish in presence of huge datasets and/or extreme parametrizations. The performance of calculations may vary depending on the CPU processing speed and the number of CPU cores available for parallel computing.