Reference no: EM132245223
Project - TNX SPX Divergence
Project - Divergence between the 10-year Treasury Bond and the S&P 500
It is a truism in macro-finance that when there is a divergence between S&P 500 stock prices and the 10-year Treasury Bond yield, the bond market is always right. The presumption is that the stock market catches down (or up) to the bond market. That's the "always right" portion of the statement.
In this project you are to test this hypothesis. Calculate divergences between the two securities, then see how long these divergences take to close. You need to make assumptions about what constitutes divergence and re-convergence (i.e., closure).
Give a summary - or better, distribution - of these closure times. You may want to do this for different time periods, and different divergence thresholds.
Finally, assess whether it's bonds or stocks that are moving the most to converge each divergence.
In your write-up, before describing your methodology and results, please provide an explanation for why the hypothesized "bond market always right." You don't have to refer to any equity valuation theories, but you may.
What follows is some R code to do a decent chunk of the background work for you. It's decently written, but not totally awesome. I've left out a bunch of plot labels and titles. Use this code, or not, as you wish. I'm posting the knitted version of this as a PDF, plus also the code as a .RMD (R-markdown) file.
If you DON'T know R, I'd suggest partnering with one or more people who do. If you have a particular request for a plot, etc. let me know and I'll try to accommodate you. You can do a lot of this in Excel, actually, but then you'd be replicating work I've already done.
If you DO know R but need help with your code, let me know. Or ask Ken Z. or Cassie K. or Seth U. to help you - it'd be good for them.
Next Steps -
1. Figure out how to automatically identify divergences/closures. This isn't that hard.
2. Figure out how long each divergence/closure episode lasts. This also isn't hard, if you do the first part right.
3. Calculate the probability of divergences closing within various time frames. Hint: plot distribution of divergence closure times.
4. Change around the thresholds you're using, or the date ranges, or both.
5. (Part of the actual assignment, but a bit harder) Identify the manner in which divergences are closed - does SPY move to match back up with the ˆTNX cumulative return, or vice versa? It'd usually be a combination of both.
6. (Completely optional, but fun) Ignoring trading commissions and slippage, calculate your average annual return from putting on this divergence trade. At the start of the divergence go long ˆTNX (or short the corresponding T-bond ETF, or long the corresponding inverse T-bond ETF) and short the SPY. Or do the reverse if it's the bond cumulative return that's below the SPY cumulative return.
Be clear about whether you are reinvesting your proceeds or not. Note: this is a little bit of a trick question. Think about it before you do any fancy calculations.
Attachment:- Assignment Files.rar