monte-carlo-simulator — Claude Code command: run Monte Carlo
A slash command that runs Monte Carlo simulations: probability distributions, confidence intervals and risk metrics.
npx claude-code-templates@latest --command simulation/monte-carlo-simulatorWhat monte-carlo-simulator does
monte-carlo-simulator ships in the davila7/claude-code-templates collection and runs a Monte Carlo simulation on whatever you point it at. Give it a target — financial projections, project timelines, market scenarios or risk assessment — and it identifies the uncertain parameters, picks probability distributions and models correlations between them.
The workflow has six stages: variable definition, a simulation engine with random sampling and convergence checks, output analysis with sensitivity testing, risk quantification through Value at Risk and tail scenarios, outcome clustering, then risk-adjusted recommendations. Latin hypercube sampling, copula modeling, importance sampling and variance reduction are listed among the techniques.
The command is limited to Read, Write, Edit and WebSearch, so it does not execute code — the math happens inside the agent's reasoning. If you need a reproducible numeric run with a fixed seed, that is worth checking before you rely on the output. The target arrives through $ARGUMENTS; leave it empty and the command has nothing to model.
What it helps with
- size the spread of a revenue forecast instead of one number
- estimate project timelines with uncertainty baked in
- run market scenarios and inspect tail outcomes
- get Value at Risk across a set of variables
- see which parameters the result is most sensitive to
Example prompts for the agent
- /monte-carlo-simulator --financial-projections: model next year's revenue from our historical data
- /monte-carlo-simulator --project-timelines: simulate the release date using the team's estimates
- /monte-carlo-simulator --risk-assessment: compute VaR and tail scenarios for this portfolio
How to install monte-carlo-simulator
1claude-code-templates
npx claude-code-templates@latest --command simulation/monte-carlo-simulator2Manually: put the files in place
.claude/commands/monte-carlo-simulator.mdCall it with /monte-carlo-simulator. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/monte-carlo-simulator.mdCall it with /prompts:monte-carlo-simulator. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/monte-carlo-simulator.prompt.mdManually: put the files in place
.gemini/commands/monte-carlo-simulator.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about monte-carlo-simulator
How do I install monte-carlo-simulator in Claude?
Run npx claude-code-templates@latest --command simulation/monte-carlo-simulator. The command lands in .claude/commands/monte-carlo-simulator.md.
What does monte-carlo-simulator do?
It runs a Monte Carlo simulation for the target you pass: it selects distributions for uncertain parameters, computes confidence intervals and Value at Risk, and returns recommendations adjusted for risk.
Which simulation targets are supported?
Financial projections, project timelines, market scenarios and risk assessment, selected with --financial-projections, --project-timelines, --market-scenarios and --risk-assessment.
Source text
monte-carlo-simulator.md · MIT
--- allowed-tools: Read, Write, Edit, WebSearch argument-hint: "[simulation-target] | --financial-projections | --project-timelines | --market-scenarios | --risk-assessment" description: Run Monte Carlo simulations with probability distributions, confidence intervals, and statistical analysis --- # Monte Carlo Simulator Run comprehensive Monte Carlo simulations with advanced statistical analysis: **$ARGUMENTS** ## Current Analysis Context - Simulation target: Based on $ARGUMENTS (financial projections, project timelines, market scenarios, risk assessment) - Key variables: Uncertain parameters that drive outcome variability - Available data: Historical data, expert estimates, and probability distributions - Decision requirements: Confidence levels and risk tolerance for decision-making ## Task Execute sophisticated Monte Carlo simulations with comprehensive uncertainty quantification: **Simulation Target**: Use $ARGUMENTS to simulate financial projections, project timelines, market scenarios, or risk assessments **Monte Carlo Framework**: 1. **Variable Definition** - Uncertain parameter identification, probability distribution selection, and correlation modeling 2. **Simulation Engine** - Random sampling, scenario generation, and statistical convergence analysis 3. **Output Analysis** - Probability distributions, confidence intervals, and sensitivity analysis 4. **Risk Quantification** - Value at Risk (VaR), extreme scenario analysis, and tail risk assessment 5. **Scenario Clustering** - Pattern recognition, outcome categorization, and decision-relevant grouping 6. **Decision Integration** - Risk-adjusted recommendations, optimization strategies, and contingency planning **Advanced Features**: Latin hypercube sampling, copula modeling, importance sampling, and variance reduction techniques. **Statistical Rigor**: Convergence testing, goodness-of-fit validation, and robust statistical inference with comprehensive uncertainty bounds. **Output**: Complete Monte Carlo analysis with probability distributions, risk metrics, scenario analysis, and statistically-grounded decision recommendations with quantified confidence levels.
© davila7 · MIT · davila7/claude-code-templates