HFTS

High Frequency Trading Simulator

Event-driven · Network-aware · Microsecond precision

Backtest HFT strategies
with real latency

Backtesting on Level 1 data is the main reason strategies look great in simulation and bleed money in production.

HFTS simulates full Level 2 with real network latency and microsecond timing — check if your strategy actually works before you risk your money.

tick-by-tickevent replay granularity
< 1 mslatency injection precision
Pythonstrategy scripting
free tierno credit card required

Latency is not an edge case — it is the edge

Traditional OHLC-based backtests assume your order fills instantly at the last price. In high-frequency markets, that assumption costs money. HFTS uses a discrete-event simulation (DES) engine to model every order, fill, and market update with microsecond precision.

From the author

  • Worked in the HFT and market data departments at Deutsche Bank.
  • During the crypto boom, ran his own and led algo HFT startups.
  • Every platform I tested offered a simplified simulation model. Strategies that worked in backtests consistently failed in live trading. HFTS was created to fix that.
📊

Level-2 tick replay, not OHLC bars

OHLC candles compress thousands of individual quote updates into four numbers. HFTS feeds your strategy a raw Level-2 event stream — over 80,000 ticks per day per instrument, every bid/ask and size update in original arrival order — so passive limit orders are matched against the actual queue state at the moment of arrival. A limit posted 12 ms after a large momentum tick faces a different fill probability than one posted in a quiet period; HFTS captures that difference.

⏱️

Microsecond-precise event timestamps

HFTS replays raw quote events at their original exchange timestamps — down to the microsecond. When your strategy signal fires at T+0 µs, the engine schedules the order arrival at T + RTT and matches it only against the order book state that existed at that exact moment. A 10 ms difference in round-trip latency can mean the difference between a fill and a miss.

📡

Configurable network latency injection

Set your expected round-trip time — from a co-located 0.3 ms to a retail 80 ms connection — and HFTS injects that delay deterministically into every order. Because the order enters the event stream at the correct delayed timestamp, slippage is not random noise: it is the structural cost of being late to a fast-moving queue. You see exactly how many basis points your strategy bleeds to execution lag per trade.

🐍

Write strategies in plain Python — no DSL, no limits

Your strategy is a regular Python class. Use any logic you can express in code: conditionals, state machines, rolling windows. Use 46 technical indicators from external lib — SMA, EMA, RSI, MACD, VWAP, Bollinger Bands, ATR, and more — available with a single import, and you can create your own with few lines of code. Python keeps the feedback loop tight: edit in the browser, run, iterate. No proprietary syntax to learn, no framework lock-in.

Write strategies in plain Python

No proprietary DSL. No framework lock-in. Your strategy is a Python function that receives every market event as a structured object and returns orders. HFTS handles the rest.

  • Load community templates to get started in seconds
  • Save multiple strategy variants per account
  • Code runs in a sandboxed environment — your logic stays private
  • Use Python lib with 46 technical indicators or add your own
  • Built-in syntax highlighting with CodeMirror
def on_tick(self, tick): if self.has_active_orders(): return self._highs.append(tick.ask) self._lows.append(tick.bid) if len(self._highs) < self.window: return chan_high = max(self._highs[-self.window:-1]) chan_low = min(self._lows[-self.window:-1]) # Breakout above channel → momentum long if tick.ask > chan_high: self.buy_limit(tick.ask - 0.01, None)

Detailed per-trade analytics

See every fill, every cancellation, and every latency measurement. The report view shows your accumulated P&L curve alongside a trade log that includes actual execution delay per order.

  • Accumulated P&L curve on an interactive Highstock chart
  • Per-trade table: price, size, fee, latency, fill status
  • Summary statistics: total P&L, win rate, average latency, drawdown
  • Cancelled and failed orders flagged inline
▶ Run complete — 825 ms
Total P&L+$142.30 Trades38 Win rate63.2 % Avg latency47 ms Max drawdown-$61.10 Fees paid$8.44
2024-03-01T09:31:22 BUY-L 42 118.50 +$18.20
2024-03-01T09:44:07 SELL-M 42 133.10 -$7.80
2024-03-01T10:02:55 BUY-L 42 128.40 +$31.60

Curated tick-level market data

You do not need to source or clean data. HFTS ships with high-quality Level-2 quote data for major crypto and fx instruments, updated regularly, ready to replay against your strategy.

  • Multiple symbols and date ranges available
  • Raw exchange quote feed — no resampling artefacts
  • Consistent event format across all instruments
  • More datasets added with each plan tier
  • Planned: L3 order book data
# Quote event structure { "type": "Q", "time": "2024-03-01T09:31:22.481231Z", "bid_price": 42117.80, "ask_price": 42118.50, "bid_size": 0.142, "ask_size": 0.089 }

Start free, scale when you need

All plans include the full strategy editor and event-driven engine. Paid plans unlock longer date ranges, more strategies, and extended execution limits.

Free

$0

forever · no card required


  • Full Python strategy editor
  • Event-driven backtester with latency
  • 1 day of tick data per backtest
  • Up to 3 saved strategies
  • Limited run frequency (rate limited)
  • Demo strategies to explore
  • No network access
Get started free

Quant

$50

per month · billed monthly


  • Everything in Pro
  • Full history — all available data
  • 500 saved strategies
  • High run rate limits
  • Multiple instruments per run
  • API access
  • Network access — link with your own infrastructure or AI
  • Planned: full L3 & depth-of-market event processing
Coming soon

Built for people who take execution seriously

Feedback from early users testing strategies on real tick data.

"Every other backtester I used showed my scalping strategy breaking even at worst. HFTS showed me it was actually losing 40 bps per trade to execution lag alone. That was exactly the insight I needed."

Mikhail R.
Algorithmic trader, crypto markets

"The Python interface is clean and the event format is well-documented. I had my existing signal logic running in under 10 minutes. The latency injection is the feature that sets this apart from everything else."

Sara K.
Quantitative researcher

"I love that the free tier gives you real tick data for one day — enough to validate your idea quickly without paying anything. Upgraded to Pro when I needed longer history."

James T.
Independent quant developer

Get in touch

Have a question, feedback, or would like to suggest a new feature? Do not hesitate to contact us directly.

Email
support@hfts.app
Discord community
Join the HFTS server

Ready to test your strategy against reality?

Sign in with Google and run your first backtest in under one minute. No credit card required.

Get started — it's free →