Thanks, Brian. I wasn't passing the Asset object properly.
My next issue is I'm getting an error that references minute bars, but the strategy is based on daily history data. Do I need a realtime tick database for a daily strategy?
Here's the error message:
quantrocket_zipline_1|feeding 2020-08-20 10:27:00-04:00 BAR event to sp500_momentum_model_pos_reb strategy
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: WARNING [sp500_momentum_model_pos_reb] No real-time database is set, current day data will be unavailable to strategy
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR Traceback (most recent call last):
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/resample.py", line 418, in closes
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR last_visited_dt, last_close = entries[asset]
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR KeyError: Equity(FIBBG000C2V3D6 [A])
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR During handling of the above exception, another exception occurred:
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR Traceback (most recent call last):
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/minute_bars.py", line 1073, in _open_minute_file
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR carray = self._carrays[field][sid]
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR KeyError: 1
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:00 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR During handling of the above exception, another exception occurred:
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR Traceback (most recent call last):
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/minute_bars.py", line 1078, in _open_minute_file
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR mode='r',
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "bcolz/carray_ext.pyx", line 1026, in bcolz.carray_ext.carray.__cinit__ (bcolz/carray_ext.c:13751)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "bcolz/carray_ext.pyx", line 1326, in bcolz.carray_ext.carray._read_meta (bcolz/carray_ext.c:18289)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/quantrocket/zipline/data/sp500current-1d-bundle/2020-01-01T00;00;00/minute_equities.bcolz/00/00/000001.bcolz/close/meta/sizes'
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR During handling of the above exception, another exception occurred:
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR Traceback (most recent call last):
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "sym://qrocket_log_py", line 34, in wrapped
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "sym://qrocket_qrzipline_trade_trade_py", line 59, in mule_trade_algo
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "sym://qrocket_qrzipline_trade_trade_py", line 161, in trade_algo
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/algorithm.py", line 671, in run
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR for perf in self.get_generator():
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/gens/tradesimulation.py", line 205, in transform
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR for capital_change_packet in every_bar(dt):
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/gens/tradesimulation.py", line 133, in every_bar
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR handle_data(algo, current_data, dt_to_use)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/utils/events.py", line 218, in handle_data
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR dt,
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/utils/events.py", line 237, in handle_data
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR self.callback(context, data)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/codeload/zipline/sp500_momentum_model_pos_reb.py", line 184, in port_rebalance
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR hist = data.history(context.todays_universe, 'close', momentum_window, "1d")
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "zipline/_protocol.pyx", line 121, in zipline._protocol.check_parameters.__call__.assert_keywords_and_call (zipline/_protocol.c:3823)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "zipline/_protocol.pyx", line 696, in zipline._protocol.BarData.history (zipline/_protocol.c:9251)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "sym://qrocket_qrzipline_trade_data_portal_py", line 38, in get_history_window
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/data_portal.py", line 967, in get_history_window
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR field, data_frequency)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/data_portal.py", line 806, in _get_history_daily_window
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR assets, days_for_window, end_dt, field_to_use, data_frequency
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/data_portal.py", line 850, in _get_history_daily_window_data
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR assets, end_dt)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/resample.py", line 440, in closes
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR asset, dt, 'close')
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/dispatch_bar_reader.py", line 97, in get_value
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR return r.get_value(asset, dt, field)
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/minute_bars.py", line 1138, in get_value
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR value = self._open_minute_file(field, sid)[minute_pos]
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/data/minute_bars.py", line 1081, in _open_minute_file
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR raise NoDataForSid('No minute data for sid {}.'.format(sid))
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR zipline.data.bar_reader.NoDataForSid: No minute data for sid 1.
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
quantrocket_flightlog_1|2020-08-20 10:27:00 quantrocket.zipline: ERROR
quantrocket_houston_1|172.18.0.6 - - [20/Aug/2020:14:27:01 +0000] "POST /flightlog/handler HTTP/1.1" 200 5 "-" "-"
I confirmed the Sid is in the bundle and there is close data from the prior day.
David