Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Quick question re QTradableStocksUS universe in backtest

Hi Everyone
Does anyone know if the call to get the universe in QTradableStocksUS returns the universe as of that day for each day included in the backtest?
For instance if the date for the test is 1/1/2002 is the universe what it would have been on that date or is the universe as of the day the test is being run (today)?
Much appreciate
Savio

4 responses

Everything in the IDE is point-in-time. Otherwise you’d have both survivorship and look-ahead bias.

Thank you Joakim that is very helpful. Just one clarification - if I am testing for Jan 1, 2002 and I imported the QtradeableStocksUS dataset would I get the dataset as it would have been on Jan 1, 2002? In other words is history maintained for each day of the dataset or is it overwritten and it is just the most recent instance? I have assumed that it is only point in time as you indicate. Thank you again for taking the time to respond.

Yes, all data will be as of each day that you’re testing. So when you’re testing on data on Jan 1, 2002, the QTU components will be what they were on that date, not what they are today.

Thank you Joakim that is very helpful - I will tweak accordingly. And thank you for taking the time to respond. Merci.