> ## Documentation Index
> Fetch the complete documentation index at: https://docs.woodwide.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Backtest Model (Hindsight Check)

> Score the previous dataset version with the model's CURRENT version and compare against the labels that later materialized — a hindsight check ('would have caught'), never a forward guarantee.

Returns 409 when ineligible (single dataset version, no label column, clustering/factors task, or the pair was already backtested). Only one backtest runs per model at a time; a concurrent request returns the in-flight job with `deduplicated: true`.



## OpenAPI

````yaml /openapi.json post /models/{model_id}/backtest
openapi: 3.1.0
info:
  title: Woodwide API
  description: API service for the Woodwide platform
  version: 0.1.0
servers:
  - url: https://api.woodwide.ai
    description: Production
security: []
paths:
  /models/{model_id}/backtest:
    post:
      tags:
        - models
      summary: Backtest Model (Hindsight Check)
      description: >-
        Score the previous dataset version with the model's CURRENT version and
        compare against the labels that later materialized — a hindsight check
        ('would have caught'), never a forward guarantee.


        Returns 409 when ineligible (single dataset version, no label column,
        clustering/factors task, or the pair was already backtested). Only one
        backtest runs per model at a time; a concurrent request returns the
        in-flight job with `deduplicated: true`.
      operationId: backtest_model_models__model_id__backtest_post
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BacktestModelResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BacktestModelResponse:
      properties:
        job_id:
          type: string
          title: Job Id
          description: Public ID of the backtest job (e.g. job_A8K2P9QX).
        status:
          $ref: '#/components/schemas/JobStatus'
        deduplicated:
          type: boolean
          title: Deduplicated
          description: True when an in-flight backtest for this model was returned instead.
          default: false
      type: object
      required:
        - job_id
        - status
      title: BacktestModelResponse
      description: Accepted (or deduped in-flight) backtest job for a model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobStatus:
      type: string
      enum:
        - initializing
        - pending
        - queued
        - running
        - succeeded
        - failed
        - canceled
        - rejected
        - waiting_for_upload
      title: JobStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````