AisTrading reconstructs candle-by-candle what your strategy would have done on Kraken and Alpaca historical data, with commission, spread and slippage already deducted, searches for the best parameters by grid and validates them out-of-sample with walk-forward.
A pretty profit curve proves nothing if it's drawn with information you didn't have at the time.
AisTrading backtesting doesn't recalculate formulas over the entire series: it walks through history candle-by-candle, as the live engine would experience it. At each step your strategy only sees closed candles up to that moment (with 60 candles of warmup before starting to trade) and, if it triggers, the entry executes at the open of the next candle, never at the price you just saw. If both the stop and target are hit within the same candle, it assumes the stop: the worst case, not the one you'd hope for. That's what prevents the result from being contaminated by future information.
Costs are built in from the first trade, not estimated at the end. You define three numbers—commission per side, spread and slippage, as percentages—and the test applies half the spread and slippage at each end of the operation, with commission deducted from the result. Default values are real for each market: 0.26% commission, 0.04% spread and 0.05% slippage for crypto; 0.002%, 0.02% and 0.03% for stocks. And there's a realism switch—optimistic, realistic or pessimistic—that multiplies spread and slippage by 0.5, 1 or 2 so you can see how well your strategy holds up when the market gets expensive. When finished you get the breakdown: how much of the result was eaten by costs.
You come out with numbers, not a feeling: closed trades, wins and losses, win rate, profit factor, expectancy per trade (in money and R-multiples), best and worst trade, best and worst consecutive streaks, average duration, total result, total costs and the day-by-day equity curve. And the complete drawdown: how much, from which peak, to which trough, whether it recovered and in how many days. When the sample is small it warns you instead of presenting an 80% win rate over nine trades.
And then come the two tools that separate a test from a decision. Grid optimization sweeps through combinations of your strategy's parameters—up to 200, or 125 if you let the app build the grid itself with three parameters and five values each—and sorts them by the metric you choose: profit factor, expectancy or win rate, marking which ones have enough trades to be reliable. And walk-forward protects you from yourself: it splits history into rolling windows of training and testing (six months and two by default), optimizes on each training period and applies those parameters to the next segment, which the strategy has never seen. The number that matters is efficiency: what percentage of the profit factor you achieved by fitting survives out-of-sample. If it plummets, you've found overfitting, not a strategy.
What makes all this work is that backtesting shares the same evaluate() as the live engine: the ten included strategies and those you build with the formula editor execute with the same code, the same exit rules and the same exposure trimming. What you test is what would later trade. This functionality is part of AisTrading, a mini app by AIsToHire that you can see in full at https://aistohire.com/aistrading-ai-trading-signals-119
Zero future information
candle-by-candle walkthrough, 60 candles warmup, entry at next candle's open and stop assumed when stop and target fall within the same candle. Worst case by default.
Costs built into each trade
commission per side, half spread and slippage at each end, with real crypto and stocks values by default and breakdown of how much they took from the result.
A realism switch
optimistic, realistic or pessimistic multiplies spread and slippage by 0.5, 1 or 2. If your strategy only works in the friendly scenario, you'll see it in two clicks.
The same code as the live engine
the backtest calls the evaluate() method of real strategies, not a reimplementation. The historical data you see is what the engine would have traded.
Parameter grid optimization with reliability control
up to 200 combinations sorted by profit factor, expectancy or win rate, and each row marked as reliable only if it accumulates 20 trades or more.
Walk-forward with measured efficiency
rolling training and testing windows, optimization on each segment, and a percentage that tells you how much of the fitted performance survives out-of-sample.
Metrics that explain risk, not just profit
expectancy in R, profit factor, total costs, best and worst streaks, and a drawdown with dates of peak, trough and recovery.
Your history, your way
5-minute, 15-minute, 1-hour or 1-day candles, from 30 to 365 days from the app (up to 730 via API) and up to 30 symbols per test, with explicit warning when the sample is too short.

Sign up, activate the advanced tier, and launch your first test on real historical data without connecting any broker or risking money.