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

# Calibrate Vasicek Short Rate Model

> Calibrate the Vasicek short rate model parameters (a, b, sigma) to match an observed zero rate curve. The Vasicek model is dr = a(b - r)dt + sigma dW, where a is mean reversion speed, b is long-term mean rate, and sigma is volatility. This is a fundamental interest rate model used for derivatives pricing, risk management, and scenario generation. The calibration finds parameters that best fit market rates. Used for interest rate derivatives, ALM, and risk analysis. [Tier: PRO, Credits: 5]



## OpenAPI

````yaml api-specs/solver.json post /quantlib/solver/calibration/vasicek
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Solver
  description: >-
    Solver module endpoints for FinceptQuantLib API. The Solver module (Basic
    Tier, 1 credit per request) provides advanced financial solvers including
    bond analytics (yield, duration, convexity), implied volatility
    calculations, spread computations (Z-spread, ASW, OAS), curve bootstrapping,
    interest rate conversions, and model calibration (Vasicek, CIR). Essential
    for fixed income analysis, derivatives pricing, and risk management.
  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-solver
    description: >-
      Advanced financial solvers for bond analytics, implied volatility, spread
      calculations, and model calibration
    x-displayName: Solver
paths:
  /quantlib/solver/calibration/vasicek:
    post:
      tags:
        - quantlib-solver
      summary: Calibrate Vasicek Short Rate Model
      description: >-
        Calibrate the Vasicek short rate model parameters (a, b, sigma) to match
        an observed zero rate curve. The Vasicek model is dr = a(b - r)dt +
        sigma dW, where a is mean reversion speed, b is long-term mean rate, and
        sigma is volatility. This is a fundamental interest rate model used for
        derivatives pricing, risk management, and scenario generation. The
        calibration finds parameters that best fit market rates. Used for
        interest rate derivatives, ALM, and risk analysis. [Tier: PRO, Credits:
        5]
      operationId: calibrate_vasicek
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - zero_rates
                - times
              properties:
                zero_rates:
                  type: array
                  description: Array of zero rates observed in the market
                  items:
                    type: number
                  example:
                    - 0.02
                    - 0.025
                    - 0.03
                    - 0.035
                    - 0.04
                    - 0.042
                times:
                  type: array
                  description: Array of times corresponding to each zero rate
                  items:
                    type: number
                  example:
                    - 0.5
                    - 1
                    - 2
                    - 3
                    - 5
                    - 7
                initial_a:
                  type: number
                  description: Initial guess for mean reversion speed parameter
                  default: 0.1
                  example: 0.1
                initial_b:
                  type: number
                  description: Initial guess for long-term mean rate parameter
                  default: 0.05
                  example: 0.05
                initial_sigma:
                  type: number
                  description: Initial guess for volatility parameter
                  default: 0.01
                  example: 0.01
            example:
              zero_rates:
                - 0.02
                - 0.025
                - 0.03
                - 0.035
                - 0.04
                - 0.042
              times:
                - 0.5
                - 1
                - 2
                - 3
                - 5
                - 7
              initial_a: 0.1
              initial_b: 0.05
              initial_sigma: 0.01
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      a:
                        type: number
                        description: Calibrated mean reversion speed
                        example: 0.095
                      b:
                        type: number
                        description: Calibrated long-term mean rate
                        example: 0.048
                      sigma:
                        type: number
                        description: Calibrated volatility
                        example: 0.012
                      error:
                        type: number
                        description: Calibration error (sum of squared residuals)
                        example: 0.00023
              example:
                success: true
                data:
                  a: 0.095
                  b: 0.048
                  sigma: 0.012
                  error: 0.00023
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientTierError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
      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

````