> ## 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.

# Credit Rating Migration Analysis

> Estimates credit rating transition probabilities and projects multi-period migration matrices. Used for credit portfolio risk management and expected loss calculations under IFRS 9 and Basel frameworks. [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/ml.json post /quantlib/ml/credit/migration
openapi: 3.1.0
info:
  title: FinceptQuantLib API - ML
  description: >-
    Machine Learning and Credit Risk module endpoints for FinceptQuantLib API.
    Pro Tier access required (5 credits per request). Covers credit scoring,
    model validation, regression models, clustering, anomaly detection, feature
    engineering, and preprocessing.
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-ml
    description: Machine Learning and Credit Risk Analytics
    x-displayName: ML
paths:
  /quantlib/ml/credit/migration:
    post:
      tags:
        - quantlib-ml
      summary: Credit Rating Migration Analysis
      description: >-
        Estimates credit rating transition probabilities and projects
        multi-period migration matrices. Used for credit portfolio risk
        management and expected loss calculations under IFRS 9 and Basel
        frameworks. [Tier: ENTERPRISE, Credits: 10]
      operationId: rating_migration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - transitions
              properties:
                transitions:
                  type: array
                  description: >-
                    Transition count matrix (rows = from rating, cols = to
                    rating)
                  items:
                    type: array
                    items:
                      type: number
                  example:
                    - - 850
                      - 100
                      - 30
                      - 15
                      - 5
                    - - 50
                      - 800
                      - 120
                      - 25
                      - 5
                    - - 10
                      - 80
                      - 850
                      - 50
                      - 10
                    - - 5
                      - 20
                      - 100
                      - 820
                      - 55
                    - - 0
                      - 5
                      - 20
                      - 75
                      - 900
                periods:
                  type: integer
                  description: Number of periods for multi-period projection
                  default: 1
                  example: 3
      responses:
        '200':
          description: Rating migration matrices
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      transition_matrix:
                        type: array
                        items:
                          type: array
                          items:
                            type: number
                        description: One-period transition probability matrix
                        example:
                          - - 0.85
                            - 0.1
                            - 0.03
                            - 0.015
                            - 0.005
                          - - 0.05
                            - 0.8
                            - 0.12
                            - 0.025
                            - 0.005
                      multi_period_matrix:
                        type: array
                        items:
                          type: array
                          items:
                            type: number
                        description: Multi-period transition probability matrix
                        example:
                          - - 0.614
                            - 0.244
                            - 0.099
                            - 0.034
                            - 0.009
                          - - 0.153
                            - 0.512
                            - 0.244
                            - 0.071
                            - 0.02
        '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 credits for this operation
      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

````