I've attached my notebook which is adapted from T. Wiecki's algo (here). In my case, I've turned the algo into a regression problem that forecasts 5-day ahead rank returns using technicals (for the time being). The algo work's fine, it's just that the output that I was expecting from alphalens does not correspond to my algo. As a test, I perform a perfect prediction on the training set (the test set does badly as expected). I then use alphalens on the 4,5,6 and 10 day ahead periods. I was expecting the 5-day period to perform well since that is what I'm predicting, yet the 10-day does well instead (in the training window). Anyone have any ideas as to why this may be?