I would like to generalize Paul Teetor's A Better Hedge Ratio, which uses prcomp() to determine a ratio between two legs. I am hoping to extend this to multiple legs, but am having trouble finding accurate results. Any suggestions?
In the case of N components:
- compute the NxN covariance matrix
- compute the N eiggenvectors and take the one that has the signs that you want
- the weights of this eiggen vector corresponds to the basket of N components that you wish to create