# Backtesting

Backtesting is the general method for evaluating a trading strategy and how well it has performed in the past. Backtesting assesses the viability of a trading strategy by evaluating trade signals generated on the current strategy using historical data to produce results, taking them as historical performance if the strategy were deployed in that time frame. It provides some level of confidence to employ it going forward. However, past performance is definitely not a guarantee of future performance.

{% hint style="info" %}
A good backtest result does NOT guarantee good future performance
{% endhint %}

### Time Frame

Backtesting can usually be done in six different time frames: 1 day, 1 week, 1 month, 3 months, 6 months, and 1 year. A longer time frame can weed out market noise over a period of time, while shorter time frames can evaluate current prevailing  trends. It is good practice to draw conclusions from backtesting multiple time frames for each bot.

Backtesting can only be done within the selected time frame from the day the bot is created, going backwards in time. StockHero supports custom date and time setting for backtesting for users on our Professional Plan.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stockhero.ai/getting-started/backtesting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
