Table of Contents


File

marginal_expected_shortfall.m

Name

marginal_expected_shortfall

Synopsis

marginal_expected_shortfall - Calculates the marginal expected shortfall of a firm.

Introduction

NOTE: PART OF A SET OF 3 RELATED FILES:

Acharya, Pedersen, Philippon, and Richardson (2010) argue that each financial institutions contribution to systemic risk can be measured as its systemic expected shortfall (SES), i.e., its propensity to be undercapitalized when the system as a whole is undercapitalized. SES is a theoretical construct and the authors use the following 3 measures to proxy it:

  1. The outcome of stress tests performed by regulators. The SES metric of a firm here is defined as the recommended capital that it was required to raise as a result of the stress test in February 2009.
  2. The decline in equity valuations of large financial firms during the crisis, as measured by their cumulative equity return from July 2007 to December 2008.
  3. The widening of the credit default swap spreads of large financial firms as measured by their cumulative CDS spread increases from July 2007 to December 2008.

Given these proxies, the authors seek to develop leading indicators which "predict" an institutions SES; these leading indicators are marginal expected shortfall (MES) and leverage (LVG).

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

firm_returns
Name:
firm_returns
Description:

The time series of returns (equity or CDS) for the firm. Should have same number of data points as market_returns.

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

Tx1 matrix, T > number of data points required for returns to exist below the 5th percentile.

  1. Rows represent dates

market_returns
Name:
market_returns
Description:

The time series of returns (equity or CDS) for the market as a whole. It is necessary to have enough data points so that there exists a value.

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

Tx1 matrix, T > number of data points required for returns to exist below the 5% mark.

  1. Rows represent dates.

Outputs

mes
Name:
mes
Description:

The average of firm time series returns corresponding to 5% worst overall market return days.

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


% We need to have the same days for market_returns and firm_returns
if length(firm_returns)~=length(market_returns)
    error('Unequal number of days for firm and market');
end

% Find the 5% quantile the market return
low_threshold = prctile(market_returns,5);

% Find the 5% worst days for the market return
worst_days = market_returns < low_threshold;

% Take the average of the firm's returns during the worst days of the
% market
mes = mean(firm_returns(worst_days));

Examples

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

 firm_returns = ...
 [-0.1595, 0.1211,-0.0806, ...
  -0.0291, 0.0897,-0.0254, ...
   0.1210, 0.0132,-0.1214, ...
   0.1901, 0.0243 ]';

 market_returns = ...
 [-0.0205,-0.0510, 0.0438, ...
   0.0914, 0.0243,-0.1051, ...
   0.0121, 0.0221,-0.0401, ...
  -0.0111,-0.0253 ]';

 mes = marginal_expected_shortfall(firm_returns, market_returns);

References

Acharya, Pedersen, Philippon, & Richardson. (2010). Measuring systemic risk.

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