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
- Bars are sorted by date and duplicate dates are dropped.
- Each rule is evaluated at the close of a bar using only that bar and earlier bars.
- Entries and exits fill at that same close, adjusted against you by the slippage setting.
- A fixed commission is charged on each side of a trade.
- Position size is the allocation percentage of current equity; fractional units are allowed.
- 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
- Gaps, limit moves and the fact that a close is often not a price you can actually trade at.
- Liquidity, partial fills, borrow costs, dividends, splits (unless your data is adjusted) and taxes.
- Futures contract rolls, margin and contract multipliers: treat a futures series as a price index only.
- Short selling, multiple positions or portfolio effects.
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.