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

# Heston Monte Carlo Option Pricing

> Price options using Monte Carlo simulation with the Heston stochastic volatility model. Simulates correlated paths for both asset price and variance, providing option prices with confidence intervals. Use this for path-dependent options, American options, or when comparing with analytical Heston prices. Returns price, standard error, and 95% confidence interval. [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/models.json post /quantlib/models/heston/monte-carlo
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Models
  description: >-
    Advanced financial modeling module for short rate models, stochastic
    volatility, jump-diffusion processes, and local volatility models. Pro Tier
    required (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-models
    description: >-
      Advanced financial modeling including short rate models, stochastic
      volatility, jump-diffusion, and local volatility models
    x-displayName: Models
paths:
  /quantlib/models/heston/monte-carlo:
    post:
      tags:
        - quantlib-models
      summary: Heston Monte Carlo Option Pricing
      description: >-
        Price options using Monte Carlo simulation with the Heston stochastic
        volatility model. Simulates correlated paths for both asset price and
        variance, providing option prices with confidence intervals. Use this
        for path-dependent options, American options, or when comparing with
        analytical Heston prices. Returns price, standard error, and 95%
        confidence interval. [Tier: ENTERPRISE, Credits: 10]
      operationId: heston_mc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - S0
                - v0
                - r
                - kappa
                - theta
                - sigma_v
                - rho
                - strike
                - T
              properties:
                S0:
                  type: number
                  description: Current asset price
                v0:
                  type: number
                  description: Initial variance
                r:
                  type: number
                  description: Risk-free rate (annualized)
                kappa:
                  type: number
                  description: Variance mean reversion speed
                theta:
                  type: number
                  description: Long-term variance
                sigma_v:
                  type: number
                  description: Volatility of variance
                rho:
                  type: number
                  description: Stock-variance correlation
                strike:
                  type: number
                  description: Option strike price
                T:
                  type: number
                  description: Time to maturity in years
                option_type:
                  type: string
                  enum:
                    - call
                    - put
                  default: call
                  description: Option type
                n_paths:
                  type: integer
                  default: 10000
                  description: >-
                    Number of Monte Carlo paths. More paths = higher accuracy.
                    Recommended: 10000+
                n_steps:
                  type: integer
                  default: 252
                  description: Time steps per path (e.g., 252 for daily steps in 1 year)
                seed:
                  type: integer
                  nullable: true
                  description: Random seed for reproducibility
              example:
                S0: 100
                v0: 0.04
                r: 0.05
                kappa: 2
                theta: 0.04
                sigma_v: 0.3
                rho: -0.7
                strike: 100
                T: 0.5
                option_type: call
                n_paths: 50000
                n_steps: 126
                seed: 123
      responses:
        '200':
          description: Successfully simulated Heston option price
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      price:
                        type: number
                        description: Monte Carlo option price
                      std_error:
                        type: number
                        description: Standard error of the MC estimate
                      confidence_interval:
                        type: array
                        items:
                          type: number
                        description: 95% confidence interval [lower, upper]
                      n_paths:
                        type: integer
                    example:
                      price: 5.23
                      std_error: 0.04
                      confidence_interval:
                        - 5.15
                        - 5.31
                      n_paths: 50000
        '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 credits to complete the request
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: >-
                  Insufficient credits. This endpoint requires 5 credits.
                  Current balance: 2 credits.
    ValidationError:
      description: Request validation failed
      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
                  - kappa
                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

````