# Backtest Viewer (/platform/ai-backtesting/backtest-viewer)



![](/images/ai-backtesting/backtest-viewer/backtest-viewer-intro.png)

Users have access to a wide variety of useful data and visualisations to evaluate a strategy trough the backtest viewer.

By default the backtest viewer will display backtest information from the most recent fetched strategy in the conversation.

<Tip>
  You can check backtest results from previously fetched strategies by simply clicking on the card holding the strategy
</Tip>

## Backtest Statistics [#backtest-statistics]

### Overview [#overview]

* Historical Net Profit
* Net Profit
* Trades
* Win Rate
  * Winning Trades (left)
  * Losing Trades (right)
* Max Drawdown
  * Max Drawdown %

### Performance [#performance]

![](/images/ai-backtesting/backtest-viewer/performance.png)

The **Performance** section includes two visualisations:

* Net Daily PNL: Net daily trades result (profit + loss)
* Weekday Performance: Sum of the profit and losses made during a specific day of the week

#### Table [#table]

A performance table is included listing statistics for all trades, only longs, and only shorts. The following statistics are returned:

* <Tooltip headline="Net Profit" tip="Net result after combining all realized profits and losses.">
    Net Profit
  </Tooltip>
* <Tooltip headline="CAGR" tip="Annualized compounded return over the full backtest period.">
    CAGR (Compounded annualized growth rate)
  </Tooltip>
* <Tooltip headline="Gross Profit" tip="Sum of profits from all winning trades before losses.">
    Gross Profit
  </Tooltip>
* <Tooltip headline="Gross Loss" tip="Sum of losses from all losing trades before gains.">
    Gross Loss
  </Tooltip>
* <Tooltip headline="Profit Factor" tip="Gross profit divided by gross loss. Higher values indicate stronger profitability.">
    Profit Factor
  </Tooltip>
* <Tooltip headline="Average P&L per Day" tip="Average net profit or loss generated per trading day.">
    Average P&L per Day
  </Tooltip>
* <Tooltip headline="Average P&L per Week" tip="Average net profit or loss generated per trading week.">
    Average P&L per Week
  </Tooltip>
* <Tooltip headline="Drawdown" tip="Largest drop in equity from a peak to a later low.">
    Drawdown
  </Tooltip>
  * <Tooltip headline="Drawdown Percent" tip="Largest peak-to-low equity decline expressed as a percentage.">
      Drawdown Percent
    </Tooltip>

### Trades Analysis [#trades-analysis]

![](/images/ai-backtesting/backtest-viewer/trades-analysis.png)

The **Trades Analysis** section includes two visualisations:

* P\&L Distribution: Distribution of trade profit and losses
* Winrate: Shows winrate, winning trades and losing trades
* Duration vs P\&L: Scatter plot showing trade duration (in bars) against the trade result

#### Table [#table-1]

A trades analysis table is included listing statistics for all trades, only longs, and only shorts. The following statistics are returned:

* <Tooltip headline="Closed Trades" tip="Total number of trades that have been opened and closed.">
    Closed Trades
  </Tooltip>
* <Tooltip headline="Winning Trades" tip="Number of closed trades with a positive result.">
    Winning Trades
  </Tooltip>
* <Tooltip headline="Losing Trades" tip="Number of closed trades with a negative result.">
    Losing Trades
  </Tooltip>
* <Tooltip headline="Win Rate" tip="Winning trades divided by total closed trades.">
    Win Rate
  </Tooltip>
* <Tooltip headline="Avg P&L" tip="Average profit or loss across all closed trades.">
    Avg P&L
  </Tooltip>
* <Tooltip headline="Avg Winning Trade" tip="Average profit across winning trades only.">
    Avg Winning Trade
  </Tooltip>
* <Tooltip headline="Avg Losing Trade" tip="Average loss across losing trades only.">
    Avg Losing Trade
  </Tooltip>
* <Tooltip headline="Largest Winning Trade" tip="Single closed trade with the highest profit.">
    Largest Winning Trade
  </Tooltip>
* <Tooltip headline="Largest Losing Trade" tip="Single closed trade with the largest loss.">
    Largest Losing Trade
  </Tooltip>

#### Duration [#duration]

![](/images/ai-backtesting/backtest-viewer/duration.png)

A duration table is included listing statistics for all trades, only longs, and only shorts. The following statistics are returned:

* <Tooltip headline="Avg Trade Duration (bars)" tip="Average number of bars a trade stays open.">
    Avg Trade Duration (bars)
  </Tooltip>
* <Tooltip headline="Avg Winning Trade Duration (bars)" tip="Average number of bars winning trades stay open.">
    Avg Winning Trade Duration (bars)
  </Tooltip>
* <Tooltip headline="Avg Losing Trade Duration (bars)" tip="Average number of bars losing trades stay open.">
    Avg Losing Trade Duration (bars)
  </Tooltip>
* <Tooltip headline="Avg Trades per Day" tip="Average number of closed trades per day.">
    Avg Trades per Day
  </Tooltip>
* <Tooltip headline="Avg Trades per Week" tip="Average number of closed trades per week.">
    Avg Trades per Week
  </Tooltip>
* <Tooltip headline="Longest Trade (bars)" tip="Greatest number of bars any single trade stayed open.">
    Longest Trade (bars)
  </Tooltip>
* <Tooltip headline="Shortest Trade (bars)" tip="Fewest number of bars any single trade stayed open.">
    Shortest Trade (bars)
  </Tooltip>
* <Tooltip headline="Longest Winning Streak (bars)" tip="Longest consecutive winning period, measured in bars.">
    Longest Winning Streak (bars)
  </Tooltip>
* <Tooltip headline="Longest Losing Streak (bars)" tip="Longest consecutive losing period, measured in bars.">
    Longest Losing Streak (bars)
  </Tooltip>

## Trades Log [#trades-log]

![](/images/ai-backtesting/backtest-viewer/trades-log.png)

A trades log table is included showing each closed trade in chronological order, including the trade number, trade side, entry, exit, net P\&L, and the running cumulative P\&L after each trade.

<Tip>
  Click on a column to sort it ascendingly or descendingly.
</Tip>

### Calendar View [#calendar-view]

![](/images/ai-backtesting/backtest-viewer/trades-calendar.png)

When the `View Mode` is switched to calendar view, trades are grouped by day in a monthly layout with month navigation at the top. Each day can show its net P\&L, number of trades, and win rate, while a summary below highlights the month net P\&L, best day, worst day, and average trades per day.

## Strategy Comparison View [#strategy-comparison-view]

When the Backtesting AI fetches multiple strategies at once, these will eb displayed in a comparison view, allowing for detailed comparisons.

### Comparison Table [#comparison-table]

![](/images/ai-backtesting/backtest-viewer/comparison-viewer.png)

The comparison table displays each strategy side by side, including the symbol and timeframe, strategy name, net profit, trades, win rate, max DD %, and profit factor.

### Comparison Scatter Plots [#comparison-scatter-plots]

The comparison scatter plots help visualize how strategies relate across key metrics, with views such as CAGR vs Max Drawdown %, Profit Factor vs Trade Count, Winrate vs Trades, and Normalized Avg Win vs Avg Duration.

Each point represents a strategy, with strong performers being located in the quadrant in green.

<Tip>
  Hovering over a strategy point in the graph shows a tooltip with the relevant strategy details.
</Tip>
