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

# Compute a point-in-time factor risk covariance matrix

> Returns the asset covariance matrix for the requested symbols as of a historical date, built from the point-in-time factor model snapshot resolved at or before that date.

Operation ID: post__factor_risk_covariance.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json post /factor-risk/covariance
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /factor-risk/covariance:
    post:
      tags:
        - Market data
      summary: Compute a point-in-time factor risk covariance matrix
      description: >-
        Returns the asset covariance matrix for the requested symbols as of a
        historical date, built from the point-in-time factor model snapshot
        resolved at or before that date.


        Operation ID: post__factor_risk_covariance.
      operationId: post__factor_risk_covariance
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FactorRiskCovarianceRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactorRiskCovarianceResponse'
          description: Point-in-time asset covariance matrix
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactorRiskError'
          description: Invalid factor risk request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Authentication required
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactorRiskError'
          description: Factor model version or historical snapshot not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactorRiskError'
          description: Historical factor snapshot is unusable for this request
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactorRiskError'
          description: Factor risk service unavailable
      security:
        - bearerAuth: []
components:
  schemas:
    FactorRiskCovarianceRequest:
      additionalProperties: false
      properties:
        as_of:
          description: >-
            Requested point-in-time date. The service resolves it to the nearest
            usable snapshot at or before this date.
          example: '2026-06-30'
          pattern: ^\d{4}-\d{2}-\d{2}$
          type: string
        model_version:
          description: >-
            Pin a specific factor model version. Defaults to the current version
            when omitted.
          example: global-equity-v1
          maxLength: 120
          minLength: 1
          type: string
        symbols:
          description: >-
            Symbols to build the asset covariance matrix for: up to 1000
            distinct symbols after trimming and first-seen deduplication (the
            raw list may hold up to 5000 entries). Symbols are used as given;
            the server validates them when it builds the matrix.
          example:
            - AAPL.US
            - MSFT.US
          items:
            maxLength: 50
            minLength: 1
            type: string
          maxItems: 5000
          minItems: 1
          type: array
      required:
        - as_of
        - symbols
      type: object
    FactorRiskCovarianceResponse:
      properties:
        annualization_factor:
          enum:
            - 252
          type: number
        base_currency:
          enum:
            - USD
            - EUR
            - GBP
            - JPY
            - CHF
            - CAD
            - AUD
            - NZD
            - HKD
            - SGD
            - SEK
            - NOK
            - DKK
            - INR
            - CNY
            - KRW
            - TWD
            - BRL
            - MXN
            - ZAR
            - ILS
            - PLN
            - CZK
            - HUF
            - TRY
            - THB
            - MYR
            - IDR
            - PHP
            - AED
            - SAR
          type: string
        covariance:
          description: Row-major asset covariance matrix aligned to `symbols` on both axes.
          items:
            items:
              type: number
            type: array
          type: array
        model_version:
          maxLength: 120
          minLength: 1
          type: string
        provenance:
          $ref: '#/components/schemas/FactorRiskProvenance'
        requested_as_of:
          type: string
        return_convention:
          enum:
            - simple_daily
            - log_daily
          type: string
        snapshot_as_of:
          description: Snapshot date actually used, at or before `requested_as_of`.
          type: string
        symbol_warnings:
          additionalProperties:
            items:
              type: string
            type: array
          description: >-
            Per-symbol quality warnings the model persisted with the loadings
            and specific risk used in the matrix (high shrinkage, high leverage,
            no finite factor inputs); only symbols with warnings appear.
          type: object
        symbols:
          description: Symbol ordering for both covariance axes.
          items:
            type: string
          type: array
        warnings:
          items:
            type: string
          type: array
      required:
        - annualization_factor
        - base_currency
        - covariance
        - model_version
        - provenance
        - requested_as_of
        - return_convention
        - snapshot_as_of
        - symbols
        - warnings
        - symbol_warnings
      type: object
    FactorRiskError:
      properties:
        details:
          $ref: '#/components/schemas/FactorRiskErrorDetails'
        error:
          $ref: '#/components/schemas/FactorRiskErrorCode'
        message:
          type: string
      required:
        - details
        - error
        - message
      type: object
    Error:
      properties:
        available:
          description: Optional available amount or value
          type: string
        billing_action:
          $ref: '#/components/schemas/BillingAction'
        code:
          description: Machine-readable error code
          type: string
        currentVersion:
          description: Current server-side version, when relevant
          type: number
        details:
          description: Optional structured error details
        error:
          description: Error type or code
          type: string
        expectedVersion:
          description: Client-provided expected version, when relevant
          type: number
        message:
          description: Human-readable error message
          type: string
        requested:
          description: Optional requested amount or value
          type: string
        usage:
          description: Optional usage metadata for limit errors
      required:
        - error
      type: object
    FactorRiskProvenance:
      properties:
        classification_inputs:
          $ref: '#/components/schemas/FactorRiskClassificationInputs'
        factor_availability:
          additionalProperties:
            $ref: '#/components/schemas/FactorRiskFactorAvailability'
          type: object
        factor_count:
          type: number
        pit_policy:
          $ref: '#/components/schemas/FactorRiskPitPolicy'
        psd_repaired:
          description: >-
            True when the covariance matrix required a positive semi-definite
            repair.
          type: boolean
        snapshot_instant:
          description: Instant the resolved snapshot was sealed.
          type: string
        style_inputs:
          $ref: '#/components/schemas/FactorRiskStyleInputs'
      required:
        - classification_inputs
        - factor_count
        - factor_availability
        - pit_policy
        - psd_repaired
        - snapshot_instant
        - style_inputs
      type: object
    FactorRiskErrorDetails:
      additionalProperties: {}
      properties:
        invalid_symbols:
          items:
            type: string
          type: array
        missing_symbol_count:
          type: number
        missing_symbols:
          items:
            type: string
          type: array
        model_version:
          type: string
        reason:
          $ref: '#/components/schemas/FactorRiskFailureReason'
        requested_as_of:
          type: string
        snapshot_as_of:
          type: string
        symbol_count:
          type: number
      type: object
    FactorRiskErrorCode:
      enum:
        - invalid_factor_risk_request
        - factor_model_version_not_found
        - historical_factor_snapshot_not_found
        - historical_factor_snapshot_unusable
        - factor_risk_service_unavailable
      type: string
    BillingAction:
      description: Action that resolves a billing-related rejection
      properties:
        href:
          type: string
        kind:
          enum:
            - upgrade
            - payment_method
            - spending_cap
            - billing
          type: string
        label:
          type: string
      required:
        - href
        - label
        - kind
      type: object
    FactorRiskClassificationInputs:
      enum:
        - point_in_time
        - current_static
        - unavailable
      type: string
    FactorRiskFactorAvailability:
      properties:
        available:
          type: boolean
        observations:
          minimum: 0
          type: integer
        reason:
          $ref: '#/components/schemas/FactorRiskUnavailableReason'
      required:
        - available
        - observations
        - reason
      type: object
    FactorRiskPitPolicy:
      enum:
        - strict
        - tiered
      type: string
    FactorRiskStyleInputs:
      enum:
        - point_in_time
      type: string
    FactorRiskFailureReason:
      enum:
        - stale_snapshot
        - incoherent_snapshot
        - non_pit_inputs
        - incomplete_factor_set
        - incomplete_symbol_coverage
        - missing_model_convention
        - invalid_covariance
      type: string
    FactorRiskUnavailableReason:
      enum:
        - missing_point_in_time_inputs
        - insufficient_return_observations
        - no_calibration_exposure_support
        - null
      type:
        - string
        - 'null'
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

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