Using R to Chart Shadow Banking Components

Previously I wrote a primer on the shadow banking markets. In this post I follow up by attempting to chart and analyze the components. Surprisingly (or not) it proved more difficult than I anticipated to construct the components charts. First finding good data series that could serve as a proxy was time consuming. Additionally some of the data series that helped in deconstructing the market in the past were discontinued. I also had to merge data from several sources. Keep in mind this is definitely far from exact but does provide a good guideline. Without further ado here are the charts generated using Rstudio and ggplot2 packages. SBC stacked bar

 

This is the components chart constructed using quarterly data. As you can see the chart is uneven for the most recent data as some of the time series have not been updated as quickly as others. The first aspect to note is the multi trillion dollar drop off beginning in early 2010 comprised almost entirely of Agency and GSE mortgage pools disappearing from the market. No wonder the Federal Reserve had to step in and purchase these assets to clear the Bank's and Non-Bank's books. That much asset liquidation would have bankrupted a lot of global financial entities. 

 **I was unable to reconcile my aggregated components data with the Financial Stability Boards' $24 trillion dollar market size estimate. If anyone has any ideas to contribute for increasing the accuracy of this chart, or data series they feel should be included let me know.**

 

SBC Grid Plot

 

Here is the previous chart deconstructed to illustrate the size of the shdadow banking compenents individually. This further showcases the total collapse in the Agency/GSE mortgage pool arena. Again it would appear the primary dealers are the largest and most consistent players in this marketfollowed by Money Market Funds and ABS Issuers. 

 

gcf repo rates

 

Just for fun I have included the DTCC's GCF Repo Index Rates. You can see the steady climb from 2005 to 2007 and then the drop off beginning in late '07. I haven't done enough research to explain the dramatic collapse in rates definitively. However, my guess is that the implicit (explicit) guarantee of the underlying collateral by the Federal Reserve, via a myriad of alphabet credit facilities it extended to global financial instituations during that time period, led to the stabilization of repo rates.

 

Some Notes:

To construct the component charts I queried the open source Quandl database which contained data from the FRED database. Here are the R queries:

mf = Quandl('FRED/MMMFTCMAHDFS', collapse='quarterly', start_date='2002-01-01') repo = Quandl('FRED/OLRACBM027NBOG', collapse='quarterly', start_date='2002-01-01') abs = Quandl('FRED/ABSITCMDODFS', collapse='quarterly', start_date='2002-01-01') agse = Quandl('FRED/AGSEMPTCMDODFS', collapse='quarterly', start_date='2002-01-01') fc = Quandl('FRED/FUCTCMDODFS',collapse='quarterly', start_date='2002-01-01') cp = Quandl('FRED/COMPUTN',collapse='quarterly', start_date='2002-01-01')

To gather the Primary Dealer data I used the Federal Reserve of New York's website; which I then had to manipulate to match the datapoints of the closest available date to the FRED data.

The packages I used to construct the charts in Rstudio are the following:

library(ggplot2) library(reshape2) library(Quandl) library(scales) library(reshape)

If anyone is interested in the code let me know and I'll paste it to this post.