# Backtesting Framework

**Why Backtesting is Needed**

* **Model Validation**: Tests the performance of risk models and strategies against historical data to validate their effectiveness.
* **Strategy Optimization**: Allows users to refine and optimize their strategies based on past performance.
* **Risk Management**: Helps identify potential weaknesses in strategies and adjust them to mitigate risks.

**Features**

* **Historical Performance Analysis**: Evaluate how models and strategies would have performed under historical market conditions.
* **Scenario Testing**: Tests strategies under various hypothetical scenarios to assess their robustness.
* **Custom Backtests**: Users can define specific parameters and conditions for backtesting to meet their unique needs.

#### Discovery Engine as a Oracle

* The plan for disovery engine is evolve as an oracle that can be consumed directly within the smart contracts for real time, accurate and intelligent on-chain decision making.


---

# 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.lucidity.finance/protocol/discovery-engine/backtesting-framework.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.
