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

# Create Backtest

> 202: rolling-origin backtest over the event log (spec §8.2). Deterministic —
no RNG anywhere in the fit/score path — so repeated runs over an unchanged
event log are bit-identical.



## OpenAPI

````yaml /openapi.json post /v1/predictions/backtests
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/predictions/backtests:
    post:
      tags:
        - predictions
      summary: Create Backtest
      description: >-
        202: rolling-origin backtest over the event log (spec §8.2).
        Deterministic —

        no RNG anywhere in the fit/score path — so repeated runs over an
        unchanged

        event log are bit-identical.
      operationId: create_backtest_v1_predictions_backtests_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BacktestRequestBody'
              default:
                horizon_days: 14
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BacktestJobResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    BacktestRequestBody:
      properties:
        horizon_days:
          default: 14
          maximum: 365
          minimum: 1
          title: Horizon Days
          type: integer
      title: BacktestRequestBody
      type: object
    BacktestJobResponse:
      properties:
        job_id:
          title: Job Id
          type: string
        status:
          title: Status
          type: string
      required:
        - job_id
        - status
      title: BacktestJobResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````