Skip to content
Prev 9030 / 15274 Next

Better Hedge Ratios for Spread Trading

Paul,

Thank you very much for sending this; I've seen the lightning talk slides,
and spent some time playing with it.  I do have a couple observations.

First, often it seems like if I use the inverse of your code I get better
results.

i.e. I find that r$loadings[1,1] / r$loadings[2,1] is closer to what I get
using other hedge ratio calculation methods.

I attached a hedge ratio calculating function called "btcdHedge" to use as
a comparison.  I took the code for this function from
http://quantivity.wordpress.com/2011/10/02/proxy-cross-hedging/

If I use btcdHedge to calculate the ratio between SPY and DIA since
2011-01-01, it tells me to sell 1.070554 DIA for each share of SPY that I
am long.

That is very close to the 1.070894 I would get if I used  OLS with a zero
intercept

If I use OLS with a floating intercept, I get 1.206745.

If I use your TLS code, I get 0.777546

So, your TLS code is the only one that gives a ratio of less than 1.

However, if I use the inverse of your code I get something close to OLS
with floating intercept
r$loadings[1,1] / r$loadings[2,1]
[1] 1.286098


Second,
You say
"Forcing a zero intercept requires an additional step: recentering the data
around
their means prior to the PCA."

However, I get the same values regardless of whether I center around the
means.

Thanks,
Garrett
On Tue, Nov 29, 2011 at 12:08 PM, Paul Teetor <paulteetor at yahoo.com> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20111129/ed489ab4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BTCDhedge.R
Type: text/x-r-source
Size: 2860 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20111129/ed489ab4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BetterHedgeScratchwork.R
Type: text/x-r-source
Size: 540 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20111129/ed489ab4/attachment-0001.bin>