Tektii just went live. We're shipping fixes daily — spot a bug? Let us know

Backtesting on Tektii

Tektii runs your strategy against historical market data on a hosted platform at api.tektii.com. You package a strategy as a Docker image, register it as a version, then run scenarios — backtests over a chosen instrument set and time window — and read the results. Nothing runs on your machine: the platform executes the run in the cloud and stores the output.

Backtesting is a separate concern from going live. When you're ready to trade a strategy against a broker, that's the Trading Gateway — a component you self-host. This section is only about backtesting on the hosted platform.

How a backtest works

A backtest moves through four stages: config → scenario → states → results.

  1. Config — A config is a reusable saved preset: the instrument subscriptions, the time window, position mode, initial capital, and the cost model. Save it once and run it many times. See Scenario Config for every field.
  2. Scenario — A scenario is a single run of that config against a specific strategy version. Submitting a run is asynchronous — it returns immediately with an id.
  3. States — A scenario advances QUEUED → PENDING → RUNNING, then settles in one terminal state: COMPLETE, FAILED, or CANCELLED. You poll until it's terminal. (The success state is COMPLETE, not COMPLETED.) The full state machine is in the Commands Reference.
  4. Results — A COMPLETE scenario has results: return, drawdown, Sharpe, and per-trade stats. See the Results Reference for the full schema, or view them as charts in the web app.

Two ways to drive it

The CLI and Claude Code are peers — the same hosted API underneath, so pick whichever fits your workflow. Both authenticate with the same API key.

The tektii CLI

The command-line path — scriptable and CI-friendly.

Claude Code (MCP)

The conversational path — register a version, kick off a backtest, and read the results entirely in chat.

Configure and constrain a run

These reference pages cover what goes into a config and the platform's boundaries:

Run into problems? See Troubleshooting.