I'm running into this persistent error every time I try to make trades. I had already made a week of trades successfully before this started popping up. I'm curious if anyone here has seen something similar and resolved it?
quantrocket zipline trade 'uptrend_ibkr' --bundle usstock-1d --data-frequency daily XXXXXX
2021-05-05 16:46:25 quantrocket.zipline: ERROR Traceback (most recent call last):
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "sym://qrocket_log_py", line 34, in wrapped
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "sym://qrocket_qrzipline_trade_trade_py", line 63, in mule_trade_algo
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "sym://qrocket_qrzipline_trade_trade_py", line 187, in trade_algo
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/algorithm.py", line 675, in run
2021-05-05 16:46:25 quantrocket.zipline: ERROR for perf in self.get_generator():
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/gens/tradesimulation.py", line 214, in transform
2021-05-05 16:46:25 quantrocket.zipline: ERROR self._cleanup_expired_assets(dt, position_assets)
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/gens/tradesimulation.py", line 263, in _cleanup_expired_assets
2021-05-05 16:46:25 quantrocket.zipline: ERROR metrics_tracker.process_close_position(asset, dt, data_portal)
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/finance/metrics/tracker.py", line 189, in process_close_position
2021-05-05 16:46:25 quantrocket.zipline: ERROR self._ledger.close_position(asset, dt, data_portal)
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "/opt/conda/lib/python3.6/site-packages/zipline/finance/ledger.py", line 577, in close_position
2021-05-05 16:46:25 quantrocket.zipline: ERROR data_portal,
2021-05-05 16:46:25 quantrocket.zipline: ERROR File "sym://qrocket_qrzipline_patch_py", line 22, in disable_if_live_trading
2021-05-05 16:46:25 quantrocket.zipline: ERROR NotImplementedError: PositionTracker.maybe_create_close_position_transaction() was called in live trading. This method simulates a transaction to auto-close a position (such as an expired futures contract), but in live trading a simulated transaction is problematic. Please close the position on your own with a real transaction.
2021-05-05 16:46:25 quantrocket.zipline: ERROR
I haven't changed any code in my strategy. There seems to be some other underlying reason for it.