Backtest an agent

Overview

Before running an agent live, it's recommended to test its past performance on historical data. This is called a backtest.

The goal is to understand how the agent would have reacted in different market conditions — bullish phases, bearish phases, periods of high volatility, drawdowns, etc.

circle-info

Backtests are relevant for trading bots and investing agents with deterministic rules. For an AI trader, backtesting is less representative since the AI exploits the present context (news, positioning) which can't be faithfully replayed in the past.


Launching a backtest

From an agent's page, click Create a backtest. A dialog opens in three steps:

1. Parameters

Backtest period

Define a start date and end date for your backtest. Only this period will be used to simulate past operations and analyze the agent's performance.

Presets are available: last month, last 6 months, last year, last 5 years.

  • We have over 20 years of history for most assets.

  • If the chosen start date predates our price history, the backtest will automatically start at the earliest date available in our database.

  • Our data is updated daily to integrate the latest price changes.

circle-info

Available history depth depends on your plan: 2 years (Free), 5 years (Core), 15 years (Plus), 20 years (Pro). See Pricing.

Starting capital

Define a starting capital for your backtest.

  • For a trading bot: starting capital is required, as it evolves dynamically based on gains and losses generated by each trade.

  • For an investing agent: capital can be defined directly in the description (DCA, conditional purchases, etc.). If an initial amount must be invested in one go, it should also be specified in the description.

circle-check

2. Target assets

For each asset referenced in the agent, choose the exact symbol to use for the backtest. This lets the agent run on the precise assets available at the targeted broker or exchange.

3. Target exchange

Choose the exchange or broker for the backtest. The fees and market specifications of that platform are then applied automatically.

circle-check

Backtest results

Once the backtest is complete, you can access several tabs to analyze performance:

  • Metrics — dozens of detailed indicators (return, drawdown, Sharpe ratio, win rate, etc.).

  • Performance — capital evolution curve over the period.

  • Trades — full list of executed operations, exportable.

  • Chart — TradingView visualization of all entry and exit points, with the reason for each trade.

circle-info

The Obside Score estimates the quality of a backtest by combining performance, risk and statistical reliability. See Obside Score.


Iterating on the agent

If the backtest results aren't satisfactory, you can continue the conversation in the chat linked to the agent to adjust its description, then run a new backtest with the same parameters or different ones.

Mis à jour