AI backtesting: build rules with AI, then test them

By Oalgo · Last reviewed

AI backtesting means an AI turns your idea into rules, and a backtest runs those exact rules on past prices. In Oalgo, Oalgo AI builds the rules as blocks you can read and change, and you run the backtest.

Diagram: four boxes in a line. You write your idea in words. Oalgo AI builds the rules as blocks. The backtest on past prices and the report are marked as the test, which follows the rules as written.Your ideain wordsRules as blocksBacktest onpast pricesReportYou writeOalgo AIbuildsThe testfollows therules aswritten
Oalgo AI builds the rules. The test follows them as written.

Who does what in AI backtesting?

#
StepWho does itWhat happens
1. Write the ideaYouIn your own words, such as “enter when the 14-period RSI crosses above 30”.
2. Build the rulesOalgo AIThe rules appear on the canvas as blocks.
3. Check the rulesYouRead each block. Change any block that is not what you meant.
4. Run the backtestThe backtestIt steps through past prices one candle at a time and applies the rules as written.
5. Read the reportYouLook at the number of trades, the drawdown and the fees before the end result.

Why read the rules before you run the test?

#

A backtest follows your rules, not your meaning. Words leave gaps, and the AI has to fill each gap with a choice. The same sentence can become different rules.

Your wordsOne rule it could becomeAnother rule it could become
“Enter when the trend is up”Close above the 50-period SMA20-period EMA above the 50-period EMA
“Leave if it goes wrong”Stop Loss 2% from entryExit when RSI crosses below 50
“Only when it is moving strongly”ADX above 25Close above the highest high of the last 20 candles

Each column is a fair reading of the words. They give different trades and so different reports, which is why you read the blocks first.

What can AI backtesting not tell you?

#
  • How the rules will behave on new prices. A backtest shows the past.
  • Whether the rules are sound. An AI can write many versions quickly, and each extra try on the same prices makes a chance fit more likely. That is overfitting.
  • Whether the idea is a good one. Oalgo AI gives no advice and makes no promise about how any rules will behave.

A forward test runs the same rules on new prices with simulated funds. The backtest report guide shows what to read first.

Read next