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

# Potential Future Exposure (PFE)

> Calculates Potential Future Exposure profile - a high quantile (typically 95th percentile) of the exposure distribution at future time points. PFE is used for counterparty credit limits, collateral requirements, and regulatory capital calculations under SA-CCR. Shows worst-case exposure evolution over time. [Tier: PRO, Credits: 5]



## OpenAPI

````yaml api-specs/risk.json post /quantlib/risk/xva/pfe
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/xva/pfe:
    post:
      tags:
        - quantlib-risk
      summary: Potential Future Exposure (PFE)
      description: >-
        Calculates Potential Future Exposure profile - a high quantile
        (typically 95th percentile) of the exposure distribution at future time
        points. PFE is used for counterparty credit limits, collateral
        requirements, and regulatory capital calculations under SA-CCR. Shows
        worst-case exposure evolution over time. [Tier: PRO, Credits: 5]
      operationId: xva_pfe
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - exposure_paths
              properties:
                exposure_paths:
                  type: array
                  description: Simulated exposure paths over time (Monte Carlo simulations)
                  items:
                    type: array
                    items:
                      type: number
                  example:
                    - - 100000
                      - 105000
                      - 98000
                    - - 100000
                      - 102000
                      - 107000
            example:
              exposure_paths:
                - - 100000
                  - 125000
                  - 145000
                  - 138000
                  - 155000
                - - 100000
                  - 98000
                  - 115000
                  - 132000
                  - 140000
                - - 100000
                  - 110000
                  - 105000
                  - 125000
                  - 135000
                - - 100000
                  - 92000
                  - 88000
                  - 95000
                  - 105000
      responses:
        '200':
          description: PFE profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      pfe_profile:
                        type: array
                        description: 95th percentile exposure at each time point
                        items:
                          type: number
                        example:
                          - 100000
                          - 123750
                          - 143500
                          - 137100
                          - 153500
              example:
                success: true
                data:
                  pfe_profile:
                    - 100000
                    - 123750
                    - 143500
                    - 137100
                    - 153500
        '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

````