Interface IOptimizerSchema

Schema configuration for optimizer registration. Defines how to collect data, generate strategies, and create executable code.

interface IOptimizerSchema {
    callbacks?: Partial<IOptimizerCallbacks>;
    getPrompt: (
        symbol: string,
        messages: MessageModel[],
    ) => string | Promise<string>;
    note?: string;
    optimizerName: string;
    rangeTest: IOptimizerRange;
    rangeTrain: IOptimizerRange[];
    source: Source<any>[];
    template?: Partial<IOptimizerTemplate>;
}

Properties

callbacks?: Partial<IOptimizerCallbacks>

Optional lifecycle callbacks for monitoring.

getPrompt: (
    symbol: string,
    messages: MessageModel[],
) => string | Promise<string>

Function to generate strategy prompt from conversation history. Called after all sources are processed for each training range.

Type declaration

    • (symbol: string, messages: MessageModel[]): string | Promise<string>
    • Parameters

      • symbol: string

        Trading pair symbol

      • messages: MessageModel[]

        Complete conversation history with all sources

      Returns string | Promise<string>

      Strategy prompt/logic description

note?: string

Optional description of this optimizer configuration.

optimizerName: string

Unique identifier for this optimizer. Used to retrieve optimizer instance from registry.

rangeTest: IOptimizerRange

Testing time range for strategy validation. Used in generated Walker to evaluate strategy performance.

rangeTrain: IOptimizerRange[]

Array of training time ranges. Each range generates a separate strategy variant for comparison.

source: Source<any>[]

Array of data sources for strategy generation. Each source contributes to the LLM conversation context.

template?: Partial<IOptimizerTemplate>

Optional custom template overrides. If not provided, uses defaults from OptimizerTemplateService.