Skip to main content

Time Series Example

Created on December 17|Last edited on December 17

Executive Summary

CCAR (Comprehensive Capital Analysis and Review) is a regulatory framework governed by the Federal Reserve to assess, regulate, and supervise large US banks that are too big to fail.
The three main principles for CCAR, born out of the 2008 global financial crisis, are:
  • To assess whether banks possess adequate capital for their needs, both now and in the future
  • To review the capital structure & stability to various stress-test scenarios.
  • To assess planned capital distribution, including shares or dividends, for viability with minimum capital requirements.
The global economic crisis/subprime crisis/recession of 2008 resulted in the economic collapse of some of the largest banks in the US. CCAR is a kind of stress testing steered by the Federal Reserve board. Supervisory stress tests are an integral part of prudential regulations across the number of banks’ jurisdiction. The CCAR report provides a view on the industry facing economic risks, cyber risk, and emerging risks from financial technology companies as a whole and shows a comparison among different institutions.
The focus of this report is tracking of modeling exercises associated with bullet point 2 above: To review the capital structure & stability to various stress-test scenarios. We may consider developing models that link economic indicators to the balance sheet to stress capital ratios in a an effort to understand the banks stability.
The stress scenarios we consider are provided by the fed and will be used to understand how captial ratios hold up.
  • Concensus forecast - business as usual forecast of the regressor.
  • Severe forecast - this is worse case scenario kind of forecast of the regressor
Our goal is to understand what happens to our variable y under these different scenarios.

Data

For this exercise, two Macroeconomic indictors, Real GDP Growth and Market Volatility Index, were used to generate a fake dataset of loan balance by year to demonstrate how W&B can be used for Regulatory exercises like CCAR and CECL.
is to model loan to loss which is then used to stress the balance sheet in order to understand how an FI's capital ratios make react to shocks in the economy. These shocks, or scenarios, are provided by the OCC on a yearly basis and banks are meant to forecast their balance sheets off of these ratios in an effort to understand any risk to the bank.
We'll pursue stress testing here via a loan to loss model, which would then be used to stress the balance see in order to understand how an FI's captial ratios may react to economic shocks. The model highlighted in this report would correspond to forecasting balance of performaning loans for a particular line of business -> this would balance would be composed of balance for new and existing loans. Later, it may flow through a default model, then a loss given default model. This way scenarios can impact each of the three components which generally impact the bank's balance sheet.

Model Methodolgy

As mentioned, we are assuming that our target variable is a function of VIX and Real GDP Growth, plus some Autoregressive error structure, or more explicitly
yt=Xtβ+ϵty_t = X_t \beta + \epsilon_t \\

with
ϵt=ρϵt1+ηt\epsilon_t = \rho \cdot \epsilon_{t-1} + \eta_t

with ρ<1|\rho| < 1. In order to estimate this model, we will pursue a Generalized Least Squares setup with an AR(1) error Structure. In order to estimate the AR structure, we'll use Yule Walker Method.
Below is the output from the model which was creating in python as well as some plots detailing the path of the structural mean of the target over time under all of the provided CCAR scenarios.


The model artifact lineage is shown below -> click the Complete style for more insight

gls-model
Direct lineage view
Some nodes are concealed in this view - Break out items to reveal more.
Artifact - data
training-data:v1
Artifact - model
gls-model:v0
Run - training
hopeful-gorge-32
Run - training
clean-lake-41
Runs
5
curious-cosmos-31
dgp
woven-snowball-39
dgp
pious-dust-49
dgp
misunderstood-flower-58
dgp
cerulean-bush-64
dgp
Runs
7
light-cherry-54
severe-sensitivity-test
severe-forecast
forecast
concensus-forecast
forecast
insample-fit
forecast
severe-forecast
forecast
concensus-forecast
forecast
insample-fit
forecast

Plotting multiple series across several experiments

This works as expected. A different experiment was used for each scenario (logging the scenario data as table, as well as using said data to forecast y).



Plotting multiple series from a single experiment

Use Case: create a table of series and complete plotting in APP.
Requirements: several y dimensions, since x dimension (date time).
Details
In the plots that follow, we will plot out
  • a series of historical values, call it y
  • a series of forecasted values, call it yhat
  • and a few other series all based on a simulation exercises involving the model and the exogenous regressor forecast scenarios.
All of the series would be logged in a table in a single experiment, and the plots presented in this section reside within a single run.
Desired Outcome: Plot 6 different series on the same y axis and have it look something like the following plot generated via plotly. I understand the fill in / diff / shading is not currently possible.


Plotting a dataframe

I have 6 columns to plot +1 STD, +2 STD, -1 STD, -2 STD as well as y and yhat. The panels grid below shows the plot and the corresponding table.




Plotting a "melted" dataframe

This plot works a bit better, but i had to use the melt method before creating the wandb.Table . The melted dataframe has three columns: date, variable, and value. This gave me what I was looking for with the exception of color of the lines.



artifact