Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Building Monte Carlo Simulations

ASecurity

Constructs Monte Carlo simulation frameworks with variance reduction and convergence analysis. Use when building MC simulations, implementing variance reduction, or assessing simulation accuracy.

22 stars
0 votes
0 copies
0 views
Added 9/20/2026
businessgoawstestinggit

Works with

terminal

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add lev-os/agents --skill building-monte-carlo-simulations --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Building Monte Carlo Simulations?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Building Monte Carlo Simulations
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lev-os-building-monte-carlo-simulations/badge)](https://www.skillsdirectory.com/skills/lev-os-building-monte-carlo-simulations)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: building-monte-carlo-simulations
description: Constructs Monte Carlo simulation frameworks with variance reduction and convergence analysis. Use when building MC simulations, implementing variance reduction, or assessing simulation accuracy.
tags:
  - modeling
  - quantitative-finance
metadata:
  author: casemark
  practice_areas:
    - Derivatives
    - Quantitative Analysis
    - Structured Products
  document_types:
    - Model
  skill_modes:
    - Modeling
---
# Building Monte Carlo Simulations

## When To Use

- Pricing path-dependent derivatives (Asian options, barrier options, lookbacks) where closed-form solutions are unavailable or unreliable
- Valuing structured products with complex payoff profiles, callable features, or multi-asset underlyings
- Estimating portfolio VaR/CVaR distributions under fat-tailed or correlated scenarios
- Modeling credit exposure profiles (PFE, EPE, EE) for counterparty risk
- Stress-testing structured note payoffs across thousands of market scenarios
- Validating or benchmarking analytical pricing models against simulation-based estimates

## Inputs To Gather

- **Underlying dynamics**: Stochastic process specification (GBM, Heston, SABR, local vol, jump-diffusion) with calibrated parameters (vol surface, mean-reversion speed, vol-of-vol, correlation matrix)
- **Payoff definition**: Terminal vs. path-dependent; barrier levels, averaging windows, autocall triggers, coupon schedules
- **Market data**: Spot prices, yield curves (OIS, SOFR), dividend schedules, credit spreads, FX rates as of valuation date
- **Simulation parameters**: Number of paths (N), time steps per path (M), time horizon, random seed policy
- **Variance reduction goals**: Target standard error, acceptable runtime budget, whether antithetic/control variate baselines exist
- **Discounting convention**: Risk-neutral vs. real-world measure; deterministic vs. stochastic rates [VERIFY: confirm measure and curve choice with desk]

## Workflow

1. **Specify the stochastic model**
   - Select the SDE(s) governing each risk factor (equity, rate, credit, FX)
   - Confirm calibration inputs: implied vol surface, correlation matrix, mean-reversion parameters
   - For multi-factor models, define the correlation structure and any factor reduction (PCA truncation)

2. **Design the path generation engine**
   - Choose discretization scheme: Euler-Maruyama for simple diffusions, Milstein or QE (quadratic-exponential) for Heston, log-Euler for GBM
   - Set time-step granularity — finer steps for barrier monitoring, coarser for vanilla European payoffs
   - Generate correlated normals via Cholesky decomposition of the correlation matrix
   - Implement random number generation with reproducible seeding (Mersenne Twister or Sobol sequences for quasi-MC)

3. **Implement variance reduction techniques**
   - **Antithetic variates**: Mirror each standard normal draw; halves variance for monotone payoffs at negligible cost
   - **Control variates**: Use a correlated instrument with known analytical price (e.g., vanilla European as control for an Asian option); estimate optimal beta coefficient from pilot run
   - **Importance sampling**: Shift drift to concentrate paths in the region that drives payoff variance (useful for deep OTM options or rare default scenarios)
   - **Stratified sampling**: Partition the uniform space into equal-probability strata; draw one sample per stratum to eliminate clustering
   - **Quasi-random sequences** (Sobol, Halton): Replace pseudo-random draws for faster convergence (O(1/N) vs. O(1/sqrt(N))); apply Brownian bridge construction to concentrate low-discrepancy benefit on key time steps

4. **Compute payoffs and discount**
   - Evaluate the payoff function along each simulated path (handle path-dependency: running max/min, arithmetic average, barrier crossings)
   - Discount each path payoff to valuation date using the appropriate curve
   - For American/Bermudan exercise, implement Longstaff-Schwartz (least-squares MC) regression at each exercise date

5. **Assess convergence and accuracy**
   - Compute sample mean and standard error: SE = sample_std / sqrt(N)
   - Build 95% and 99% confidence intervals around the price estimate
   - Run convergence diagnostics: plot price estimate vs. N; confirm SE decays at expected rate
   - Compare against closed-form benchmarks where available (Black-Scholes for vanillas, Heston semi-analytical for Europeans)
   - If SE exceeds tolerance, increase N or layer additional variance reduction before reporting

6. **Compute Greeks via simulation**
   - **Bump-and-reprice**: Shift each input parameter (spot, vol, rate) by a small delta; re-run simulation with same random seeds; finite-difference the prices
   - **Pathwise (IPA) method**: Differentiate the payoff along each path analytically for smooth payoffs — faster and lower variance than bump-and-reprice
   - **Likelihood ratio method**: For discontinuous payoffs (digitals, barriers) where pathwise fails
   - Report delta, gamma, vega, rho, theta with associated standard errors

## Output

- **Price estimate** with standard error, confidence interval, and number of paths used
- **Greeks table**: Delta, gamma, vega, rho, theta (with SEs) for each relevant risk factor
- **Convergence report**: SE vs. N plot, variance reduction efficiency ratios (variance with/without each technique)
- **Model specification summary**: SDE choice, discretization scheme, calibration inputs, time-step count
- **Assumptions and limitations log**: Which simplifications were made (constant rates, flat dividend yield, no jumps), and their expected impact on accuracy

## Quality Checks

- Confirm the simulation reproduces known analytical prices for vanilla test cases within 2 SEs
- Verify put-call parity holds (for European-style instruments) across simulated prices
- Check that antithetic/control variate application actually reduces SE (compare with and without)
- Validate that increasing N by 4x roughly halves the standard error (confirms sqrt(N) convergence)
- Ensure correlation matrix is positive semi-definite before Cholesky decomposition; flag and correct if not
- For barrier options, confirm that finer time steps reduce barrier-crossing bias (continuity correction applied where appropriate) [VERIFY: barrier monitoring frequency vs. contractual observation dates]
- Cross-check Greeks against analytical Greeks or trader intuition for sign and magnitude
- Confirm random seed reproducibility: identical seeds produce identical prices across runs

Attribution

lev-oslev-os
View sourceMore from lev-os →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Stock Analysis

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), and periodic performance reports (daily/weekly/monthly/quarterly/yearly). 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes
View all in business →