> ## 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 Credit Risk-Weighted Assets

> Calculates credit risk-weighted assets (RWA) using either the Standardized Approach or Internal Ratings-Based (IRB) approach under Basel III. The Standardized Approach uses external credit ratings and fixed risk weights per asset class. The IRB approach uses bank's internal estimates of PD (Probability of Default), LGD (Loss Given Default), and maturity. Use this to determine capital requirements for credit portfolios, assess credit risk capital adequacy, and compare standardized vs. IRB treatment. [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/regulatory.json post /quantlib/regulatory/basel/credit-rwa
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/basel/credit-rwa:
    post:
      tags:
        - quantlib-regulatory
      summary: Calculate Credit Risk-Weighted Assets
      description: >-
        Calculates credit risk-weighted assets (RWA) using either the
        Standardized Approach or Internal Ratings-Based (IRB) approach under
        Basel III. The Standardized Approach uses external credit ratings and
        fixed risk weights per asset class. The IRB approach uses bank's
        internal estimates of PD (Probability of Default), LGD (Loss Given
        Default), and maturity. Use this to determine capital requirements for
        credit portfolios, assess credit risk capital adequacy, and compare
        standardized vs. IRB treatment. [Tier: ENTERPRISE, Credits: 10]
      operationId: credit_rwa
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - exposures
              properties:
                exposures:
                  type: array
                  description: List of credit exposures in the portfolio
                  items:
                    type: object
                    required:
                      - amount
                    properties:
                      amount:
                        type: number
                        description: Exposure amount (notional or EAD)
                      asset_class:
                        type: string
                        description: >-
                          Asset class (CORPORATE, SOVEREIGN, BANK, RETAIL,
                          RESIDENTIAL_MORTGAGE, etc.)
                        default: CORPORATE
                      rating:
                        type: string
                        description: >-
                          External credit rating (AAA, AA, A, BBB, BB, B, CCC,
                          etc.) - used in standardized approach
                        nullable: true
                      pd:
                        type: number
                        description: Probability of Default (0-1) - used in IRB approach
                        default: 0.01
                        nullable: true
                      lgd:
                        type: number
                        description: Loss Given Default (0-1) - used in IRB approach
                        default: 0.45
                        nullable: true
                      maturity:
                        type: number
                        description: Effective maturity in years - used in IRB approach
                        default: 2.5
                        nullable: true
                  example:
                    - amount: 5000000
                      asset_class: CORPORATE
                      rating: BBB
                    - amount: 3000000
                      asset_class: SOVEREIGN
                      rating: AA
                method:
                  type: string
                  enum:
                    - standardized
                    - irb
                  description: >-
                    Calculation method: 'standardized' uses external ratings,
                    'irb' uses internal PD/LGD estimates
                  default: standardized
                  example: standardized
            examples:
              standardized_corporate_portfolio:
                summary: Standardized approach - corporate loan portfolio
                value:
                  exposures:
                    - amount: 5000000
                      asset_class: CORPORATE
                      rating: BBB
                    - amount: 3000000
                      asset_class: CORPORATE
                      rating: A
                    - amount: 2000000
                      asset_class: SOVEREIGN
                      rating: AA
                  method: standardized
              irb_advanced:
                summary: IRB approach - internal risk models
                value:
                  exposures:
                    - amount: 5000000
                      asset_class: CORPORATE
                      pd: 0.015
                      lgd: 0.4
                      maturity: 3
                    - amount: 3000000
                      asset_class: CORPORATE
                      pd: 0.008
                      lgd: 0.35
                      maturity: 2
                  method: irb
      responses:
        '200':
          description: Credit RWA calculated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      rwa:
                        type: number
                        description: Total risk-weighted assets for credit risk
                        example: 6250000
                      method:
                        type: string
                        description: Method used for calculation
                        example: standardized
              examples:
                standardized_result:
                  summary: Standardized approach result
                  value:
                    success: true
                    data:
                      rwa: 6250000
                      method: standardized
                irb_result:
                  summary: IRB approach result
                  value:
                    success: true
                    data:
                      rwa: 4820000
                      method: irb
        '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

````