June 21st, 2024

Show HN: High-frequency trading and market-making backtesting tool with examples

The GitHub URL leads to the "HftBacktest" project, a Rust framework for high-frequency trading. It offers detailed simulation, order book reconstruction, latency considerations, multi-asset backtesting, and live trading bot deployment.

Read original articleLink Icon
Show HN: High-frequency trading and market-making backtesting tool with examples

The GitHub URL provided pertains to the "HftBacktest" project, a Rust framework tailored for creating and executing high-frequency trading and market-making strategies. Key features of the project include detailed tick-by-tick simulation with customizable time intervals, comprehensive order book reconstruction using L2 Market-By-Price and L3 Market-By-Order feeds, backtesting accounting for feed and order latency, order fill simulation considering queue position, backtesting of multi-asset and multi-exchange models, and the ability to deploy a live trading bot using the same algorithm code. For further details, examples, documentation, and the project roadmap, you can refer to the GitHub repository at the provided link.

Link Icon 9 comments
By @apsears - 4 months
Where can I find (programming) tools for slow investing?
By @bormaj - 4 months
Are you a professional in the field or is this your side project?

The quantitative trading posts on here typically just scratch the surface, but I have to say that I'm impressed with this one. Thanks for sharing!

By @wslh - 4 months
As far as I know, HFT involves having close and specific network links to the markets, and you cannot beat the big players in that field. Am I missing something?

I have a story to tell, anonymizing the actors: I had an appointment to have dinner with a friend who works in cybersecurity at a top hedge fund in NY. Before we entered the restaurant, he received a call because a link with Hong Kong was failing. I told him that I assumed our dinner would be canceled, but somehow the issue was solved in 10 minutes. In this context, I understand that if HFT could be done using any Internet connection, there would not have been any issue there.

By @noitpmeder - 4 months
I see this is tailored toward crypto exchanges -- what, if any, are the major differences between crypto based trading and more traditional stock/future/option exchanges?
By @koalala - 4 months
i've been looking into doing this, the basic algorithms you can get from research, but building a top of the line FPGA design for this is beyond my capabilities as a single engineer, does anyone know of anyone doing this with just some really well optimized c++?
By @robbyiq999 - 4 months
Is all of this just a fancy complex way to lose money? Isn’t impossible to beat the market consistently?
By @TacticalCoder - 4 months
> Show HN: High-Frequency Trading... > currently for Binance Futures and Bybit

There is no high-frequency trading in the cryptocurrencies world. It's medium frequency trading at best.

These cryptocurrencies exchanges (really broker+exchange mixed as one) aren't serving the data feed anywhere near quickly enough nor executing orders quickly enough to approach HFT.

Firm doing HFT are co-locating near the exchange and using direct data feeds, at times using algorithms running on FPGA. Stuff like that.

That's HFT.

What's shown for Binance/Bybit is simply not HFT.

By @yobid20 - 4 months
It's in rust. Somebody port it to C++ then it might be worth looking at.
By @ta12653421 - 4 months
I bet 100 USD that your tool is not working :-)

Why?

BACKtesting is not comparable to real market scenarios.

What you should do before going live, is a so call Walk-Forward-Test - if this version shows your profits, then launch.