nkaz001 / hftbacktest

A high-frequency trading and market-making backtesting and trading bot 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
2.02k stars 397 forks source link

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

Closed isslerman closed 2 months ago

isslerman commented 3 months 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 3 months 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 3 months ago

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

isslerman commented 3 months ago

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

isslerman commented 2 months ago

Works fine with > 2.0.0rc0