> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baibaibot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Backtest your trading bots and signals on historical data.

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator.jpg?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=5350c337aa3613424b48079d872b63e6" width="721" height="5" data-path="images/separator.jpg" />

### Disclaimer & General Information

<Info>
  Not all signals that work in the past will work in the future, but backtests can give you an idea of how your bot would have performed in the past.
</Info>

<Note>
  Backtesting depends on the features that your bot uses. Not all bots can be backtested as some signals from trend data providers such as Telegram, X/Twitter etc. are not available in historical data.

  We are working on a solution to backtest bots that use signals from external sources like Telegram or X/Twitter by fetching the historical feed/channel data on-demand.
</Note>

<Tip>
  Bots that use only OHLCV market data can be backtested without any issues.
</Tip>

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

### Data Sources

We provide historical data for backtesting from the following sources:

* **Crypto**: Binance (USDT/USDC pairs) up to 1 second resolution
* **Stocks**: Interactive Brokers / polygon.io (10+ Years Historical Data)
* **Forex**: Interactive Brokers / polygon.io (10+ Years Historical Data)

<Note>
  You can request data from other sources by <a href="mailto:contact@baibaibot.com">contacting us</a>. Adding new OHLCV data sources is easy due to our plugin based technology.
</Note>

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

### Groups

Backtest Groups allow you to organize your backtests into categories. You can create a new group by clicking on the "Add Backtest Group" button.

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

### Trade Backtests

Trade Backtests allow you to test your bot or custom trading signals on historical data. You can create a new backtest by clicking on the "Add Backtest" button.

Various settings are available for each backtest, including:

* **Assets**: The assets to trade (e.g. BTC/USDT, AAPL, EUR/USD)
* **Tick Period**: The tick period to use for the backtest (e.g. 1m, 5m, 1h, 1d)
* **Time**: The start and end date of the backtest (e.g. 2021-01-01 to 2021-12-31)
* **Signals**: The buy and sell signals to use for the backtest (no-code or custom)
* **Risk Management**: The risk management settings to use for the backtest (e.g. fixed stop loss, trailing stop loss)
* **Slippage**: The slippage to use for the backtest (e.g. 0.1%)
* **Fees**: The fees to use for the backtest (e.g. 0.1%)

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

### Backtest Results

Each backtest will display detailed results, including:
TODO
