Skip to content

Validation Module

The validation module is responsible for ensuring that trading strategies and their parameters are correctly defined before execution. This helps prevent simulation errors and enforces logical consistency across strategies.

Main objective of this module is to validate outputs from the LLMs (large language models) and ensure that the strategies are executable. It checks for required fields, correct types and syntax. In some cases when it's possible to fix the output by obeying not required fields, the model will do it.

This module is composed of two main parts: - Validation of entire strategies - Validation of individual parameters


Structure


How It Works

  1. Strategy Validation:
  2. The strategy_validator reads a strategy definition and checks:

    • All required fields are present.
    • Fields conform to expected types and value ranges.
    • Conditions reference only implemented indicators or functions.
  3. Parameter Validation:

  4. Each parameter (e.g., stop loss, ticker, capital) is independently validated by its corresponding validator module.
  5. This modular approach allows for flexible extension if new parameters are introduced.