Function validate

  • Validates the existence of all provided entity names across validation services.

    This function accepts enum objects for various entity types (exchanges, frames, strategies, risks, sizings, optimizers, walkers) and validates that each entity name exists in its respective registry. Validation results are memoized for performance.

    If no arguments are provided (or specific entity types are omitted), the function automatically fetches and validates ALL registered entities from their respective validation services. This is useful for comprehensive validation of the entire setup.

    Use this before running backtests or optimizations to ensure all referenced entities are properly registered and configured.

    Parameters

    • Optionalargs: Partial<Args>

      Partial validation arguments containing entity name enums to validate. If empty or omitted, validates all registered entities.

    Returns Promise<void>

    If any entity name is not found in its validation service

    // Validate ALL registered entities (exchanges, frames, strategies, etc.)
    await validate({});
    // Define your entity name enums
    enum ExchangeName {
    BINANCE = "binance",
    BYBIT = "bybit"
    }

    enum StrategyName {
    MOMENTUM_BTC = "momentum-btc"
    }

    // Validate specific entities before running backtest
    await validate({
    ExchangeName,
    StrategyName,
    });
    // Validate specific entity types
    await validate({
    RiskName: { CONSERVATIVE: "conservative" },
    SizingName: { FIXED_1000: "fixed-1000" },
    });