montecarlo
Runs Monte Carlo simulations to project portfolio income, safety margins, and long-term financial outcomes.
Install
mkdir -p .claude/skills/montecarlo && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5091" && unzip -o skill.zip -d .claude/skills/montecarlo && rm skill.zipInstalls to .claude/skills/montecarlo
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run Monte Carlo simulations for Finance Guru portfolio strategy. USE WHEN user mentions monte carlo OR run simulation OR stress test portfolio OR probability analysis OR income projections OR margin safety analysis. Supports 4-layer portfolio (Growth, Income, Hedge, GOOGL) with auto-detection of current values from Fidelity CSV.Key capabilities
- →Aggregates portfolio position data from CSV files
- →Incorporates custom buy ticket YAML data into projections
- →Computes 5th percentile margin call probability
- →Outputs JSON, full CSV, and Excel analysis reports
How it works
Orchestrates dedicated workflow scripts that parse local CSV positions and YAML tickets to run 10,000 market iterations against a 4-layer model.
Inputs & outputs
When to use montecarlo
- →Run portfolio stress test
- →Project income probability
- →Analyze margin safety
- →Simulate portfolio outcomes
About this skill
MonteCarlo
Monte Carlo simulation engine for Finance Guru's 4-layer dividend income + margin living strategy. Runs 10,000 market scenarios to project income probabilities, margin safety, and portfolio outcomes over 28 months.
Workflow Routing
| Workflow | Trigger | File |
|---|---|---|
| RunSimulation | "run monte carlo", "simulate portfolio", "stress test" | workflows/RunSimulation.md |
| IncorporateBuyTicket | "include buy ticket", "add ticket to simulation" | workflows/IncorporateBuyTicket.md |
Examples
Example 1: Run standard Monte Carlo simulation
User: "Run the monte carlo simulation with current portfolio"
-> Invokes RunSimulation workflow
-> Auto-detects portfolio values from notebooks/updates/Portfolio_Positions_*.csv
-> Runs 10,000 scenarios with v3.0 4-layer model
-> Outputs JSON summary + full CSV + Excel to fin-guru-private/fin-guru/analysis/
Example 2: Incorporate a buy ticket into simulation
User: "Run monte carlo with my new buy ticket from 12-31"
-> Invokes IncorporateBuyTicket workflow
-> Reads buy ticket from fin-guru-private/fin-guru/tickets/buy-ticket-2025-12-31-*.md
-> Parses YAML frontmatter + Execution Summary table from the canonical ticket format
-> Adjusts starting portfolio values based on ticket allocations
-> Runs simulation with updated positions
Example 3: Stress test margin safety
User: "What's my margin call probability?"
-> Invokes RunSimulation workflow
-> Focuses on margin_call_rate and margin_ratio metrics
-> Reports 5th percentile (worst case) margin ratio
Key Metrics Produced
Success Metrics
- P($100k income) - Probability of reaching $100k annual dividend income
- P($75k income) - Probability of reaching $75k annual dividend income
- P($50k income) - Probability of reaching $50k annual dividend income
- Margin call rate - % of scenarios triggering margin call (<3:1 ratio)
- Backstop usage rate - % of scenarios requiring business income injection
Portfolio Metrics
- Total portfolio value - Median, P5, P95 at month 28
- Layer 1 (Growth) - PLTR, TSLA, VOO, etc. (no new deployment)
- Layer 2 (Income) - Dividend funds ($11,517/month deployment)
- Layer 3 (Hedge) - SQQQ ($800/month deployment)
- GOOGL position - Scale-in ($1,000/month deployment)
Risk Metrics
- Margin ratio - Portfolio / Margin debt (must stay >3:1)
- Max drawdown - Worst peak-to-trough decline
- Break-even timing - When dividends cover margin draws
Output Files
All outputs saved to fin-guru-private/fin-guru/analysis/:
monte-carlo-v3-{date}.json- Summary statisticsmonte-carlo-v3-full-results-{date}.csv- All 10,000 scenariosmonte-carlo-v3-analysis-{date}.xlsx- Excel workbook with charts
Configuration
Simulation parameters are set in fin-guru-private/strategies/dividend_margin_monte_carlo.py:
- Starting portfolio values (auto-detected or manual)
- Monthly deployment amounts
- Bucket allocations and yields
- Margin schedule
- Market regime probabilities
Model Version
v3.0 (Jan 2026) - Full 4-layer portfolio:
- Layer 1: Growth portfolio (market returns only, no new deployment)
- Layer 2: Income portfolio (5-bucket dividend allocation)
- Layer 3: Hedge (SQQQ for crisis protection)
- GOOGL: Scale-in position (diverted from Layer 2)
Fixes applied:
- Floor at $0 for all positions (stocks can't go negative)
- Full portfolio margin ratio (all layers count toward Fidelity margin)
- Correct starting values from Fidelity CSV
When not to use it
- →Analyzing single stocks outside a portfolio context
- →Performing real-time trade execution
Prerequisites
Limitations
- →Limited to the 4-layer portfolio model
- →Fixed 28-month projection window
How it compares
Bypasses manual spreadsheet modeling by automating data ingestion and batch simulation runs.
Compared to similar skills
montecarlo side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| montecarlo (this skill) | 1 | 3mo | No flags | Intermediate |
| quant-analyst | 103 | 2mo | No flags | Advanced |
| stock-analyzer | 71 | 2mo | Review | Beginner |
| pair-trade-screener | 11 | 1mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by AojdevStudio
View all by AojdevStudio →You might also like
quant-analyst
zenobi-us
Expert quantitative analyst specializing in financial modeling, algorithmic trading, and risk analytics. Masters statistical methods, derivatives pricing, and high-frequency trading with focus on mathematical rigor, performance optimization, and profitable strategy development.
stock-analyzer
FrancyJGLisboa
Provides comprehensive technical analysis for stocks and ETFs using RSI, MACD, Bollinger Bands, and other indicators. Activates when user requests stock analysis, technical indicators, trading signals, or market data for specific ticker symbols.
pair-trade-screener
tradermonty
Statistical arbitrage tool for identifying and analyzing pair trading opportunities. Detects cointegrated stock pairs within sectors, analyzes spread behavior, calculates z-scores, and provides entry/exit recommendations for market-neutral strategies. Use when user requests pair trading opportunities, statistical arbitrage screening, mean-reversion strategies, or market-neutral portfolio construction. Supports correlation analysis, cointegration testing, and spread backtesting.
risk-metrics-calculation
wshobson
Calculate portfolio risk metrics including VaR, CVaR, Sharpe, Sortino, and drawdown analysis. Use when measuring portfolio risk, implementing risk limits, or building risk monitoring systems.
backtesting-trading-strategies
jeremylongshore
Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".
model-usage
openclaw
Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.