Skip to main content

How backtesting works in QuantPilot

Learn how to test a strategy with historical data, either by asking the agent to run a backtest or by running a backtest manually.

Backtesting lets you test a strategy against historical market data. In QuantPilot, you can run backtests in two ways:

  • You can ask the agent to generate or update a strategy and run a backtest for you.

  • You can run a backtest manually from the QuantScript workspace.

Backtesting is useful for checking how a strategy may have performed in the past, comparing versions, and reviewing whether the strategy logic behaves as expected.

Backtesting does not predict or guarantee future performance. Results are based on historical data, selected settings, assumptions, and market conditions during the tested period.


Run a backtest with the agent

You can ask the QuantPilot agent to create a strategy and run a backtest as part of the workflow.

Describe what you want to test, including:

  • the strategy idea

  • the market or trading pair

  • the timeframe

  • the date range

  • the indicator or logic you want to use

Example prompt:

Create a simple RSI strategy for SOL/USDC on Hyperliquid using 1-hour candles and run an initial backtest.

  • When the agent creates a plan, you may see options such as:

    • Generate QuantScript and run initial backtest

    • Generate QuantScript, backtest, and tune parameters

    • Generate QuantScript, backtest, and validate robustness

  • The initial backtest option is the fastest way to generate QuantScript and see quick backtest results. Parameter tuning and robustness validation can take more time and may use more AI tokens.


Run a manual backtest

You can also run a backtest yourself from the QuantScript workspace.

To run a manual backtest:

  1. Open the strategy in QuantScript.

  2. Select the date range for the test.

  3. Click Backtest.

  4. Review the equity chart and performance summary.

Manual backtesting is useful when you already have a QuantScript strategy and want to test a specific version, date range, or change.


Choose a date range

The backtest date range controls which historical period QuantPilot uses for the test.

For example, you can test:

  • the last 30 days

  • the last 3 months

  • a custom period

  • a period with specific market conditions

Changing the date range may change the results. A strategy that worked well in one market period may perform differently in another.


How QuantPilot prepares data

  • QuantPilot prepares and cleans data before running backtests.

  • This helps make the dataset usable for the selected market and date range, especially when raw market data is incomplete, inconsistent, or messy. For example, Hyperliquid data can sometimes require cleanup before it is suitable for backtesting.

  • Data cleanup can include preparing candles, handling irregular data, and making the dataset usable for the selected backtest period.

  • Historical data may not fully reflect live trading conditions, including fees, slippage, liquidity, execution delays, or future market behavior.


Review backtest results

After a backtest is complete, review the results before making changes or running more tests.

Check:

  • whether the strategy entered and exited trades as expected

  • whether the tested period is useful for the strategy type

  • whether the strategy depends too much on one market condition

  • whether the result looks realistic

  • whether the strategy was over-optimized for the tested period

A strong-looking backtest does not mean the strategy will work the same way in live markets.


Learn more

For a more detailed explanation of how QuantPilot backtests work, including what is included, what may not be fully reflected, performance metrics, strategy versions, and backtest limitations, see this article.

Did this answer your question?