Sorry to bump such an old thread but I am curious about the thinking here.
First off: my understanding (on a high level, please let me know if I misunderstood) is that you are trying to say that within an industry has some kind of driver (in this case the first principal component), and all companies here should be reverting to a value predicted by this component.
So what you want to do here is to size your bets according to their deviation from the value predicted by the component.
That being understood I still cannot understand this line:
R = sp.stats.zscore(model.resid[-2:, :].sum(axis=0)) - sp.stats.zscore(model.resid[-20:, :].sum(axis=0))
I cannot really understand why the signal is the difference between two zscores 19 days apart, or am i missing something here?