Since the new Pipeline masking feature came out it has been possible to do some more complicated computations, including linear regression. This is a quick and dirty algorithm where I long stocks that have a low magnitude beta to gold prices, and short stocks that have a high magnitude beta to gold.
Enjoy!