Credit Crunch

What causes a crisis in credit?  Here we explore some ideas and relate the problem to volatility in credit markets.  Generally when we think of availability of credit, we think in terms of liquidity.  But what exactly is liquidity, and how can it be measured?  A suitable economic definition of liquidity is the ease with which an asset can be converted to cash without loss of value.  Unfortunately this assumes that the value of an asset is actually known.  So we prefer to study price changes in markets and use these as an inverse measure of liquidity.  Most economists will use the differences in the logarithm of price, to describe a price change as this difference maintains a proportionality as the magnitude of price changes.  We refer to sequential change in the logarithm of price as log returns.  In credit markets, an interest rate which will be paid on a loan or a bond, a series of cash flows over time provides a way to compare cash flows with different durations and structure of payments.  Since the remaining duration of a bond is constantly changing, it is difficult to use a specific bond instrument for prices.  Instead for this discussion we will use the, DGS10, 10-Year Treasury Constant Maturity Rate, published by the Federal Reserve Board, available on the FRED database.  (Mathematica users who use this notebook will need to download the data first.)

(*Set file path to your own computer system*)
trnt0=Drop[Import["C:\\Mathematica 8\\Portfolio\\DGS10.xls"][[1]],15];
(*The data is cleaned to remove zero rates and days where there is no change in rate*)
tnrt1=Select[trnt0,#[[2]]>0&];
tnrt=Last/@Split[tnrt1,#1[[2]]==#2[[2]]&];
DateListPlot[tnrt,Joined-> True,PlotLabel-> "Ten Year Constant Maturity Treasury Rate"]
CellPrint[TextCell["Data from "<>DateString[First[tnrt][[1]],"DateShort"]<>" through "<>DateString[Last[tnrt][[1]],"DateShort"]<>".","Text"]];

Data from Mon 1 Jan 1962 through Tue 19 Apr 2011.

Rates are determined from bond prices, the above rates as annual percentages are obtained by interpolation of the Treasury Bond yield curve.  But we need prices to calculate volatility.  So we convert the above yields to an approximate zero coupon bond price by the formula below.  We realize that actual zero coupon bonds trade with slightly higher rates and lower prices, but we guess that the log returns from a zero coupon price series would be proportional if such a series were available.

TenYearZeroCouponPrice=(1/((((rate/100)+1))^10))

zpr= (1/(((1+((tnrt[[All,2]])/100)))^10));
DateListPlot[Transpose[{tnrt[[All,1]],zpr}],Joined->True,PlotLabel-> "Ten Year Treasury Constant Maturity Zero Coupon Price"]

Clearly we are living in remarkable times.  We can now construct a time series of log returns.  Below is a histogram of the log returns along with the stable fit.  As is typical of stock market data there is too much mass in the middle.

LogReturn[data_]:=Differences[Log[N[data]]];
(*Needs["StableM7`"];*)
lr=LogReturn[zpr];
h1=Histogram[lr,Automatic,"PDF",PlotRange->All];
p1=EstimatedDistribution[lr,StableDistribution[a,b,c,d]];
g1=Plot[PDF[p1,x],{x,Min[lr],Max[lr]},PerformanceGoal->"Speed",PlotStyle->{Darker[Red],Thickness[0.008]},PlotRange->All];
Show[h1,g1]

The stable parameters below and the log-log fit are typical of other financial price data determined in a market.  The tails of actual prices are lighter than the tails of a stable distribution fit.  We believe that bond prices are no different from equity prices and are best described by a stable mixture where the scale factor, γ, is constantly varying.

TableForm[{p1[[#]]&/@{2,3,5,4}},TableHeadings-> {None,{"α","β","γ","δ"}},TableSpacing-> {1,5}]
edlr=EmpiricalDistribution[lr];
mx=Max[Abs[lr]];
mu=Mean[lr];
sig=StandardDeviation[lr];
LogLogPlot[{CDF[p1,-x],CDF[edlr,-x],1-CDF[p1,x],1-CDF[edlr,x],1-CDF[NormalDistribution[mu,sig],x]},{x,0.0001,mx},PlotRange->All,PerformanceGoal->"Speed",PlotStyle->{Darker[Blue],Blue,Darker[Red],Red,Green},PlotLabel->"Log Log Stable Distribution\nLeft Tail Blue, Right Red, (Normal Green)"]

When we try to rescale the data by estimating a 30 trading day moving average of the scale factor and adjusting the returns, we find similarly to stock market data, that we get a fit with a higher α, and the tail fit is a little better.  The scaled α is similar to that found in equity markets.

absecf0=Compile[{t,{s,_Real,1}},Abs[Mean[Exp[I t s]]]-1/E];
ABSECF0[t_?NumericQ,s_]:=absecf0[t,s];
SScale[s_]:=Module[{cc,c0,c1},
c1=MeanDeviation[s];
(*generally this loop should not be entered*)
While[absecf0[1/c1,s]<0,c1=2c1;Print["Upper Bound Loop"]];
c0=c1;
While[absecf0[1/c0,s]>0,c1=c0;c0=0.8 c0];(*bracket solution from above*)
cc/.FindRoot[ABSECF0[1/cc,s],{cc,  c0,c1},Method->"Brent"]
];
m30=Mod[Length[lr],30];
lrp=Partition[Drop[lr,m30],30];
dt=Rest[tnrt[[All,1]]];
dtm=Median/@Partition[AbsoluteTime/@Drop[dt,m30],30];
scl=SScale/@lrp;
lr1=Flatten[lrp/scl];

p2=EstimatedDistribution[lr1,StableDistribution[a,b,c,d]];
TableForm[{p2[[#]]&/@{2,3,5,4}},TableHeadings-> {None,{"α","β","γ","δ"}},TableSpacing-> {1,5}]
edlr1=EmpiricalDistribution[lr1];
mx=Max[Abs[lr1]];
mu=Mean[lr1];
sig=StandardDeviation[lr1];
LogLogPlot[{CDF[p2,-x],CDF[edlr1,-x],1-CDF[p2,x],1-CDF[edlr1,x],1-CDF[NormalDistribution[mu,sig],x]},{x,0.0001,mx},PlotRange->All,PerformanceGoal->"Speed",PlotStyle->{Darker[Blue],Blue,Darker[Red],Red,Green},PlotLabel->"Log Log Stable Distribution\nLeft Tail Blue, Right Red, (Normal Green)"]

Now we look at the picture of the moving average of the stable scale factor, we can now easily relate the current credit problem to volatility, and can guess where it might go if it is not handled properly.

DateListPlot[Transpose[{dtm,scl}],PlotLabel-> "Ten Year Treasury Daily Zero Coupon\nStable Gamma",PlotStyle->{ Darker[Red],PointSize[0]},Filling->0,FillingStyle->Darker[Red],PlotRange->All]
(*DateListPlot[Take[Transpose[{dt,Flatten[lrp]}],-250],PlotLabel-> "Ten Year Treasury Daily Zero Coupon\nStable Gamma\nRecent",PlotStyle->{ Darker[Red],PointSize[0]},Filling->0,PlotRange->All]*)

Liquidity in credit markets is inversely related to volatility of bond prices.  It has little to do with absolute levels of interest rates, but rather it is related to the lender's ability to predict future rates.  When bond markets become volatile, rates are unpredictable and credit dries up.  It is difficult to see how a "stimulus package" of unrestrained government spending will reduce volatility in bond markets.  Recent government interventions and rhetoric, do not seem to be having much effect.  Bond markets are more likely to respond to some measure of restraint in government spending.

txcolor=RGBColor[181/255,18/255,27/255];
t1 = Graphics[Text[Hyperlink[Framed[Style["Financial Home", {txcolor, Bold, Larger}]], "../map/Overview.html"], {-5, 0}]];
t2 = Graphics[Text[Hyperlink[Framed[Style["Next", {txcolor, Bold, Larger}]],  "../r07c/VolatilityModel.html"], {0, -0.5}]];
t3 = Graphics[Text[Hyperlink[Framed[Style["Download Notebook", {txcolor, Bold, Larger}]], "../r07d/CreditCrunch.nb"], {5, 0}]];
t4 = Graphics[Text[Hyperlink[Framed[Style["Previous", {txcolor, Bold, Larger}]],  "../r07/Volatility.html"], {0, 0.5}]];

Show[ t1, t2, t3,t4, ImageSize -> 500]
CellPrint[TextCell["\n\n© Copyright " <>ToString[DateList[][[1]]]<>" mathestate    "<>DateString[DateList[],"DateShort"], "Text"]]

© Copyright 2011 mathestate    Sat 23 Apr 2011