Bitalg

Crypto perps · backtest, stress-test, go live

Backtests that earn the right to go live.

Bitalg backtests crypto perpetual strategies, stress-tests the survivors, and puts the file that passed live on Binance or Hyperliquid. Same class, same decision function: what you tested is what trades.

Free during the beta. One email when it opens, nothing else.

Built by a trader who runs it live on Binance and Hyperliquid.

Stress test of a strategy trading live today

BTCUSDT perp · 2020–2026 · 1,000 resamples

  • Median path
  • 25th–75th
  • 5th–95th
  • Unmodified backtest
  • Starting capital
  • Search window ends
Ruin (below $5,000)
0 of 1,000
P95 drawdown
52.2%
Worst 1-in-20 ending
$64,654
Median CAGR
24.7%
How to read this, and the numbers
  • Paths freeze at the $5,000 floor, so ruin is measured, not inferred: none of the 1,000 got there.
  • Drawdown is peak to trough, as a share of the peak at the time, so a path is measured against what it had built, not against the starting capital.
  • One path in four never fell more than 30.1% from its peak, one in two stayed under 35.7%, three in four under 41.4%; one in twenty fell further than the 52.2% in the headline.
  • The resampled paths draw trades in random order, so the search-window marker applies to the backtest line only.
  • The margin per trade was fixed, never scaled up with the balance, so none of the growth comes from compounding position size.
Trade5thMedian95thBacktest
0$20,000$20,000$20,000$20,000
51$19,980$28,742$37,292$29,755
101$25,770$37,707$49,158$45,236
150$31,398$45,610$60,049$52,527
200$37,763$54,263$71,570$47,158
250$44,346$62,261$81,856$59,163
301$50,915$71,533$92,626$68,978
351$58,209$80,019$103,125$73,693
395$64,654$88,002$112,373$86,935
1,000 bootstrap resamples of the trades of a strategy found with Bitalg, from $20,000 with profits left in the account and $1,000 of margin on every trade. Parameters were searched on 2020 to July 2025; the 44 trades after the search window ends are out-of-sample and took the backtest from $73,693 to $86,935. Resampled trades are mostly in-sample.

Why Bitalg

Three things a perp backtest has to get right.

  1. One strategy file, backtest and live

    A parity test holds a real bot client against the backtester on entries, trailing stops and scale-ins. There is no second implementation to drift: the bot runs the class and the decision function the backtester ran.

  2. Funding and liquidation in the PnL

    Funding is charged inside the backtest as it settles, not summed on afterwards. Liquidation is computed the way the exchange computes it, funding erosion included. Positions end where the exchange would end them.

  3. Probability of ruin, not one equity curve

    A backtest is one draw from a distribution. Bitalg resamples your trades, drops fills and perturbs your parameters, then reports the probability of ruin and the drawdown percentiles. Read those before the CAGR.

The six modes: bootstrap, permutation, missed fills, price noise, parameter perturbation, random subsampling
ModeWhat it tests
BootstrapStationary block bootstrap, block length calibrated from trade-return autocorrelation, so losing streaks survive resampling
PermutationSame trades, shuffled order: pure sequencing risk
Missed fillsA random share of trades never happens: outages, latency, rejected orders
Price noiseEntry fills randomised across the bar range
Parameter perturbationYour parameters nudged, optionally the strategy's indicator settings too. Fragile optima show up here
Random subsamplingRandom slices of history sized to a target trade count, with effective sample size reported

No look-ahead. Every decision is taken at the next candle's open, from candles that have already closed, and the fill lands inside that candle.

In practice

What you write, and how fast it runs.

Python 3.12 · Numba · pandas · ccxt · Hyperliquid SDK

A strategy is one Python class

An illustrative moving-average cross, in the shape the engine expects. Not a strategy we trade.

strategies/ma_cross.pypython
class MovingAverageCrossStrategy(Strategy):
    def generate_signal(self, df):
        fast = df["close"].rolling(self.fast_window).mean()
        slow = df["close"].rolling(self.slow_window).mean()
        self.init_signal_column(df)
        up = (fast > slow) & (fast.shift(1) <= slow.shift(1))
        down = (fast < slow) & (fast.shift(1) >= slow.shift(1))
        df.loc[up, "signal"] = TRADING_SIGNAL_BUY
        df.loc[down, "signal"] = TRADING_SIGNAL_SELL
        return df

A strategy is a class with one method that adds a signal column. Sizing, stops, take-profit, scale-in, funding and liquidation are the engine's job, in both the backtest and the bot.

The engine only ever needs that column. Send the class, or keep the code on your machine and send candles with the signal column filled in. Sizing, funding, liquidation and the stress tests run either way. Parameter search and parameter perturbation need the class.

One measured run

One sweep, timed on a 64-core workstation. Median of three.

0.25 s
per backtest
the full 2020–2026 history, one core
~13M
candles / s / core
one-minute BTCUSDT, compiled kernel
~200
backtests / s
one parallel sweep, 64 cores

Measured as one sweep of 1,050 parameter sets over 3.37 million one-minute BTCUSDT candles: 5.1 s of sweep time, 12.9 s end to end including the CSV read, one process per core with the market frame shared copy-on-write, with the compiled kernel already cached. A sweep runs as many candidates as the search needs; timings on the hosted beta depend on its hardware.

How it works

Backtest, stress-test, go live.

  1. Backtest and search.

    One-minute candles from Binance or Hyperliquid, funding history merged on. Brute-force sweeps, or Bayesian search when the space is too big to enumerate, on a training window only, gated on minimum ROI and maximum drawdown.

  2. Validate and stress-test.

    Survivors are re-run on a later stretch of history the search never saw, and only those that repeat their performance are kept. Then six kinds of stress, from bootstrap to parameter perturbation, with the probability of ruin reported first.

  3. Go live.

    The same file, from a Docker image on your own machine, on Binance or Hyperliquid, with an API key that cannot withdraw. Telegram commands from your phone, a heartbeat that pages you if the bot goes silent, and a safe mode that stops opening positions after an exchange error until you say otherwise.

Backtests and stress tests run on our servers. Your strategy file is used for the run and then discarded: nothing is kept unless you save it yourself. The live bot runs on your own machine, so your API keys never leave it. If you would rather we host the bot for you, ask. Prefer that we never see the code? Send the signal column instead.

Who it is for

For traders who code their strategies.

Join the waitlist

  • Python quant. You have an edge in code and want to know whether it is real before it trades.
  • Perps trader. You trade perpetual futures and are tired of backtesters that ignore funding.
  • Rule trader. You already run a rule from a script and want it tested, then running unattended.

Not writing the code? Write to us

  • Capital, no code. You want to know what a strategy must survive. We will show you how to read a stress report.
  • An idea, no code. You want a second pair of eyes before anyone writes a line. Ask before you build.
  • Either way, hello@bitalg.com reaches the founder, who answers every mail.

Find out before the market does.

Bitalg is in closed alpha, in the hands of a small group of traders. The beta opens to this list first.

Free during the beta. One email when it opens, nothing else.