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

# Population Stability Index (PSI)

> Calculates Population Stability Index (PSI) and Characteristic Stability Index (CSI) to monitor model degradation over time. PSI < 0.1 indicates stable population, 0.1-0.25 moderate shift, >0.25 significant shift requiring model review. [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/ml.json post /quantlib/ml/validation/stability
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/validation/stability:
    post:
      tags:
        - quantlib-ml
      summary: Population Stability Index (PSI)
      description: >-
        Calculates Population Stability Index (PSI) and Characteristic Stability
        Index (CSI) to monitor model degradation over time. PSI < 0.1 indicates
        stable population, 0.1-0.25 moderate shift, >0.25 significant shift
        requiring model review. [Tier: ENTERPRISE, Credits: 10]
      operationId: population_stability
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - expected
                - actual
              properties:
                expected:
                  type: array
                  description: Expected distribution (development sample)
                  items:
                    type: number
                  example:
                    - 0.12
                    - 0.23
                    - 0.34
                    - 0.45
                    - 0.56
                    - 0.67
                    - 0.78
                    - 0.89
                actual:
                  type: array
                  description: Actual distribution (current sample)
                  items:
                    type: number
                  example:
                    - 0.15
                    - 0.25
                    - 0.32
                    - 0.48
                    - 0.54
                    - 0.69
                    - 0.75
                    - 0.91
                n_bins:
                  type: integer
                  description: Number of bins for discretization
                  default: 10
                  example: 10
      responses:
        '200':
          description: Stability metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      psi:
                        type: number
                        description: >-
                          Population Stability Index (<0.1 stable, 0.1-0.25
                          moderate, >0.25 significant shift)
                        example: 0.087
                      csi:
                        type: number
                        description: Characteristic Stability Index
                        example: 0.092
        '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

````