Hi, I'm a newbie and as a practice exercise I'm trying to build a simple momentum strategy. Specifically I'm trying to rank stocks according to the returns they had from the previous 25 days . However I noticed that Returns() doesn't seem to be doing what I expected it to do. Regardless of whether I calculate returns manually with pandas using natural days or business days I'm getting different results.
There's a short notebook attached with what I did to show you histograms of discrepancies.
Any ideas on why I'm getting different results with pandas?