Lab notes

How the aialgo backtester works, and what it ignores

The backtester is the same tool we use for quick sanity checks before a rule set goes into our heavier Python research pipeline. It is deliberately small so that every assumption fits on one page.

Where the data comes from

You supply it. Paste or upload a CSV with a header row; a date column and a close column are required, and open, high, low and volume are optional. Nothing is uploaded: the calculation runs in your browser, and no market data is bundled with the site.

How a run is simulated

  1. Bars are sorted by date and duplicate dates are dropped.
  2. Each rule is evaluated at the close of a bar using only that bar and earlier bars.
  3. Entries and exits fill at that same close, adjusted against you by the slippage setting.
  4. A fixed commission is charged on each side of a trade.
  5. Position size is the allocation percentage of current equity; fractional units are allowed.
  6. Any position still open on the last bar is closed at that bar and labelled as an end-of-data exit.

What it does not model

How to read a result

Results are simulated and use hindsight in the choice of rules and parameters. Compare every run with the buy-and-hold line for the same bars, check how much of the time the rules were actually in the market, and change each parameter a little to see whether the result survives. A rule set that only works at one exact setting is usually curve-fitted.

Built-in rule sets

The strategy library lists the rule sets the tool currently implements, with their default parameters. We add a rule set only when we have tested it in our own research.

Get new lab notes by email

One email when we publish a new lab note or tool. No offers, no tips.

Email signup is disabled in this preview.