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 358 forks source link

Moving from hftbacktest to live #47

Closed volemont closed 5 months ago

volemont commented 11 months ago

Thanks for this great project.

How would you move from backtesting to live without having to re-implement the strategy logic and introduce bugs in the process?

For example, ideally def market_making_algo(hbt) could be used in sample-trading-bot.

szad670401 commented 11 months ago

Same issue

nkaz001 commented 11 months ago

Unfortunately, owing to the constraints imposed by Numba, I'm uncertain whether it's feasible to seamlessly transition the backtesting code into a live bot without some necessary modifications. Even if we were to eliminate the use of numba.njit, some adjustments might still be required, as the backtesting code currently lacks compatibility with any form of asynchronous operations.

I'll try to figure out what options could be feasible.

nkaz001 commented 6 months ago

It's still at the very early stage of development, I updated Rust implementation that supports a live bot, currently Binance futures only. feedback and contributions are welcome. https://github.com/nkaz001/hftbacktest/tree/experimental_rust

edit: rust experimental features are merged into the master branch. you can find 'rust' directory in the master branch.