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

# Compute Numerical Hessian Matrix

> Calculate the Hessian matrix (matrix of second-order partial derivatives) of a multi-variable function. The Hessian provides information about local curvature and is used in second-order optimization methods (Newton's method), analyzing critical points, and measuring convexity. Essential for advanced optimization and risk analysis. [Tier: BASIC, Credits: 1]



## OpenAPI

````yaml api-specs/numerical.json post /quantlib/numerical/differentiation/hessian
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Numerical
  description: >-
    Numerical module endpoints for FinceptQuantLib API. The Numerical module
    (Basic Tier, 1 credit per request) provides comprehensive numerical methods
    including finite difference differentiation, Fast Fourier Transform (FFT),
    numerical integration (quadrature and Monte Carlo), interpolation methods
    (linear, cubic, spline), linear algebra operations (matrix decomposition,
    solving systems), ODE solvers, root finding algorithms, optimization
    methods, and nonlinear least squares fitting. Essential for quantitative
    analysis, scientific computing, and numerical model implementation.
  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-numerical
    description: >-
      Numerical methods including differentiation, FFT, integration,
      interpolation, linear algebra, ODE solvers, root finding, and optimization
    x-displayName: Numerical
paths:
  /quantlib/numerical/differentiation/hessian:
    post:
      tags:
        - quantlib-numerical
      summary: Compute Numerical Hessian Matrix
      description: >-
        Calculate the Hessian matrix (matrix of second-order partial
        derivatives) of a multi-variable function. The Hessian provides
        information about local curvature and is used in second-order
        optimization methods (Newton's method), analyzing critical points, and
        measuring convexity. Essential for advanced optimization and risk
        analysis. [Tier: BASIC, Credits: 1]
      operationId: finite_diff_hessian
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - func_name
                - x
              properties:
                func_name:
                  type: string
                  description: Built-in multi-variable function name
                  enum:
                    - rosenbrock
                    - sphere
                    - rastrigin
                    - quadratic
                  example: sphere
                x:
                  type: array
                  items:
                    type: number
                  description: Point at which to evaluate the Hessian
                  example:
                    - 2
                    - 3
                h:
                  type: number
                  description: Step size for finite difference
                  default: 0.00001
                  example: 0.00001
            example:
              func_name: sphere
              x:
                - 2
                - 3
              h: 0.00001
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      function:
                        type: string
                        example: sphere
                      x:
                        type: array
                        items:
                          type: number
                        example:
                          - 2
                          - 3
                      hessian:
                        type: array
                        items:
                          type: array
                          items:
                            type: number
                        description: >-
                          Hessian matrix (n x n symmetric matrix of second
                          derivatives)
                        example:
                          - - 2
                            - 0
                          - - 0
                            - 2
              example:
                success: true
                data:
                  function: sphere
                  x:
                    - 2
                    - 3
                  hessian:
                    - - 2
                      - 0
                    - - 0
                      - 2
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientTierError'
        '422':
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientTierError:
      description: API tier insufficient for this endpoint
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Endpoint requires Basic tier or higher
  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

````