Skip to content

Backtesting your config

WS Terminal includes an in-app backtester: point it at historical price data, and it replays your current strategy configuration against that history — same engine logic the live bot uses, including entries, pyramiding, stops, breakeven, trailing, and end-of-day flatten. It's the fastest way to see what a config change would have done before you run it on paper or live.

The backtester needs one thing you supply yourself: historical 1-second price data for your contract. WS Terminal doesn't bundle market data (licensing doesn't allow redistributing it), but getting your own is a one-time, low-cost step. This page covers the data format, where to get it, and how to run your first backtest.

No data yet? Paper trading needs nothing.

Every config also runs in paper mode against live market data with zero setup — that's the zero-friction way to trial a variant. The backtester adds the ability to compress years of history into a minutes-long test.

The data format

The backtester accepts a CSV file, a folder of CSV files (it reads them all), or a previously built .pkl cache. CSVs need a header row with these columns:

Column Required Notes
timestamp (or ts_event, datetime, time, date) yes auto-detected by name
open, high, low, close yes trade prices for the 1-second bar
anything else (volume, symbol, …) no ignored — extra columns are fine

Timestamps can be either:

  • ISO datetimes2026-03-05 09:30:00 or 2026-03-05T09:30:00-05:00. Times without a timezone are assumed to be US Eastern; times with a timezone are converted to Eastern automatically.
  • Integer nanoseconds since the epoch (UTC) — this is the native ts_event format of Databento exports, which therefore work unmodified, straight out of the download.

Bars must be 1-second resolution — the backtester builds its 1-minute strategy candles from them and uses the 1-second detail for realistic intrabar fill simulation. Full-session data is fine; the detection-start and trading-window settings in your config decide what actually gets traded.

On first load, WS Terminal parses the CSVs and writes a .pkl cache next to them, so subsequent runs on the same data start in seconds.

Where to get data

Databento (databento.com) is the route we use ourselves:

  1. Create an account (pay-as-you-go; the portal shows the exact cost of any request before you confirm it — no subscription needed).
  2. Request from dataset GLBX.MDP3 (CME Globex), schema ohlcv-1s, for your contract (e.g. NQ or MNQ front-month contracts over your date range).
  3. Export as CSV and download. The files' ts_event nanosecond timestamps are read natively — no conversion step.
  4. Put the CSVs in a folder, e.g. C:\TradingData\NQ\.

Any other vendor works too (FirstRate Data, Kibot, your own recordings) as long as the CSV matches the format above. Note that IBKR itself is not a practical source — its API doesn't allow bulk export of 1-second history at backtesting scale.

Running a backtest

  1. Open the Backtest tab in the dashboard.
  2. Paste the path to your CSV file or folder and click Use Path.
  3. The parameter panel is pre-filled from your current saved config — adjust anything you want to test.
  4. Click Run. Results show the equity curve, per-trade list, win rate, drawdown, and exit-reason breakdown.

A few things to keep in mind when reading results:

  • The backtester is an estimate, not a promise. Fills are simulated with a cross-tick rule (price must trade through your level) — close to live behavior, but live fills also face slippage and queue position that no simulation fully captures.
  • Change one thing at a time. A single parameter sweep tells you what moved the needle; ten simultaneous changes tell you nothing.
  • Beware the config that's too good. If a variant massively beats the defaults on your test window, test it again on a different date range before believing it — curve-fit configs ace the history they were tuned on and fail forward. Splitting your data into a "tuning" period and a held-back "checking" period is the single best habit in config research.
  • Hypothetical performance does not guarantee future results. Validate any config on paper before trading it live.