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

# Monte Carlo Auction Simulation

> Run large-scale Monte Carlo simulation of auctions to estimate average revenue and variance. Randomly draws valuations from specified distribution (default: uniform), runs auctions with equilibrium bidding, and aggregates results. Returns mean and standard deviation of revenue across simulations. Use for empirical revenue analysis, validating theoretical predictions, and risk assessment. [Tier: STANDARD, Credits: 2]



## OpenAPI

````yaml api-specs/economics.json post /quantlib/economics/auctions/simulate
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Economics
  description: >-
    Economics module endpoints for FinceptQuantLib API - general equilibrium,
    game theory, auctions, and utility functions
  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-economics
    description: >-
      Economics module - general equilibrium, game theory, auctions, and utility
      theory
    x-displayName: Economics
paths:
  /quantlib/economics/auctions/simulate:
    post:
      tags:
        - quantlib-economics
      summary: Monte Carlo Auction Simulation
      description: >-
        Run large-scale Monte Carlo simulation of auctions to estimate average
        revenue and variance. Randomly draws valuations from specified
        distribution (default: uniform), runs auctions with equilibrium bidding,
        and aggregates results. Returns mean and standard deviation of revenue
        across simulations. Use for empirical revenue analysis, validating
        theoretical predictions, and risk assessment. [Tier: STANDARD, Credits:
        2]
      operationId: simulate_auctions_quantlib_economics_auctions_simulate_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - auction_type
                - n_bidders
              properties:
                auction_type:
                  type: string
                  description: Type of auction mechanism
                  enum:
                    - first_price
                    - second_price
                    - all_pay
                  example: first_price
                n_bidders:
                  type: integer
                  description: Number of bidders per auction
                  minimum: 2
                  example: 3
                n_simulations:
                  type: integer
                  description: Number of auction simulations to run
                  minimum: 1
                  default: 10000
                  example: 10000
                value_dist:
                  type: string
                  description: Distribution for bidder valuations
                  enum:
                    - uniform
                  default: uniform
                  example: uniform
                seed:
                  type: integer
                  description: Random seed for reproducibility
                  example: 42
                  default: 42
            example:
              auction_type: first_price
              n_bidders: 3
              n_simulations: 10000
              value_dist: uniform
              seed: 42
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      auction_type:
                        type: string
                        description: Auction format simulated
                        example: first_price
                      n_simulations:
                        type: integer
                        description: Number of simulations completed
                        example: 10000
                      average_revenue:
                        type: number
                        description: Mean revenue across all simulations
                        example: 0.5002
                      std_revenue:
                        type: number
                        description: Standard deviation of revenue
                        example: 0.1923
              example:
                success: true
                data:
                  auction_type: first_price
                  n_simulations: 10000
                  average_revenue: 0.5002
                  std_revenue: 0.1923
        '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
              example:
                detail:
                  - loc:
                      - body
                      - n_simulations
                    msg: ensure this value is greater than 0
                    type: value_error.number.not_gt
      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

````