forecasting-agent
# Portfolio Forecasting Agent
What this skill does
# Portfolio Forecasting Agent
**Version**: 1.0.0
**Category**: Financial Analysis / Portfolio Management
**Author**: Claude Code
**Last Updated**: November 22, 2025
## Overview
Advanced portfolio forecasting system with multi-year projections, Monte Carlo simulations, tax planning, and comprehensive risk analysis. Designed for active trading portfolios with frequent position turnover.
## Features
### 1. **Multi-Year Projections**
- 3-year and 5-year forward projections
- Three scenarios: Conservative, Baseline, Aggressive
- Monthly and quarterly breakdowns
- Compound growth modeling
- Tax-adjusted projections
### 2. **Monte Carlo Simulations**
- 1,000+ path simulations
- Probabilistic outcome distributions
- Milestone probability calculations
- Risk of ruin analysis
- Confidence intervals (50%, 95%, 99%)
### 3. **Tax Forecasting**
- Quarterly tax reserve calculations
- Federal + state tax obligations
- Multi-state comparison (NY vs FL/TX)
- Estimated payment schedules
- Tax-optimized withdrawal strategies
### 4. **Risk Analysis**
- Maximum drawdown calculations
- Monthly volatility metrics
- Sharpe ratio approximations
- Sensitivity analysis
- Scenario stress testing
### 5. **Report Generation**
- Professional PDF reports (LaTeX)
- Markdown analysis documents
- CSV data exports
- Interactive dashboards
- Google Drive integration
## Usage
### Quick 3-Year Projection
```bash
/forecast-portfolio
```
**Output**:
- 3-year baseline projection
- Monthly and quarterly breakdowns
- Tax reserve schedules
- Markdown summary report
### Full 5-Year Analysis
```bash
/forecast-5year
```
**Output**:
- 5-year projection (all scenarios)
- Monte Carlo simulation (1,000 paths)
- Risk analysis
- Tax planning
- LaTeX PDF report
### Monte Carlo Only
```bash
/forecast-monte-carlo --paths 1000 --months 60
```
**Output**:
- 1,000 simulation paths
- Percentile distributions
- Milestone probabilities
- Risk metrics
### Sensitivity Analysis
```bash
/forecast-sensitivity --win-rate 80-95 --return 2-5
```
**Output**:
- Win rate impact table
- Return variance analysis
- Parameter sensitivity charts
- Optimal parameter identification
### Tax Forecasting
```bash
/forecast-tax --years 5 --state NY
```
**Output**:
- Quarterly tax obligations
- Federal + state breakdown
- Payment schedule
- Multi-state comparisons
## Configuration
### Parameter File
Location: `~/projects/portfolio/PORTFOLIO_PARAMETERS_COMPLETE.yaml`
**Key Parameters**:
```yaml
trading:
return_per_trade:
all_time_avg: 3.58 # % per trade
win_rate:
actual: 90.0 # %
trade_frequency:
trades_per_month:
conservative: 17
baseline: 18.5
aggressive: 20
account:
initial_capital: 2000 # $
monthly_deposits: 500 # $
tax:
quarterly_extraction_pct: 37.0 # %
```
### Scenarios
#### Conservative (17 trades/month)
- Lower trade frequency
- More defensive posture
- Realistic for part-time trading
- Final balance: $10.8M (5 years)
#### Baseline (18.5 trades/month)
- Historical average
- Sustainable frequency
- Default scenario
- Final balance: $8.98B (5 years)
#### Aggressive (20 trades/month)
- Maximum trade frequency
- Requires full-time focus
- Optimistic projections
- Final balance: $647B (5 years)
## Key Calculations
### Monthly Compounding
```
Monthly Return = (1 + Return_Per_Trade)^Trades_Per_Month - 1
Example (Baseline):
= (1 + 0.0358)^18.5 - 1
= 1.9096 - 1
= 90.96% per month
```
### Tax Reserve Extraction
```
Quarterly Gains = Ending_Balance - Starting_Balance - Deposits
Tax Reserve = Quarterly_Gains × 0.37
Portfolio Retained = Quarterly_Gains × 0.63
```
### Monte Carlo Simulation
```python
for each path:
for each month:
for each trade:
if random() < win_rate:
balance *= (1 + avg_winner%)
else:
balance *= (1 + avg_loser%)
balance += monthly_deposit
```
## Output Formats
### 1. Monthly Projection CSV
**Columns**:
- Month, Year, Quarter
- Starting Balance, Ending Balance
- Gains This Month
- Tax Extracted (37%)
- Deposit
- Cumulative Gains/Taxes
- Tax Reserve Account
### 2. Quarterly Summary CSV
**Columns**:
- Quarter (Y1Q1, Y1Q2, etc.)
- Starting Balance
- Deposits (3 months)
- Gains, Tax Reserved, Net Gains
- Ending Balance
- Tax Reserve Account
### 3. Monte Carlo Results JSON
**Fields**:
- `final_balance`: {mean, median, std, percentiles}
- `milestones`: {1M, 10M, 100M, 500M, 1B} probabilities
- `risk_metrics`: {risk_of_ruin, prob_profit}
- `all_paths`: Array of all simulation paths
### 4. LaTeX Report (PDF)
**Sections**:
- Executive Summary
- Methodology
- Scenario Projections (tables)
- Monte Carlo Analysis (charts)
- Risk Analysis
- Tax Planning
- Recommendations
## Integration Points
### With Trading Analysis
```
Trading CSV → Edge Analysis → Win Rate / Avg Return
↓
(Feed to forecasting)
- Use actual metrics
- Historical validation
- Baseline calibration
```
### With Tax Planning
```
Forecast Results → Quarterly Gains → Tax Obligations
↓
(Generate payment schedule)
- 1040-ES forms
- Quarterly deadlines
- Reserve account
```
### With Portfolio Analysis
```
Forecasts + Actuals → Track Performance → Identify Deviations
↓
(Adjust parameters monthly)
- Recalibrate projections
- Update assumptions
- Revise targets
```
## Assumptions
### Trading Assumptions
- Consistent daily returns at expected average
- Win rate maintained over time (90%)
- No catastrophic losses (5% stops enforced)
- Position sizing controlled (10% max)
- Deposits on schedule ($500/month)
### Market Assumptions
- 20 trading days per month
- No extended market closures
- Liquidity sufficient for all positions
- No systematic regime changes
### Tax Assumptions
- 37% federal reserve adequate
- Quarterly extraction on schedule
- No wash sale violations
- Short-term capital gains treatment
## Limitations
1. **Historical Performance**: Past results don't guarantee future performance
2. **Perfect Execution**: Assumes no slippage or missed trades
3. **No Black Swans**: Doesn't model extreme market events
4. **Linear Scaling**: Assumes edge persists at all capital levels
5. **No Capacity Constraints**: Ignores liquidity limits
## Risk Warnings
### Exponential Growth Projections
- Year 3-5 projections are theoretical upper bounds
- Compounding assumptions may not hold indefinitely
- Market capacity constraints will limit growth
- Regulatory/tax changes not modeled
### Position Sizing Critical
- Current 75% position sizing is unsustainable
- Must reduce to 10% max (per recommendations)
- Single bad trade can wipe out gains
- Risk management discipline essential
### Tax Compliance Required
- Quarterly extraction must be disciplined
- Missing payments incurs penalties
- State tax varies significantly (NY vs FL)
- Professional CPA engagement recommended
## Examples
### Example 1: 3-Year Baseline Projection
**Input**: 18.5 trades/month at 3.58% average return
**Output**:
```
Year 1: $5.2M (from $2K + $6K deposits)
Year 2: $50B
Year 3: $3.2T
Tax Reserves: $800B (extracted quarterly)
Liquid Net Worth: $4.0T (portfolio + reserves)
```
### Example 2: Monte Carlo (1,000 paths, 5 years)
**Input**: Same parameters, 1,000 simulations
**Output**:
```
Median Final Balance: $1.01B
95% Confidence Interval: $36.6M - $11.5B
Milestone Probabilities:
- $1M: 99.9%
- $100M: 96.2%
- $1B: 52.3%
Risk of Ruin: 0.0%
Max Drawdown: -8.2% (average)
```
### Example 3: Tax Comparison (NY vs FL)
**Input**: $5M gains in Year 1
**Output**:
```
Federal Tax: $1.85M (37%)
NY State Tax: $537K (10.75%)
Total (NY): $2.39M (47Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.