Skip to main content

Where your backtest actually runs, and why

WIRE backtests and paper trades in your browser tab, and runs live bots on your own computer. Here is how that works and what it means for you.

When you press "Run backtest" on WIRE, no server runs your strategy for you. The trading engine itself runs inside your browser tab. That one design choice explains a lot about how WIRE behaves, from why the lab needs no account to why the website can never place a real order.

Three places a strategy can run

A WIRE strategy can be tested on history, run on live prices with pretend money, or run for real. Each of those happens somewhere different.

ModeWhere it runsReal orders?
BacktestYour browser, in a background workerNo, it is a simulation over past candles
Paper tradingYour browser tab, on live pricesNo, trades go to a simulated wallet
Live tradingThe WIRE desktop app, on your computerYes, through your own exchange account

Backtests: the engine comes to you

The same engine that runs live bots is bundled into the website. When you start a backtest, WIRE opens a Web Worker, a background thread in your browser, and replays the candles through your strategy there. The page stays responsive while it works, and the optimiser uses the same worker, so a long tune does not freeze the tab.

The only thing the website's servers do is fetch the candles. Market data comes through WIRE's candle service, and once your browser has a stretch of candles it keeps them in a local cache, so running the same window again does not download them again.

Data Candles, fetched once
Data Cache in your browser
Indicator Engine in a worker
Action Your result
A backtest from start to finish. Everything after the first fetch happens on your device.

That is also why the lab can let anyone build and backtest without signing up. An anonymous visitor costs WIRE some candle requests, which have a daily allowance, rather than server time spent running their strategy.

Paper trading: live prices, pretend money

Paper trading runs in your tab as well. It reads live prices and sends every trade to a simulated wallet instead of an exchange, so you can watch a strategy react to the market as it moves without risking anything. Because it lives in the tab, it stops when you close the tab.

Why the website cannot trade for you

Inside WIRE, every place the engine can run gets a set of capabilities: where to read prices from, where to store things, and so on. One of those capabilities is the connection that places real orders. The website simply does not have one. It is not a setting that is switched off; the piece of code that could send an order is not there to call.

Live trading: on your own machine

When a strategy is ready to run for real, the WIRE desktop app runs it on your computer. It connects to your exchange with your API keys, and those keys stay on your machine rather than on WIRE's servers. WIRE supports 61 exchanges through CCXT, an open-source library that gives every exchange the same interface.

The engine on your desktop is the same one that ran your backtest and your paper run, so a strategy does not have to be rewritten or translated on its way from test to live.

All posts