Here's a notebook I whipped up to practice getting accustomed to the system. The goal was to get the PEG ratio of the SP500 stocks, then rank them within each sector, normalized so the top rankings in each sector were roughly equally desirable. The final results is that the best ranked stocks have the lowest PEG ratio among their sector.
I'm running into some issues in understanding the alphalens results (the last cell). I watched this video (https://www.youtube.com/watch?v=v5IYcBxMDYE) to help me understand as much as I could, but some of the things I still have questions on are below.
- Where it says "mean period wise return" in the "returns analysis" section, does that indicate that if I held the top quantile of stocks for the given number of days, I would get that level of returns (in basis points)? Eg I would average -1.618 basis points per 10 days for the top quantile?
- Do the lines on the violin plots indicate the 25th, 50th, and 75th percentile of the spreads of returns?
- In the "Top Minus Bottom Quantile Mean Returns" graphs, what is the shaded blue area in which the lines lie in?
- I'm overall really lost about the Q-Q graphs lol. How do I read these?
And lastly, nothing to do with alphalens; can anyone give an economic reason for why my returns seem better for middle ranked stocks, and then drop off on either side? I wouldn't have thought stocks ranked by PEG ratio would behave in this manner, and I've double checked my rankings to make sure they worked as intended.