# Backtesting

{% hint style="danger" %}

## Cex filters and Whitelist/blacklist is currently not working for backtest

{% endhint %}

## **What is backtesting in Lunar?**

Lunar backtesting allows traders to assess how a strategy might have performed historically, offering crucial insights for refining strategies before actual implementation.

**Key Components**

* **Historical Data Analysis**: Simulate trades by applying defined strategies to the past price data of coins.
* **Strategy Development**: Develop trading strategies using patterns, settings, and custom timeframes aligned with your usual trading habits.
* **Performance Assessment**: Lunar provides a custom CSV file detailing the performance of all coins, facilitating a thorough review of the strategy's outcomes.

By leveraging these components, Lunar enables traders to evaluate the potential profitability of their strategies using comprehensive historical data analysis.

{% hint style="info" %}
Data has been collected since June 12, 2025, at 19:23:51 UTC. We have been expanding our database since that day
{% endhint %}

## How to run backtesting

Ensure you have a task with your preferred settings ready for backtesting. Once prepared, click the rewind button next to the copy of the task you want to test.

Clicking will open a custom timeframe panel, allowing you to select the desired timeframe for backtesting. Click at the top of a column or at the start of a row to select the entire row or column.

When you're ready, click "Start Backtesting". You can backtest up to 5 times per hour (we will increase the limit if everything will be fine). The landing simulation will occur within a range of 0 to 1.

{% embed url="<https://youtu.be/GG2IBVwXIj4>" %}


---

# 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://guide.lunar.trade/defi/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.
