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

# Correlation Stress Testing

> Stress tests correlation matrices under extreme scenarios. Models correlation breakdown (crisis), decorrelation (relationships weaken), or correlation sign flips. Critical for understanding portfolio behavior during market dislocations when historical correlations fail. Used in FRTB, CCAR stress testing, and risk scenario analysis. [Tier: PRO, Credits: 5]



## OpenAPI

````yaml api-specs/risk.json post /quantlib/risk/correlation-stress
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Risk Module
  description: >-
    Professional-grade risk management endpoints including Value at Risk (VaR),
    stress testing, copulas, extreme value theory (EVT), XVA calculations,
    sensitivities, and portfolio hedging. Part of the Pro Tier (5 credits per
    request).
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
    email: support@fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-risk
    description: Risk Management Module - Pro Tier (5 credits/request)
    x-displayName: Risk
paths:
  /quantlib/risk/correlation-stress:
    post:
      tags:
        - quantlib-risk
      summary: Correlation Stress Testing
      description: >-
        Stress tests correlation matrices under extreme scenarios. Models
        correlation breakdown (crisis), decorrelation (relationships weaken), or
        correlation sign flips. Critical for understanding portfolio behavior
        during market dislocations when historical correlations fail. Used in
        FRTB, CCAR stress testing, and risk scenario analysis. [Tier: PRO,
        Credits: 5]
      operationId: correlation_stress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - correlation_matrix
              properties:
                correlation_matrix:
                  type: array
                  description: >-
                    Baseline correlation matrix (must be symmetric positive
                    semi-definite)
                  items:
                    type: array
                    items:
                      type: number
                  example:
                    - - 1
                      - 0.5
                      - 0.3
                    - - 0.5
                      - 1
                      - 0.4
                    - - 0.3
                      - 0.4
                      - 1
                stress_type:
                  type: string
                  description: Type of correlation stress scenario
                  enum:
                    - crisis
                    - decorrelation
                    - sign_flip
                  example: crisis
                  default: crisis
            example:
              correlation_matrix:
                - - 1
                  - 0.6
                  - 0.4
                  - 0.2
                - - 0.6
                  - 1
                  - 0.5
                  - 0.3
                - - 0.4
                  - 0.5
                  - 1
                  - 0.35
                - - 0.2
                  - 0.3
                  - 0.35
                  - 1
              stress_type: crisis
      responses:
        '200':
          description: Stressed correlation matrix
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      stress_type:
                        type: string
                        example: crisis
                      stressed_matrix:
                        type: array
                        description: Correlation matrix after stress scenario applied
                        items:
                          type: array
                          items:
                            type: number
                        example:
                          - - 1
                            - 0.85
                            - 0.78
                            - 0.65
                          - - 0.85
                            - 1
                            - 0.82
                            - 0.7
                          - - 0.78
                            - 0.82
                            - 1
                            - 0.72
                          - - 0.65
                            - 0.7
                            - 0.72
                            - 1
              example:
                success: true
                data:
                  stress_type: crisis
                  stressed_matrix:
                    - - 1
                      - 0.85
                      - 0.78
                      - 0.65
                    - - 0.85
                      - 1
                      - 0.82
                      - 0.7
                    - - 0.78
                      - 0.82
                      - 1
                      - 0.72
                    - - 0.65
                      - 0.7
                      - 0.72
                      - 1
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientCreditsError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientCreditsError:
      description: Insufficient API credits for this request
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Insufficient credits. This endpoint requires 5 credits.
    ValidationError:
      description: Request validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      type: array
                      items:
                        type: string
                    msg:
                      type: string
                    type:
                      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````