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
1.96k stars 383 forks source link

Convert External Dataset to HftBacktest Format #153

Open KevinKU22 opened 1 week ago

KevinKU22 commented 1 week ago

Hi @nkaz001 ,

First thank you for creating this insightful repository. I greatly appreciate your work.

I’m currently trying to use my local exchange tick data to backtest the market-making strategy . Could you pls inform me on the on the feasibility of converting using my dataset, and perhaps provide some guidance or tips on how I can convert my sample data (listed below) into the format required by the hftbacktest dataset Thank you

nkaz001 commented 1 week ago

First, if you only have BBO data and no market depth data, achieving accurate backtesting results can be challenging, depending on the characteristics of the strategy. If the strategy’s order execution is not heavily dependent on queue position, this may be less of an issue.

The current stable version does not directly support BBO data; you'll need to convert it to L2 market depth data. You can find the basic concept here. Please feel free to reach out if you need any further assistance.