I read Ernest Chan's "Machine Trading", and in his chapter on Factor Analysis, he introduced the idea of using Principal Component Analysis (PCA) to get the statistical factors and then regressing them against next day's returns to get buy/sell signals.
I translated his MatLab code into Python as best as I could, but the backtesting results so far have been dismal, compared to the results in his book.
Was wondering if anyone has tried something similar? Or is there something clearly wrong with my code?
Appreciate any comments or help from you guys.
Thanks!
Yi Peng