# Backtest Methodology

Backtest is a trading strategy research tool for web and iOS. It helps users test strategy rules on historical candles and monitor paper signals. It does not place real-money trades, connect to brokerage execution accounts, or provide investment advice.

## Inputs

A strategy test uses a symbol, timeframe, date range, strategy rules, trade direction, position size, commission, slippage, stop loss, take profit, and exit mode. Preset strategies use deterministic templates. Manual strategies use backend-parsed rules.

## Market Data

Backtest loads candles from supported market data providers. Available history can vary by provider, symbol, and timeframe. Candle count is limited by plan and timeframe so tests stay responsive and do not overload the backend.

## Trade Simulation

The engine walks forward through historical candles in chronological order. A trade opens only when its entry rule is triggered and no previous position is still open. A trade closes through stop loss, take profit, signal exit, or end of data depending on the selected exit mode.

## Costs And Risk

Commission and slippage are applied to simulated entries and exits. Stop loss and take profit are calculated from simulated entry price. Results include net profit after costs, win rate, max drawdown, profit factor, equity curve, and trade-level details.

## Strategy Confidence Score

The confidence score is a quality check for a backtest sample. It considers trade count, candle count, profit factor, net profit after costs, win rate, drawdown, and concentration risk when one large winner explains too much of the result. A high score does not guarantee future profit.

## AI Analysis

AI analysis can review wins, losses, losing clusters, stop-loss behavior, take-profit distance, entry timing, and possible strategy improvements. AI output is advisory research only and can be wrong.

## Rule Execution Discipline

Preset strategies and parsed manual strategies are executed as explicit entry and exit conditions. The simulator does not invent extra entries after the run starts. If the user selects long-only, short-only, or both directions, that direction filter is applied before simulated trades are opened.

## Paper Bot Limitations

Realtime bots reuse saved strategy setup to evaluate new candles and send paper signal notifications. They are designed to help users observe a strategy, not to execute orders. Users remain responsible for every real trading decision outside Backtest.

## Limitations

Backtests are historical simulations and do not guarantee future performance. Results can be affected by data quality, fees, slippage assumptions, market regime changes, and overfitting. Paper signal bots send simulated notifications only and do not execute trades.
