@qtsurfer/api-client
    Preparing search index...

    Type Alias ExecuteSweepResult

    type ExecuteSweepResult = {
        failReason?: string;
        leaderboard: SweepRunRow[];
        leaderboardSize: number;
        objective: "sharpe" | "sortino" | "pnl" | "maxdd";
        order: "ranked" | "natural";
        pbo?: number;
        pboSplits?: number;
        progress: SweepProgress;
        ranking?: "plateau" | "raw";
        state: JobState;
        status: "RUNNING" | "COMPLETED" | "PARTIAL" | "CANCELLED";
        sweepId: string;
        truncated: boolean;
        walkForward?: WalkForwardResult;
    }
    Index
    failReason?: string

    Why the sweep produced less than it should have — the cause reported by the first shard to fail, not a list. It is what turns an inscrutable empty leaderboard into an answer: a sweep can come back PARTIAL with done: 0 because the strategy could not be loaded at all, and without this the response says only that nothing finished. First failure wins and later ones are not recorded, so on a sweep where several shards failed for different reasons this names one of them rather than all. Absent when no shard reported a cause, which is the normal case for a healthy sweep — read it together with progress.failedShards rather than as a count of anything.

    leaderboard: SweepRunRow[]
    leaderboardSize: number

    Total result rows currently available.

    objective: "sharpe" | "sortino" | "pnl" | "maxdd"
    order: "ranked" | "natural"
    pbo?: number

    Probability of backtest overfitting for the sweep as a whole, by combinatorially symmetric cross-validation: how often the configuration that won in-sample lands below median out-of-sample. Above ~0.5 the sweep is selecting noise, whatever its top row says. Computed once when the last shard finishes, so it is absent while the sweep is still running and on sweeps too small for the statistic to mean anything.

    pboSplits?: number

    How many train/test splits the pbo figure was averaged over.

    progress: SweepProgress
    ranking?: "plateau" | "raw"

    Which ordering was actually applied, which is not always the one requested: a sweep with no stored parameter grid cannot be plateau-ranked and falls back to raw. Always raw when order=natural.

    state: JobState

    The same JobState shape a single-execute BacktestJobResult carries — not a sweep-specific lookalike, the actual type, so field names and timestamp formatting match exactly. state.status uses JobState's own vocabulary (New/Started/Completed/ Aborted/Failed), mapped from the sweep's status field above rather than copying it: PARTIAL and CANCELLED both map to Aborted, because a sweep's PARTIAL is already terminal (some shards finished, some failed, nothing more is coming) unlike a single job's non-terminal Partial, which has no equivalent here at all. state.completed is real ticks processed on a plain sweep. On a walkForward sweep it is currently always 0 — the walk-forward fold runner was not wired to count ticks when this shipped, unlike the plain shard path. state.size is an upfront estimate — range x the prepare's target cadence, set before any data is even loaded, not a query against loaded data — on a single execute and a plain sweep alike. A plain sweep's value is the sum of every shard's own size (each shard's per-run estimate x its own vector slice), the same additive shape state.completed already used above. 0 means the prepare context behind the job predates this field (a job whose prepare ran before the estimate existed) — never a guessed cadence standing in for a real one. On a walkForward sweep, state.size is still always 0: fold runs were out of scope for the estimate the same way they are for state.completed above — a fold's size is simply never set, so the sum stays honest at 0 rather than needing a special case.

    status: "RUNNING" | "COMPLETED" | "PARTIAL" | "CANCELLED"

    The sweep's own status vocabulary — not the same set state.status below uses. See state for why.

    sweepId: string
    truncated: boolean

    True only when the ranked view exceeds its display limit.

    walkForward?: WalkForwardResult