nkaz001 / hftbacktest

A high-frequency trading and market-making backtesting tool in Python and Rust, which accounts for limit orders, queue positions, and latencies, utilizing full tick data for trades and order books, with real-world crypto market-making examples for Binance Futures
MIT License
1.78k stars 357 forks source link

cannot import name 'BacktestAsset' from 'hftbacktest' #111

Closed isslerman closed 4 days ago

isslerman commented 1 month ago

I am trying to do some examples from the documentation, but not sure if this still work.

From the Getting Started page: https://hftbacktest.readthedocs.io/en/latest/tutorials/Getting%20Started.html

from hftbacktest import BacktestAsset, HashMapMarketDepthBacktest

generates an error:

ImportError: cannot import name 'BacktestAsset' from 'hftbacktest' (/opt/anaconda3/envs/hft/lib/python3.12/site-packages/hftbacktest/init.py)

Tks Marcos Issler

ian-wazowski commented 1 month ago

Major code refactoring is currently underway. Since the examples/ code is still undergoing numerous changes, please directly verify the function signatures yourself.

nkaz001 commented 1 month ago

Which version are you using? Does it happen in 2.0.0rc0?

isslerman commented 1 month ago

Using 1.8.4 with conda. I will check the 2.0.0rc0.

isslerman commented 4 days ago

Works fine with > 2.0.0rc0