Title: | Monitoring Systemic Risk |
---|---|
Description: | The past decade has demonstrated an increased need to better understand risks leading to systemic crises. This framework offers scholars, practitioners and policymakers a useful toolbox to explore such risks in financial systems. Specifically, this framework provides popular econometric and network measures to monitor systemic risk and to measure the consequences of regulatory decisions. These systemic risk measures are based on the frameworks of Adrian and Brunnermeier (2016) <doi:10.1257/aer.20120555> and Billio, Getmansky, Lo and Pelizzon (2012) <doi:10.1016/j.jfineco.2011.12.010>. |
Authors: | Jean-Baptiste Hasse [aut, cre] |
Maintainer: | Jean-Baptiste Hasse <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-11-17 03:39:35 UTC |
Source: | https://github.com/cran/SystemicR |
This dataset includes state variables data extracted from the FRED. Specifically, it includes data on credit spread, liquidity spread, yield spread, 3M Treasury bill and VIX.
data("data_state_variables")
data("data_state_variables")
A data frame with 5030 observations on the following 7 variables.
Date
a date vector
CRESPR
a numeric vector
LIQSPR
a numeric vector
YIESPR
a numeric vector
TBR3M
a numeric vector
RESI
a numeric vector
VIX
a numeric vector
Federal Reserve Economic Data (FRED) St. Louis Fed
Hasse, Jean-Baptiste. "Systemic Risk: a Network Approach". AMSE Working Paper (2020) Hasse, Jean-Baptiste, and Quentin Lajaunie. "Does the Yield Curve Signal Recessions? New Evidence from an International Panel Data Analysis." AMSE Working Paper (2020).
data("data_state_variables") head(data_state_variables)
data("data_state_variables") head(data_state_variables)
This dataset includes state variables data extracted from the FRED and Yahoo Finance. Specifically, it includes dates, MSCI STOXX Europe 600 Index returns and banks, insurers and asset managers stock returns.
data("data_stock_returns")
data("data_stock_returns")
A data frame with 5030 observations on the following 74 variables.
ACKB.BB.Equity
a numeric vector
AGN.NA.Equity
a numeric vector
AGS.BB.Equity
a numeric vector
AIBG.ID.Equity
a numeric vector
ALV.GY.Equity
a numeric vector
AV..LN.Equity
a numeric vector
BALN.SE.Equity
a numeric vector
BARC.LN.Equity
a numeric vector
BBVA.SQ.Equity
a numeric vector
BIRG.ID.Equity
a numeric vector
BKT.SQ.Equity
a numeric vector
BNP.FP.Equity
a numeric vector
BPE.IM.Equity
a numeric vector
CBG.LN.Equity
a numeric vector
CBK.GY.Equity
a numeric vector
CNP.FP.Equity
a numeric vector
CS.FP.Equity
a numeric vector
CSGN.SE.Equity
a numeric vector
DANSKE.DC.Equity
a numeric vector
DBK.GY.Equity
a numeric vector
DNB.NO.Equity
a numeric vector
Date
a date vector
EBS.AV.Equity
a numeric vector
EMG.LN.Equity
a numeric vector
G.IM.Equity
a numeric vector
GBLB.BB.Equity
a numeric vector
GLE.FP.Equity
a numeric vector
HELN.SE.Equity
a numeric vector
HNR1.GY.Equity
a numeric vector
HSBA.LN.Equity
a numeric vector
HSX.LN.Equity
a numeric vector
ICP.LN.Equity
a numeric vector
III.LN.Equity
a numeric vector
INDUA.SS.Equity
a numeric vector
INGA.NA.Equity
a numeric vector
INVEB.SS.Equity
a numeric vector
ISP.IM.Equity
a numeric vector
JYSK.DC.Equity
a numeric vector
KBC.BB.Equity
a numeric vector
KINVB.SS.Equity
a numeric vector
KN.FP.Equity
a numeric vector
KOMB.CK.Equity
a numeric vector
LGEN.LN.Equity
a numeric vector
LLOY.LN.Equity
a numeric vector
LUNDB.SS.Equity
a numeric vector
MAP.SQ.Equity
a numeric vector
MB.IM.Equity
a numeric vector
MF.FP.Equity
a numeric vector
MUV2.GY.Equity
a numeric vector
NDA.SS.Equity
a numeric vector
NXG.LN.Equity
a numeric vector
OML.LN.Equity
a numeric vector
PARG.SE.Equity
a numeric vector
PRU.LN.Equity
a numeric vector
RBS.LN.Equity
a numeric vector
RF.FP.Equity
a numeric vector
RSA.LN.Equity
a numeric vector
SAMPO.FH.Equity
a numeric vector
SAN.SQ.Equity
a numeric vector
SCR.FP.Equity
a numeric vector
SDR.LN.Equity
a numeric vector
SEBA.SS.Equity
a numeric vector
SHBA.SS.Equity
a numeric vector
SLHN.SE.Equity
a numeric vector
SREN.SE.Equity
a numeric vector
STAN.LN.Equity
a numeric vector
STB.NO.Equity
a numeric vector
STJ.LN.Equity
a numeric vector
SWEDA.SS.Equity
a numeric vector
SXXP.Index
a numeric vector
SYDB.DC.Equity
a numeric vector
UBSG.SE.Equity
a numeric vector
UCG.IM.Equity
a numeric vector
ZURN.SE.Equity
a numeric vector
Federal Reserve Economic Data (FRED) St. Louis Fed and Yahoo Finance
Hasse, Jean-Baptiste. "Systemic Risk: a Network Approach". AMSE Working Paper (2020)
data("data_stock_returns") head(data_stock_returns)
data("data_stock_returns") head(data_stock_returns)
This function provides methods to compute dynamic systemic risk measures from correlation-based networks.
f_correlation_network_measures(df_data_returns)
f_correlation_network_measures(df_data_returns)
df_data_returns |
A dataframe including dates and stock returns |
Degree |
xts vector |
Closeness_Centrality |
xts vector |
Eigenvector_Centrality |
xts vector |
SR |
xts vector |
Volatility |
xts vector |
Jean-Baptiste Hasse
Hasse, Jean-Baptiste. "Systemic Risk: a Network Approach". AMSE Working Paper (2020)
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Load data data("data_stock_returns") # Compute topological risk measures from correlation-based financial networks l_result <- f_correlation_network_measures(data_stock_returns) # Plot SR_t f_plot(l_result$SR) # }
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Load data data("data_stock_returns") # Compute topological risk measures from correlation-based financial networks l_result <- f_correlation_network_measures(data_stock_returns) # Plot SR_t f_plot(l_result$SR) # }
This function computes the CoVaR and the Delta CoVaR of a given financial institution i for a given quantile q.
f_CoVaR_Delta_CoVaR_i_q(df_data_returns)
f_CoVaR_Delta_CoVaR_i_q(df_data_returns)
df_data_returns |
A dataframe including data: dates and stock returns |
CoVaR_i_q |
A numeric matrix |
Delta_CoVaR_i_q |
A numeric vector |
Jean-Baptiste Hasse
Adrian, Tobias, and Markus K. Brunnermeier. "CoVaR". American Economic Review 106.7 (2016): , 106, 7, 1705-1741.
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Load data data("data_stock_returns") # Compute CoVaR_i_q and Delta_CoVaR_i_q f_CoVaR_Delta_CoVaR_i_q(data_stock_returns) # }
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Load data data("data_stock_returns") # Compute CoVaR_i_q and Delta_CoVaR_i_q f_CoVaR_Delta_CoVaR_i_q(data_stock_returns) # }
This function computes the dynamic CoVaR and the Delta CoVaR of a given financial institution i for a given quantile q at time t. The dynamic and aggregate Delta CoVaR is also computed.
f_CoVaR_Delta_CoVaR_i_q_t(df_data_returns, df_data_state_variables)
f_CoVaR_Delta_CoVaR_i_q_t(df_data_returns, df_data_state_variables)
df_data_returns |
A dataframe including data: dates and stock returns |
df_data_state_variables |
A dataframe including data: dates and macroeconomic variables |
CoVaR_i_q_t |
A xts matrix |
Delta_CoVaR_i_q_t |
A xts matrix |
Delta_CoVaR_t |
A xts vector |
Jean-Baptiste Hasse
Adrian, Tobias, and Markus K. Brunnermeier. "CoVaR". American Economic Review 106.7 (2016): , 106, 7, 1705-1741.
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Load data data("data_stock_returns") data("data_state_variables") # Compute CoVaR_i_q_t , Delta_CoVaR_i_q_t and Delta_CoVaR_t l_result <- f_CoVaR_Delta_CoVaR_i_q_t(data_stock_returns, data_state_variables) # Plot Delta_CoVaR_t f_plot(l_result$Delta_CoVaR_t) # }
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Load data data("data_stock_returns") data("data_state_variables") # Compute CoVaR_i_q_t , Delta_CoVaR_i_q_t and Delta_CoVaR_t l_result <- f_CoVaR_Delta_CoVaR_i_q_t(data_stock_returns, data_state_variables) # Plot Delta_CoVaR_t f_plot(l_result$Delta_CoVaR_t) # }
This function provides a framework to plot xts time series.
f_plot(xts_index_returns)
f_plot(xts_index_returns)
xts_index_returns |
A xts vector |
No return value, called for side effects
Jean-Baptiste Hasse
# Plot a xts vector # NOT RUN { # Generate data returns v_returns <- numeric(10) v_returns <- rnorm(10, 0, 0.01) v_date <- seq(from = as.Date("2019-01-01"), to = as.Date("2019-10-01"), by = "month") xts_returns <- xts(v_returns, order.by = v_date) # Plot the xts vector of simulated returns f_plot(xts_returns) # }
# Plot a xts vector # NOT RUN { # Generate data returns v_returns <- numeric(10) v_returns <- rnorm(10, 0, 0.01) v_date <- seq(from = as.Date("2019-01-01"), to = as.Date("2019-10-01"), by = "month") xts_returns <- xts(v_returns, order.by = v_date) # Plot the xts vector of simulated returns f_plot(xts_returns) # }
This function normalizes data to 0-1 range. Specifically, this function computes linearly rescaled values from a vector of numeric values.
f_scale(v_time_series)
f_scale(v_time_series)
v_time_series |
Vector of numeric values |
A vector of numeric normalized values
Jean-Baptiste Hasse
Hasse, Jean-Baptiste. "Systemic Risk: a Network Approach". AMSE Working Paper (2020)
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Generate data v_data <- numeric(10) v_data <- c(1, 5, 3, 2, 15, 12, 9, 11, 7, 13) # Rescale data v_rescaled_data <- numeric(10) v_rescaled_data <- f_scale(v_data) # print rescaled data print(v_rescaled_data) # }
# Scale the entries of a vector to the interval [0,1] # NOT RUN { # Generate data v_data <- numeric(10) v_data <- c(1, 5, 3, 2, 15, 12, 9, 11, 7, 13) # Rescale data v_rescaled_data <- numeric(10) v_rescaled_data <- f_scale(v_data) # print rescaled data print(v_rescaled_data) # }