Sunday, July 10, 2016

Some observations on the stock and bond market

In my professional life I do a lot of mathematical modeling of physical systems.  My background is in experimental physics, but after I finished my postdoctoral work, I switched to doing mostly computational work.  I am also an active trader in the financial markets making roughly 1000 trades per year.  Since I already have the computational tools at my disposal, I will occasionally sit down and crunch some trading-related numbers.  It's an engagement tool, mostly.  It is not as if there is a magic formula waiting to be discovered-- if such a thing existed, given the amount of money and resources chasing returns, it would have been found long ago.  But it keeps me thinking about things, keeps me sharp, and sometimes it is nice to look over some numbers to either confirm our disprove suspicions.


Anyone who follows the market likely know that stocks and bonds typically have an inverse relation-- if the stock market rallies, the bond market tends to sell off and vice versa.  This relationship isn't absolute, but it does tend to be true the bulk of the time.  So with the stock market within spitting distance of record highs, we’d expect the bonds to be trending lower.  But this isn't the case.  In fact, bonds are also at record highs.

I sat down this weekend to look at the recent correlations between bonds and the S&P 500 index to see what level they've been at in the last few years, and how much they've changed in recent weeks. What follows is more or less a quick "stream-of-consciousness" analysis I did. At the risk of belittling myself, it isn't the most insightful of things-- the market has been weird, we all know that-- but it was interesting enough I thought I'd write it up and post it.

For the sake of simplicity and ease of access to data, I used the ETFs SPY and TLT for the S&P 500 and the classic bond, respectively.  SPY tracks the S&P 500 and while TLT tracks the 20-year bond in is close enough to the classic bond.  They are close enough in maturity as to move tick for tick with each other.  I've plotted the last five years of price data for both ETFs below.

Prices of SPY (red) and TLT (blue) for the last five years.  Both are at or near record highs

Interesting.  Just looking at the raw price data, there seems to still be somewhat of a negative correlation, but it isn't easy to discern.  In any case, I look at correlation of returns, not raw prices.  I worked out the daily percent changes and calculated the correlations over the entire data set, the last calendar year, and the last 30 calendar days:

Entire data set: -0.54
Last calendar year: -0.51
Last Calendar month: -0.67

That surprised me.  I expected the correlation to become more positive over the last month as we've had a huge rally off the Brexit S&P low and a run up in bond prices.  This doesn't seem to be the case.  What seems to have happened is any selloff in the market in the last month is met with furious bond buying, and market rallies are met with tepid if any bond selling.  Add to that the occasional day where you have both the market and bonds up and here we are...

Next I was interested in how the correlation changed over time.  Was it relatively constant? Obviously, it varies, but to what extent?

Rolling correlation between TLT and SPY with a 20-trading day window
I calculated a rolling correlation on the data set using a 20-day window.  This is plotted above.  These are trading days, not calendar days as it was easier to calculate.  That time window works out to close to a calendar month.  Indeed, there have been times where the correlation changed drastically for brief periods of time, even becoming positive on a number of occasions.  These times of positive correlation didn't last long, however, and we are currently running about normal.  That wasn't what I was expecting.

I started plotting different date ranges and ended up plotting daily returns for both underlyings on the same plot.  Bonds are a debt instrument and are generally considered more placid than the stock market.  But looking at the returns from 20011 to present, the daily percent price fluctuations for SPY and TLT were a lot closer than I would  have thought.  Doing the same plot over the dates 2003 to 2008 (I wanted to visualize this without the craziness of the meltdown later in 2008) showed that, yes, indeed the realized volatility in the bonds was significantly less than in the S&Ps.  Instead of showing the plots which are a mess to look at, here is the standard deviation of returns for those two different time windows.

Standard deviation of returns from 07/08/2011 - 07/08/2016
SPY:  0.0099
TLT:  0.0095

Standard deviation of returns from 01/01/2003 - 01/01/2008
SPY:  0.0082
TLT:  0.0063

Interesting.  For all practical purposes, during the lat few years realized bond volatility has been the same as realized stock volatility.  We can visualize this by calculating a rolling standard deviation over thse data ranges and plotting the results.

Rolling standard deviation of daily returns for SPY and TLT using a 20-period window

Above is the this plot from 2001 to present.  There are periods where the bonds are comparatively sedate, but there are also times where they move as much as the general market.  Let's look at the same type of plot from 2003 to 2008.  Here we can see the data for the bonds is generally below that of the SPY, especially during times where SPY volatility spikes.

Rolling standard deviation of daily returns for SPY and TLT from 2003 to 2008 using a 20-period window
I don't have easy access to historical option information, but it would be interesting to compare TLT's implied volatility to that of the SPY over the same date ranges.  I have to imagine bond IV has increased, but I don't know this for a fact.

All of this is interesting and confirms what we traders already know, namely that the bond market has been acting strange in recent years, but it isn't tradable.  What can you do with this?  Damned if I know.  Personally, I'm short both bonds and stocks.  There is reasonable implied volatility in the bonds still so I'm selling puts against my shorts.

No comments:

Post a Comment