Maybe a y2k-ish bug that's only being seen in the IDE because today is January 1? That's perhaps overdramatizing but ...
See if different tomorrow.
I added this line:
for x in sec:
if not data.can_trade(x): print x
Looks like first trading day of each year but note the time
2007-01-02 03:31 PRINT Equity(24 [AAPL])
2007-01-02 03:31 PRINT Equity(16841 [AMZN])
2007-01-02 03:31 PRINT Equity(23112 [CVX])
2007-01-02 14:00 WARN Your order for 235 shares of AAPL failed to fill by the end of day and was canceled.
2007-01-02 14:00 WARN Your order for 760 shares of AMZN failed to fill by the end of day and was canceled.
2007-01-02 14:00 WARN Your order for 680 shares of CVX failed to fill by the end of day and was canceled.
2008-01-02 03:31 PRINT Equity(24 [AAPL])
2008-01-02 03:31 PRINT Equity(16841 [AMZN])
2008-01-02 03:31 PRINT Equity(23112 [CVX])
2009-01-02 03:31 PRINT Equity(24 [AAPL])
2009-01-02 03:31 PRINT Equity(16841 [AMZN])
2009-01-02 03:31 PRINT Equity(23112 [CVX])
2010-01-04 03:31 PRINT Equity(24 [AAPL])
2010-01-04 03:31 PRINT Equity(16841 [AMZN])
2010-01-04 03:31 PRINT Equity(23112 [CVX])
2011-01-03 03:31 PRINT Equity(24 [AAPL])
2011-01-03 03:31 PRINT Equity(16841 [AMZN])
2011-01-03 03:31 PRINT Equity(23112 [CVX])
2012-01-03 03:31 PRINT Equity(24 [AAPL])
2012-01-03 03:31 PRINT Equity(16841 [AMZN])
2012-01-03 03:31 PRINT Equity(23112 [CVX])
2013-01-02 03:31 PRINT Equity(24 [AAPL])
2013-01-02 03:31 PRINT Equity(16841 [AMZN])
2013-01-02 03:31 PRINT Equity(23112 [CVX])
2014-01-02 03:31 PRINT Equity(24 [AAPL])
2014-01-02 03:31 PRINT Equity(16841 [AMZN])
2014-01-02 03:31 PRINT Equity(23112 [CVX])
2015-01-02 03:31 PRINT Equity(24 [AAPL])
2015-01-02 03:31 PRINT Equity(16841 [AMZN])
2015-01-02 03:31 PRINT Equity(23112 [CVX])
2016-01-04 03:31 PRINT Equity(24 [AAPL])
2016-01-04 03:31 PRINT Equity(16841 [AMZN])
2016-01-04 03:31 PRINT Equity(23112 [CVX])
2017-01-03 03:31 PRINT Equity(24 [AAPL])
2017-01-03 03:31 PRINT Equity(16841 [AMZN])
2017-01-03 03:31 PRINT Equity(23112 [CVX])
End of logs.
.
For me in the Pacific time zone that would normally be a time of 06:31 for market open, not 03:31.
If there's anything to my theory we could give it a catchy name: The New Year's Day Time Bug
Happy New Year everybody.