Hello James,
I am confused by this error, too. My understanding is that pipeline should provide a daily point-in-time global universe of equities, to which screens could be applied. Presumably, this means that any equity with an
end_date equal to the current trading day would be accepted into the global universe (if a given security had just been de-listed, its end_date would be equal to the prior trading day). And any equity with a start_date equal to the current trading day would be accepted into the global universe, too.
Is it correct that for both backtesting and live trading that when an algorithm is started, an initial trade on the market is required before a Quantopian-originated trade could be made? Or does this problem only occur for equities with a start_date equal to the current trading day?
I'm also confused by your work-around. I thought the recommended approach is described on the help page:
To check if trade data exists for a security during a given trading period, just check if it exists in the data structure that is passed to handle_data. For example, if sid in data: ... Your algorithm will check to see if the security has data in the bar. Otherwise, it will skip the security and continue with your algorithm calculations without receiving an error.
Is it correct that update_universe wipes out the prior universe, creating a new one every day (except that certain equities are retained, e.g. ones with positions or with open orders)? This would say that forward-filling, as described on https://www.quantopian.com/posts/thinly-traded-stocks-why-no-gaps would not carry over from day to day, which would exacerbate the problem of key errors?
By the way, this would appear to be a kind of flaw/shortcoming in the Quantopian platform, since if an equity is open for trading on a market, one should be able to buy/sell it using Quantopian. My sense is that this is a limitation of the platform, but perhaps I'm misinterpreting.
Grant