Ernie Chan's 黄金 vs. 黄金矿工 ================================= 本例基于: * http://epchan.blogspot.com.ar/2006/11/gold-vs-gold-miners-another-arbitrage.html * https://www.quantopian.com/posts/ernie-chans-gold-vs-gold-miners-stat-arb .. literalinclude:: ../samples/statarb_erniechan.py 本例输出结果如下: .. literalinclude:: ../samples/statarb_erniechan.output 最终结果绘制如下图所示: .. image:: ../samples/statarb_erniechan.png You can get better returns by tunning the window size as well as the entry and exit values for the z-score.