Run your first backtest

A backtest replays historical Bitfinex funding data through a lending strategy so you can see how an algorithm would have behaved before you risk any real capital. It is the safest way to compare currencies and algorithms. Every figure it returns is modeled, not guaranteed — read the caveat below before you trust a number.

1. Pick a currency and algorithm

A strategy is a set of allocation buckets, and each bucket picks one algorithm. You can backtest either a saved strategy or an ad-hoc set of buckets you describe on the spot — the ad-hoc run is not saved.

  • Choose the funding currency (for example a stablecoin like USD).
  • For each bucket, pick the algorithm and the percentage of capital it gets. Bucket allocations must add up to no more than 100%.
  • A run needs at least one bucket — a single bucket holding 100% is the simplest setup.

If you want to understand the algorithms first, see Strategies.

2. Set the date range and starting capital

  • Pick a start and end date. The start must be before the end, and the range may span up to five years of history.
  • Enter a starting capital. It must be a positive number.

Stratum replays real historical Bitfinex funding data across that window — the same market rates that funding offers would have faced day to day.

3. Run the backtest

Backtests run in the background, so submitting one returns immediately while the run finishes. When it is done, the run reports:

  • Total earned and final equity over the window.
  • Average APR — the annualized return the model produced.
  • Utilization — the average share of your capital the model kept actively lent out in funding loans rather than sitting idle or resting in unfilled offers.
  • Fill count — how many offers filled.
  • An equity chart over time, plus a per-loan ledger: each simulated loan's amount, daily rate, term, and the APR that daily rate annualizes to (dailyRate × 365 × 100).

The free plan caps how many backtests you can run per calendar month; paid plans are unlimited. See Pricing for the limits.

4. Read the results as modeled, not guaranteed

Backtest figures describe how a strategy would have performed against past data. They are not a forecast and not a promise. The simulation is an approximation: it replays historical funding candles and decides on each bar's opening rate, but it fills offers against the bar's settle and intraday high, so it can credit fills around short-lived rate spikes that a live offer might have missed. It caps how much of each hour's traded volume one lender can win, but it does not model your own offers moving the published rate, queue position, or every regime shift. Real markets fill partially, move, and change regime.

  • Use backtests to compare currencies and algorithms against each other, not to predict an exact future return.
  • A higher modeled APR is not a guarantee of higher real returns.
  • Past funding rates do not determine future funding rates.

Want a quick estimate before running a full backtest? Try the Calculator.

5. Turn the run into a strategy

When a run looks promising you can save it as a strategy in one step. The new strategy defaults to paper mode — it simulates against live rates without placing real offers — and is saved disabled, so nothing trades until you explicitly enable it. Stratum enforces one strategy per currency, so if you already have a strategy for that currency you will edit the existing one instead of overwriting it.

Before any strategy can go live you need a connected, scoped Bitfinex API key. See Add your Bitfinex API key and our Security overview for how keys are scoped and encrypted.