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

# Create Account Backtest

> Start a new backtest job for a client



## OpenAPI

````yaml POST /api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/backtests/
openapi: 3.0.3
info:
  title: TILT
  version: 0.0.1
servers: []
security: []
paths:
  /api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/backtests/:
    post:
      tags:
        - api
      description: Start a new backtest job for a client
      operationId: api_v1_custom_org_clients_accounts_backtests_create
      parameters:
        - in: path
          name: account_uuid
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: client_uuid
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: organization_uuid
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartBacktestRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/StartBacktestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/StartBacktestRequest'
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomizationBacktestJob'
          description: ''
      security:
        - ProAPIToken: []
components:
  schemas:
    StartBacktestRequest:
      type: object
      properties:
        start_date:
          type: string
          format: date
        end_date:
          type: string
          format: date
        rebalance_period:
          allOf:
            - $ref: '#/components/schemas/StartBacktestRequestRebalancePeriodEnum'
          default: MONTHLY
        tax_gamma:
          type: number
          format: double
          maximum: 100
          minimum: 0
        tax_loss_threshold_bps:
          type: number
          format: double
          maximum: 5000
          minimum: 0
        starting_nav:
          type: number
          format: double
          maximum: 1000000000
          minimum: 100
        ls_tlh_factor:
          $ref: '#/components/schemas/LsTlhFactorEnum'
        diversify:
          $ref: '#/components/schemas/DiversifyBacktestRequest'
    CustomizationBacktestJob:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        status:
          allOf:
            - $ref: '#/components/schemas/ScenarioAnalysisJobStatusEnum'
          readOnly: true
        params:
          allOf:
            - $ref: '#/components/schemas/StartBacktestRequest'
          readOnly: true
          nullable: true
        resolved_params:
          allOf:
            - $ref: '#/components/schemas/BacktestResolvedParams'
          nullable: true
          readOnly: true
        progress:
          allOf:
            - $ref: '#/components/schemas/BacktestProgress'
          nullable: true
          readOnly: true
        result:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BacktestCaseResult'
          description: Dictionary mapping case names to case results
          readOnly: true
        error_message:
          type: string
          readOnly: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        started_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        finished_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - created_at
        - error_message
        - finished_at
        - id
        - params
        - progress
        - resolved_params
        - result
        - started_at
        - status
    StartBacktestRequestRebalancePeriodEnum:
      enum:
        - MONTHLY
      type: string
      description: '* `MONTHLY` - MONTHLY'
    LsTlhFactorEnum:
      enum:
        - quality
        - value
        - growth
      type: string
      description: |-
        * `quality` - quality
        * `value` - value
        * `growth` - growth
    DiversifyBacktestRequest:
      type: object
      properties:
        tilt_asset_id:
          type: string
          description: Tilt asset ID of the concentrated ticker.
        basis_fraction:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Cost basis as a fraction of the initial quote, from 0 to 1. For
            example, 0.25 means 25%.
        acquisition_date:
          type: string
          format: date
          description: Date the concentrated position was acquired (YYYY-MM-DD).
        tier:
          allOf:
            - $ref: '#/components/schemas/TierEnum'
          description: >-
            Long/short exposure: 140% long and 40% short, or 200% long and 100%
            short.


            * `140/40` - 140/40

            * `200/100` - 200/100
        monthly_tax_budget:
          type: number
          format: double
          minimum: 0
          description: >-
            Monthly tax budget in USD, applied when trades are selected, before
            later wash-sale amendments.
      required:
        - acquisition_date
        - basis_fraction
        - monthly_tax_budget
        - tier
        - tilt_asset_id
    ScenarioAnalysisJobStatusEnum:
      enum:
        - PENDING
        - RUNNING
        - SUCCESS
        - FAILURE
      type: string
      description: |-
        * `PENDING` - PENDING
        * `RUNNING` - RUNNING
        * `SUCCESS` - SUCCESS
        * `FAILURE` - FAILURE
    BacktestResolvedParams:
      type: object
      properties:
        start_date:
          type: string
          format: date
        end_date:
          type: string
          format: date
        rebalance_period:
          $ref: '#/components/schemas/BacktestResolvedParamsRebalancePeriodEnum'
        starting_nav:
          type: number
          format: double
        tax_gamma:
          type: number
          format: double
          nullable: true
        tax_loss_threshold_bps:
          type: number
          format: double
          nullable: true
        diversify:
          $ref: '#/components/schemas/DiversifyBacktestRequest'
      required:
        - end_date
        - rebalance_period
        - start_date
        - starting_nav
        - tax_gamma
        - tax_loss_threshold_bps
    BacktestProgress:
      type: object
      properties:
        planned_periods:
          type: integer
        completed_periods:
          type: integer
        last_completed_period:
          type: string
          format: date
          nullable: true
        last_progress_at:
          type: string
          format: date-time
          nullable: true
      required:
        - completed_periods
        - last_completed_period
        - last_progress_at
        - planned_periods
    BacktestCaseResult:
      type: object
      description: Serializer for a single case's backtest results.
      properties:
        run_evidence:
          type: object
          additionalProperties: {}
          description: >-
            Recorded run: schema (1), build (release, engine_version),
            initialization (kind, starting_nav), window (requested_start,
            requested_end, first_solve_date, last_solve_date, last_nav_date),
            periods (date, risk_model_snapshot, effective_tax_gamma,
            effective_tax_loss_threshold_bps, effective_short_term_tax_rate,
            effective_long_term_tax_rate, tax_budget_selected_gamma), tax_gamma
            (requested, differing_dates, not_captured_dates). Tax rates are
            decimal fractions from each period's response config report.
            Uncaptured values are null. Older runs may lack the tax rate fields.
        complete:
          type: boolean
        backtest_dispositions:
          type: array
          items:
            type: object
            additionalProperties: {}
        input_provenance:
          type: array
          items:
            type: object
            additionalProperties: {}
        recovery_receipts:
          type: array
          items:
            type: object
            additionalProperties: {}
        diversify_months:
          type: array
          items:
            $ref: '#/components/schemas/DiversifyBacktestMonth'
        diversify_summary:
          $ref: '#/components/schemas/DiversifyBacktestSummary'
        diversify_initialization:
          type: object
          additionalProperties: {}
          description: >-
            Measured initial quote and cost basis per share in USD, shares, and
            starting NAV in USD.
        summaries:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: number
              format: double
          nullable: true
          description: Dictionary mapping quantity names to date-to-value mappings
        tax_summaries:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: number
              format: double
          nullable: true
          description: Dictionary mapping quantity names to date-to-value mappings
        assets:
          type: array
          items:
            $ref: '#/components/schemas/BacktestAsset'
          nullable: true
        index_period_return:
          type: object
          additionalProperties:
            type: number
            format: double
          description: >-
            Account index return per period as a decimal fraction (0.01 = 1%),
            weighted by the engine's benchmark weights using prior NYSE closing
            prices, aligned with the portfolio. Keys are period-start rebalance
            dates (yyyy-mm-dd), covering the next rebalance or final valuation
            date. Absent from older saved runs.
        benchmark_period_return:
          type: object
          additionalProperties:
            type: number
            format: double
          description: >-
            Account benchmark return per period as a decimal fraction (0.01 =
            1%), weighted by the engine's benchmark weights on the same prices
            as the portfolio. Keys are period-start rebalance dates
            (yyyy-mm-dd), covering the next rebalance or final valuation date.
            No entry without a following valuation. Absent from older saved
            runs.
        comparison_index_returns:
          type: object
          additionalProperties:
            type: string
            format: decimal
            pattern: ^-?\d{0,5}(?:\.\d{0,10})?$
          nullable: true
          description: >-
            Dictionary mapping dates (yyyy-mm-dd) to the return values of a
            reference index.
    TierEnum:
      enum:
        - 140/40
        - 200/100
      type: string
      description: |-
        * `140/40` - 140/40
        * `200/100` - 200/100
    BacktestResolvedParamsRebalancePeriodEnum:
      enum:
        - MONTHLY
        - WEEKLY
      type: string
      description: |-
        * `MONTHLY` - MONTHLY
        * `WEEKLY` - WEEKLY
    DiversifyBacktestMonth:
      type: object
      properties:
        month_index:
          type: integer
          description: Month number, starting at 0 for the formation month.
        date:
          type: string
          format: date
        status:
          $ref: '#/components/schemas/DiversifyBacktestMonthStatusEnum'
        concentrated_weight:
          type: number
          format: double
          description: Concentrated position weight as a fraction; 0.10 means 10%.
        concentrated_shares:
          type: number
          format: double
          description: Shares remaining in the concentrated position.
        active_risk_pct:
          type: number
          format: double
          description: Model-implied annualized tracking error in percent; 4 means 4%.
        period_tax_due:
          type: number
          format: double
          description: Tax due in USD when this month's trades were selected.
        tax_due:
          type: number
          format: double
          description: Tax due in USD after later wash-sale amendments.
        complete:
          type: boolean
          description: Tracking error is below 4% and concentrated weight is at most 10%.
        candidate_solver_time_seconds:
          type: number
          format: double
          description: Time spent solving candidates, in seconds.
        month_elapsed_seconds:
          type: number
          format: double
          description: Total time spent processing the month, in seconds.
        audit:
          type: object
          additionalProperties: {}
          description: Recorded monthly selection details.
        source_run_id:
          type: string
        predecessor_run_id:
          type: string
          nullable: true
      required:
        - active_risk_pct
        - audit
        - candidate_solver_time_seconds
        - complete
        - concentrated_shares
        - concentrated_weight
        - date
        - month_elapsed_seconds
        - month_index
        - period_tax_due
        - status
        - tax_due
    DiversifyBacktestSummary:
      type: object
      properties:
        first_te_below_4_month:
          type: integer
          nullable: true
          description: >-
            First month with tracking error below 4%; formation is month 0. Null
            if never reached.
        years_to_te_below_4:
          type: number
          format: double
          nullable: true
          description: >-
            First month with tracking error below 4%, divided by 12. Null if
            never reached.
        first_weight_at_most_10_month:
          type: integer
          nullable: true
          description: >-
            First month with concentrated weight at most 10%; formation is month
            0. Null if never reached.
        complete:
          type: boolean
          description: Tracking error is below 4% and concentrated weight is at most 10%.
      required:
        - complete
        - first_te_below_4_month
        - first_weight_at_most_10_month
        - years_to_te_below_4
    BacktestAsset:
      type: object
      description: Serializer for individual asset entries in backtest results.
      properties:
        symbol:
          type: string
        TILT_ASSET_ID:
          type: string
          nullable: true
        optimized_weight:
          type: object
          additionalProperties:
            type: number
            format: double
          nullable: true
        benchmark_weight:
          type: object
          additionalProperties:
            type: number
            format: double
          nullable: true
        unrealized_pnl_gain:
          type: object
          additionalProperties:
            type: number
            format: double
          nullable: true
        unrealized_pnl_loss:
          type: object
          additionalProperties:
            type: number
            format: double
          nullable: true
        wash_sale_aware_loss:
          type: object
          additionalProperties:
            type: number
            format: double
          nullable: true
      required:
        - symbol
    DiversifyBacktestMonthStatusEnum:
      enum:
        - accepted
        - held
      type: string
      description: |-
        * `accepted` - accepted
        * `held` - held
  securitySchemes:
    ProAPIToken:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.