You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have CSV files of orderbook snapshots (each line in the CSV has bid_price, ask_price, bid_amount, ask_amount for 10 levels, along with a timestamp). How can I backtest on these orderbook snapshots?
I tried to adapt the Backtest example in the docs (https://docs.nautilustrader.io/guides/backtest_example.html)
by making it so the parser() method yields a OrderBookSnapshot instead of a QuoteTick. Unfortunately running the engine produces the following error:
nautilus_trader/config/backtest.py", line 277, in json_encoder
raise TypeError(f"Objects of type {type(x)} are not supported")
TypeError: Objects of type <class 'type'> are not supported
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have CSV files of orderbook snapshots (each line in the CSV has bid_price, ask_price, bid_amount, ask_amount for 10 levels, along with a timestamp). How can I backtest on these orderbook snapshots?
I tried to adapt the Backtest example in the docs (https://docs.nautilustrader.io/guides/backtest_example.html)
by making it so the parser() method yields a OrderBookSnapshot instead of a QuoteTick. Unfortunately running the engine produces the following error:
nautilus_trader/config/backtest.py", line 277, in json_encoder
raise TypeError(f"Objects of type {type(x)} are not supported")
TypeError: Objects of type <class 'type'> are not supported
Thank you
Beta Was this translation helpful? Give feedback.
All reactions