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

# FFT-based Convolution

> Convolve two sequences using FFT, which is more efficient than direct convolution for long sequences (O(n log n) vs O(n^2)). Convolution is fundamental in signal processing, filtering, polynomial multiplication, and probability distribution calculations. Returns the convolution of sequences a and b. [Tier: BASIC, Credits: 1]



## OpenAPI

````yaml api-specs/numerical.json post /quantlib/numerical/fft/convolve
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/fft/convolve:
    post:
      tags:
        - quantlib-numerical
      summary: FFT-based Convolution
      description: >-
        Convolve two sequences using FFT, which is more efficient than direct
        convolution for long sequences (O(n log n) vs O(n^2)). Convolution is
        fundamental in signal processing, filtering, polynomial multiplication,
        and probability distribution calculations. Returns the convolution of
        sequences a and b. [Tier: BASIC, Credits: 1]
      operationId: fft_convolve
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - a
                - b
              properties:
                a:
                  type: array
                  items:
                    type: number
                  description: First input sequence
                  example:
                    - 1
                    - 2
                    - 3
                b:
                  type: array
                  items:
                    type: number
                  description: Second input sequence
                  example:
                    - 0.5
                    - 1
                    - 0.5
            example:
              a:
                - 1
                - 2
                - 3
              b:
                - 0.5
                - 1
                - 0.5
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      result:
                        type: array
                        items:
                          type: number
                        description: Convolution result (length = len(a) + len(b) - 1)
                        example:
                          - 0.5
                          - 2
                          - 4
                          - 4
                          - 1.5
                      length:
                        type: integer
                        description: Length of convolution result
                        example: 5
              example:
                success: true
                data:
                  result:
                    - 0.5
                    - 2
                    - 4
                    - 4
                    - 1.5
                  length: 5
        '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

````