Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How to generate matrix of returns from Q500US

I've been wracking my brain on how to do this for a bit now, and have gone over the Pipeline API documentation several times but am at a loss. I'm trying to get a DataFrame of daily closing prices for assets in the Q500US with a lookback window of 60 days, and then use that matrix to calculate things like expected return, Sharpe ratios, etc. I messed around with the Returns factor but I keep getting back single columns of closing prices, rather than generating a date by closing price dataframe. Any tips on how to accomplish this would be highly appreciated.