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

# Calculate Net Stable Funding Ratio

> Calculates the Basel III Net Stable Funding Ratio (NSFR), which measures the stability of a bank's funding structure over a one-year horizon. Formula: NSFR = Available Stable Funding (ASF) / Required Stable Funding (RSF). ASF comes from stable funding sources (capital 100%, stable retail deposits 95%, less stable retail 90%, wholesale 50%). RSF represents the stability required for assets (cash 0%, Level 1 securities 5%, retail loans 85%, corporate loans 65%, other assets 100%). Minimum regulatory requirement is 100%. Use this for annual funding planning, structural liquidity management, and regulatory reporting. [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/regulatory.json post /quantlib/regulatory/liquidity/nsfr
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Regulatory
  description: >-
    Pro-tier regulatory compliance and capital adequacy endpoints covering Basel
    III capital ratios and RWA calculations, SA-CCR counterparty credit risk
    exposure metrics, IFRS 9 expected credit loss provisioning, liquidity
    coverage ratios (LCR/NSFR), and stress testing capital projections. All
    endpoints require Pro tier access and consume 5 credits per request.
  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-regulatory
    description: >-
      Regulatory compliance and capital adequacy calculations for Basel III,
      SA-CCR, IFRS 9, liquidity ratios, and stress testing. Pro tier required.
    x-displayName: Regulatory
paths:
  /quantlib/regulatory/liquidity/nsfr:
    post:
      tags:
        - quantlib-regulatory
      summary: Calculate Net Stable Funding Ratio
      description: >-
        Calculates the Basel III Net Stable Funding Ratio (NSFR), which measures
        the stability of a bank's funding structure over a one-year horizon.
        Formula: NSFR = Available Stable Funding (ASF) / Required Stable Funding
        (RSF). ASF comes from stable funding sources (capital 100%, stable
        retail deposits 95%, less stable retail 90%, wholesale 50%). RSF
        represents the stability required for assets (cash 0%, Level 1
        securities 5%, retail loans 85%, corporate loans 65%, other assets
        100%). Minimum regulatory requirement is 100%. Use this for annual
        funding planning, structural liquidity management, and regulatory
        reporting. [Tier: ENTERPRISE, Credits: 10]
      operationId: liquidity_nsfr
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - capital
              properties:
                capital:
                  type: number
                  description: Regulatory capital (Tier 1 + Tier 2) - 100% ASF weight
                  example: 100000000
                stable_deposits_retail:
                  type: number
                  description: >-
                    Stable retail deposits (insured, transactional) - 95% ASF
                    weight
                  default: 0
                  example: 400000000
                less_stable_deposits_retail:
                  type: number
                  description: Less stable retail deposits - 90% ASF weight
                  default: 0
                  example: 200000000
                wholesale_funding:
                  type: number
                  description: Wholesale funding with maturity >= 1 year - 50% ASF weight
                  default: 0
                  example: 150000000
                cash_and_reserves:
                  type: number
                  description: Cash and central bank reserves - 0% RSF weight
                  default: 0
                  example: 50000000
                securities_level1:
                  type: number
                  description: >-
                    Level 1 HQLA securities (sovereigns, central bank) - 5% RSF
                    weight
                  default: 0
                  example: 100000000
                loans_retail:
                  type: number
                  description: Retail loans and mortgages - 85% RSF weight
                  default: 0
                  example: 300000000
                loans_corporate:
                  type: number
                  description: Corporate loans and other performing loans - 65% RSF weight
                  default: 0
                  example: 250000000
                other_assets:
                  type: number
                  description: >-
                    Other assets (NPLs, fixed assets, deferred tax) - 100% RSF
                    weight
                  default: 0
                  example: 50000000
            examples:
              retail_bank_compliant:
                summary: Retail-focused bank - NSFR compliant
                value:
                  capital: 100000000
                  stable_deposits_retail: 400000000
                  less_stable_deposits_retail: 200000000
                  wholesale_funding: 150000000
                  cash_and_reserves: 50000000
                  securities_level1: 100000000
                  loans_retail: 300000000
                  loans_corporate: 250000000
                  other_assets: 50000000
              corporate_bank:
                summary: Corporate-focused bank
                value:
                  capital: 80000000
                  stable_deposits_retail: 100000000
                  less_stable_deposits_retail: 50000000
                  wholesale_funding: 300000000
                  cash_and_reserves: 30000000
                  securities_level1: 50000000
                  loans_retail: 50000000
                  loans_corporate: 400000000
                  other_assets: 20000000
      responses:
        '200':
          description: NSFR calculated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      nsfr:
                        type: number
                        description: 'Net Stable Funding Ratio (minimum requirement: 100%)'
                        example: 1.5168539325842696
                      available_stable_funding:
                        type: number
                        description: Total Available Stable Funding (ASF)
                        example: 635000000
                      required_stable_funding:
                        type: number
                        description: Total Required Stable Funding (RSF)
                        example: 418500000
                      compliant:
                        type: boolean
                        description: Whether NSFR meets minimum 100% requirement
                        example: true
              examples:
                compliant:
                  summary: NSFR compliant bank
                  value:
                    success: true
                    data:
                      nsfr: 1.5168539325842696
                      available_stable_funding: 635000000
                      required_stable_funding: 418500000
                      compliant: true
        '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 to complete 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
          example:
            detail:
              - loc:
                  - body
                  - cet1_capital
                msg: field required
                type: value_error.missing
  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

````