
Portfolio Manager
- 1.4k installs
- 2.5k repo stars
- Updated July 26, 2026
- tradermonty/claude-trading-skills
portfolio-manager is an agent skill for manage multi-asset portfolios with allocation, rebalancing, and risk metrics.
About
The portfolio-manager skill is designed for manage multi-asset portfolios with allocation, rebalancing, and risk metrics. Generate detailed portfolio reports with actionable insights. This skill leverages Alpaca's brokerage API through MCP (Model Context Protocol) to access live portfolio data, ensuring analysis is based on actual current positions rather than manually entered data. Invoke when the user manages portfolio allocation, rebalancing, or multi-asset risk metrics.
- "Analyze my portfolio".
- "Review my current positions".
- "What's my asset allocation?".
- "Check my portfolio risk".
- "Should I rebalance my portfolio?".
Portfolio Manager by the numbers
- 1,389 all-time installs (skills.sh)
- +53 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #97 of 1,136 Finance & Trading skills by installs in the Skillselion catalog
- Security screen: HIGH risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
portfolio-manager capabilities & compatibility
- Capabilities
- "analyze my portfolio" · "review my current positions" · "what's my asset allocation?" · "check my portfolio risk"
What portfolio-manager says it does
Comprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual stock positions, diver
Comprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual st
npx skills add https://github.com/tradermonty/claude-trading-skills --skill portfolio-managerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.4k |
|---|---|
| repo stars | ★ 2.5k |
| Security audit | 2 / 3 scanners passed |
| Last updated | July 26, 2026 |
| Repository | tradermonty/claude-trading-skills ↗ |
How do I manage multi-asset portfolios with allocation, rebalancing, and risk metrics?
Manage multi-asset portfolios with allocation, rebalancing, and risk metrics.
Who is it for?
Quantitative traders tracking portfolio weights, drawdown, and rebalance rules.
Skip if: Skip for single-stock research without portfolio construction scope.
When should I use this skill?
User manages portfolio allocation, rebalancing, or multi-asset risk metrics.
What you get
Completed portfolio-manager workflow with documented commands, files, and expected deliverables.
- portfolio analysis report
- rebalancing recommendations
- risk and performance metrics
Files
Portfolio Manager
Overview
Analyze and manage investment portfolios by integrating with Alpaca MCP Server to fetch real-time holdings data, then performing comprehensive analysis covering asset allocation, diversification, risk metrics, individual position evaluation, and rebalancing recommendations. Generate detailed portfolio reports with actionable insights.
This skill leverages Alpaca's brokerage API through MCP (Model Context Protocol) to access live portfolio data, ensuring analysis is based on actual current positions rather than manually entered data.
When to Use
Invoke this skill when the user requests:
- "Analyze my portfolio"
- "Review my current positions"
- "What's my asset allocation?"
- "Check my portfolio risk"
- "Should I rebalance my portfolio?"
- "Evaluate my holdings"
- "Portfolio performance review"
- "What stocks should I buy or sell?"
- Any request involving portfolio-level analysis or management
Prerequisites
Alpaca MCP Server Setup
This skill requires Alpaca MCP Server to be configured and connected. The MCP server provides access to:
- Current portfolio positions
- Account equity and buying power
- Historical positions and transactions
- Market data for held securities
MCP Server Tools Used:
get_account_info- Fetch account equity, buying power, cash balanceget_positions- Retrieve all current positions with quantities, cost basis, market valueget_portfolio_history- Historical portfolio performance data- Market data tools for price quotes and fundamentals
If Alpaca MCP Server is not connected, inform the user and provide setup instructions from references/alpaca_mcp_setup.md.
Workflow
Step 1: Fetch Portfolio Data via Alpaca MCP or REST fallback
Use Alpaca MCP Server tools to gather current portfolio information when available. In scheduled Hermes jobs, MCP tools may not be exposed even when Alpaca credentials are present; in that case, use the Alpaca REST API directly with ALPACA_API_KEY, ALPACA_SECRET_KEY, and ALPACA_PAPER.
1.1 Get Account Information:
Preferred: use mcp__alpaca__get_account_info to fetch:
- Account equity (total portfolio value)
- Cash balance
- Buying power
- Account status
Fallback REST endpoints:
- paper: https://paper-api.alpaca.markets/v2/account
- live: https://api.alpaca.markets/v2/account
Headers:
- APCA-API-KEY-ID=$ALPACA_API_KEY
- APCA-API-SECRET-KEY=$ALPACA_SECRET_KEY1.2 Get Current Positions:
Preferred: use mcp__alpaca__get_positions to fetch all holdings:
- Symbol ticker
- Quantity held
- Average entry price (cost basis)
- Current market price
- Current market value
- Unrealized P&L ($ and %)
- Position size as % of portfolio
Fallback REST endpoints:
- paper: https://paper-api.alpaca.markets/v2/positions
- live: https://api.alpaca.markets/v2/positions1.3 Get Portfolio History (Optional):
Preferred: use mcp__alpaca__get_portfolio_history for performance analysis:
- Historical equity values
- Time-weighted return calculation
- Drawdown analysis
Fallback REST endpoint:
- /v2/account/portfolio/historyScheduled-job fallback discipline:
- Clearly label the source as
Alpaca REST fallbackrather than MCP. - Use
ALPACA_PAPER=trueto choose paper endpoint; otherwise use live endpoint. - Still validate that long market value plus cash approximately reconciles to equity, and highlight margin/leverage if
long_market_value > equity. - For weekly core portfolio cron jobs, compute exposure using equity as the denominator as well as gross market value:
gross_long_exposure = long_market_value / equity,cash_pct = cash / equity, and explicitly flag margin-funded portfolios when gross exposure is materially above 100% or cash is negative. Do not let sector weights look benign by using only gross-long denominator when the account is levered. - When the request emphasizes dividend holdings or forced-review triggers, build normalized monitor input from the live holdings and hand it to
kanchi-dividend-review-monitorrather than treating dividend review as a narrative-only section. Also build tax-planning input forkanchi-dividend-us-tax-accountingwhen account-location notes are requested; label it degraded if account type or holding-period windows are unavailable.
Data Validation:
- Verify all positions have valid ticker symbols
- Confirm market values sum to approximate account equity
- Check for any stale or inactive positions
- Handle edge cases (fractional shares, options, crypto if supported)
Step 2: Enrich Position Data
For each position in the portfolio, gather additional market data and fundamentals:
2.1 Current Market Data:
- Real-time or delayed price quotes
- Daily volume and liquidity metrics
- 52-week range
- Market capitalization
2.2 Fundamental Data: Use WebSearch or available market data APIs to fetch:
- Sector and industry classification
- Key valuation metrics (P/E, P/B, dividend yield)
- Recent earnings and financial health indicators
- Analyst ratings and price targets
- Recent news and material developments
2.3 Technical Analysis:
- Price trend (20-day, 50-day, 200-day moving averages)
- Relative strength
- Support and resistance levels
- Momentum indicators (RSI, MACD if available)
Step 3: Portfolio-Level Analysis
Perform comprehensive portfolio analysis using frameworks from reference files:
3.1 Asset Allocation Analysis
Read references/asset-allocation.md for allocation frameworks
Analyze current allocation across multiple dimensions:
By Asset Class:
- Equities vs Fixed Income vs Cash vs Alternatives
- Compare to target allocation for user's risk profile
- Assess if allocation matches investment goals
By Sector:
- Technology, Healthcare, Financials, Consumer, etc.
- Identify sector concentration risks
- Compare to benchmark sector weights (e.g., S&P 500)
By Market Cap:
- Large-cap vs Mid-cap vs Small-cap distribution
- Concentration in mega-caps
- Market cap diversification score
By Geography:
- US vs International vs Emerging Markets
- Domestic concentration risk assessment
Output Format:
## Asset Allocation
### Current Allocation vs Target
| Asset Class | Current | Target | Variance |
|-------------|---------|--------|----------|
| US Equities | XX.X% | YY.Y% | +/- Z.Z% |
| ... |
### Sector Breakdown
[Pie chart description or table with sector percentages]
### Top 10 Holdings
| Rank | Symbol | % of Portfolio | Sector |
|------|--------|----------------|--------|
| 1 | AAPL | X.X% | Technology |
| ... |3.2 Diversification Analysis
Read references/diversification-principles.md for diversification theory
Evaluate portfolio diversification quality:
Position Concentration:
- Identify top holdings and their aggregate weight
- Flag if any single position exceeds 10-15% of portfolio
- Calculate Herfindahl-Hirschman Index (HHI) for concentration measurement
Sector Concentration:
- Identify dominant sectors
- Flag if any sector exceeds 30-40% of portfolio
- Compare to benchmark sector diversity
Correlation Analysis:
- Estimate correlation between major positions
- Identify highly correlated holdings (potential redundancy)
- Assess true diversification benefit
Number of Positions:
- Optimal range: 15-30 stocks for individual portfolios
- Flag if under-diversified (<10 stocks) or over-diversified (>50 stocks)
Output:
## Diversification Assessment
**Concentration Risk:** [Low / Medium / High]
- Top 5 holdings represent XX% of portfolio
- Largest single position: [SYMBOL] at XX%
**Sector Diversification:** [Excellent / Good / Fair / Poor]
- Dominant sector: [Sector Name] at XX%
- [Assessment of balance across sectors]
**Position Count:** [Optimal / Under-diversified / Over-diversified]
- Total positions: XX stocks
- [Recommendation]
**Correlation Concerns:**
- [List any highly correlated position pairs]
- [Diversification improvement suggestions]3.3 Risk Analysis
Read references/portfolio-risk-metrics.md for risk measurement frameworks
Calculate and interpret key risk metrics:
Volatility Measures:
- Estimated portfolio beta (weighted average of position betas)
- Individual position volatilities
- Portfolio standard deviation (if historical data available)
Downside Risk:
- Maximum drawdown (from portfolio history)
- Current drawdown from peak
- Positions with significant unrealized losses
Risk Concentration:
- Percentage in high-volatility stocks (beta > 1.5)
- Percentage in speculative/unprofitable companies
- Leverage usage (if applicable)
Tail Risk:
- Exposure to potential black swan events
- Single-stock concentration risk
- Sector-specific event risk
Output:
## Risk Assessment
**Overall Risk Profile:** [Conservative / Moderate / Aggressive]
**Portfolio Beta:** X.XX (vs market at 1.00)
- Interpretation: Portfolio is [more/less] volatile than market
**Maximum Drawdown:** -XX.X% (from $XXX,XXX to $XXX,XXX)
- Current drawdown from peak: -XX.X%
**High-Risk Positions:**
| Symbol | % of Portfolio | Beta | Risk Factor |
|--------|----------------|------|-------------|
| [TICKER] | XX% | X.XX | [High volatility / Recent loss / etc] |
**Risk Concentrations:**
- XX% in single sector ([Sector])
- XX% in stocks with beta > 1.5
- [Other concentration risks]
**Risk Score:** XX/100 ([Low/Medium/High] risk)3.4 Performance Analysis
Evaluate portfolio performance using available data:
Absolute Returns:
- Overall portfolio unrealized P&L ($ and %)
- Best performing positions (top 5 by % gain)
- Worst performing positions (bottom 5 by % loss)
Time-Weighted Returns (if history available):
- YTD return
- 1-year, 3-year, 5-year annualized returns
- Compare to benchmark (S&P 500, relevant index)
Position-Level Performance:
- Winners vs Losers ratio
- Average gain on winning positions
- Average loss on losing positions
- Positions near 52-week highs/lows
Output:
## Performance Review
**Total Portfolio Value:** $XXX,XXX
**Total Unrealized P&L:** $XX,XXX (+XX.X%)
**Cash Balance:** $XX,XXX (XX% of portfolio)
**Best Performers:**
| Symbol | Gain | Position Value |
|--------|------|----------------|
| [TICKER] | +XX.X% | $XX,XXX |
| ... |
**Worst Performers:**
| Symbol | Loss | Position Value |
|--------|------|----------------|
| [TICKER] | -XX.X% | $XX,XXX |
| ... |
**Performance vs Benchmark (if available):**
- Portfolio return: +X.X%
- S&P 500 return: +Y.Y%
- Alpha: +/- Z.Z%Step 4: Individual Position Analysis
For key positions (top 10-15 by portfolio weight), perform detailed analysis:
Read references/position-evaluation.md for position analysis framework
For each significant position:
4.1 Current Thesis Validation:
- Why was this position initiated? (if known from user context)
- Has the investment thesis played out or broken?
- Recent company developments and news
4.2 Valuation Assessment:
- Current valuation metrics (P/E, P/B, etc.)
- Compare to historical valuation range
- Compare to sector peers
- Overvalued / Fair / Undervalued assessment
4.3 Technical Health:
- Price trend (uptrend, downtrend, sideways)
- Position relative to moving averages
- Support and resistance levels
- Momentum status
4.4 Position Sizing:
- Current weight in portfolio
- Is size appropriate given conviction and risk?
- Overweight or underweight vs optimal
4.5 Action Recommendation:
- HOLD - Position is well-sized and thesis intact
- ADD - Underweight given opportunity, thesis strengthening
- TRIM - Overweight or valuation stretched
- SELL - Thesis broken, better opportunities elsewhere
Output per position:
### [SYMBOL] - [Company Name] (XX.X% of portfolio)
**Position Details:**
- Shares: XXX
- Avg Cost: $XX.XX
- Current Price: $XX.XX
- Market Value: $XX,XXX
- Unrealized P/L: $X,XXX (+XX.X%)
**Fundamental Snapshot:**
- Sector: [Sector]
- Market Cap: $XX.XB
- P/E: XX.X | Dividend Yield: X.X%
- Recent developments: [Key news or earnings]
**Technical Status:**
- Trend: [Uptrend / Downtrend / Sideways]
- Price vs 50-day MA: [Above/Below by XX%]
- Support: $XX.XX | Resistance: $XX.XX
**Position Assessment:**
- **Thesis Status:** [Intact / Weakening / Broken / Strengthening]
- **Valuation:** [Undervalued / Fair / Overvalued]
- **Position Sizing:** [Optimal / Overweight / Underweight]
**Recommendation:** [HOLD / ADD / TRIM / SELL]
**Rationale:** [1-2 sentence explanation]Step 5: Rebalancing Recommendations
Read references/rebalancing-strategies.md for rebalancing approaches
Generate specific rebalancing recommendations:
5.1 Identify Rebalancing Triggers:
- Positions that have drifted significantly from target weights
- Sector/asset class allocations requiring adjustment
- Overweight positions to trim (exceeded threshold)
- Underweight areas to add (below threshold)
- Tax considerations (capital gains implications)
5.2 Develop Rebalancing Plan:
Positions to TRIM:
- Overweight positions (>threshold deviation from target)
- Stocks that have run up significantly (valuation concerns)
- Concentrated positions exceeding 15-20% of portfolio
- Positions with broken thesis
Positions to ADD:
- Underweight sectors or asset classes
- High-conviction positions currently underweight
- New opportunities to improve diversification
Cash Deployment:
- If excess cash (>10% of portfolio), suggest deployment
- Prioritize based on opportunity and allocation gaps
5.3 Prioritization: Rank rebalancing actions by priority: 1. Immediate - Risk reduction (trim concentrated positions) 2. High Priority - Major allocation drift (>10% from target) 3. Medium Priority - Moderate drift (5-10% from target) 4. Low Priority - Fine-tuning and opportunistic adjustments
Output:
## Rebalancing Recommendations
### Summary
- **Rebalancing Needed:** [Yes / No / Optional]
- **Primary Reason:** [Concentration risk / Sector drift / Cash deployment / etc]
- **Estimated Trades:** X sell orders, Y buy orders
### Recommended Actions
#### HIGH PRIORITY: Risk Reduction
**TRIM [SYMBOL]** from XX% to YY% of portfolio
- **Shares to Sell:** XX shares (~$XX,XXX)
- **Rationale:** [Overweight / Valuation extended / etc]
- **Tax Impact:** $X,XXX capital gain (est)
#### MEDIUM PRIORITY: Asset Allocation
**ADD [Sector/Asset Class]** exposure
- **Target:** Increase from XX% to YY%
- **Suggested Stocks:** [SYMBOL1, SYMBOL2, SYMBOL3]
- **Amount to Invest:** ~$XX,XXX
#### CASH DEPLOYMENT
**Current Cash:** $XX,XXX (XX% of portfolio)
- **Recommendation:** [Deploy / Keep for opportunities / Reduce to X%]
- **Suggested Allocation:** [Distribution across sectors/stocks]
### Implementation Plan
1. [First action - highest priority]
2. [Second action]
3. [Third action]
...
**Timing Considerations:**
- [Tax year-end planning / Earnings season / Market conditions]
- [Suggested phasing if applicable]Step 6: Generate Portfolio Report
Create comprehensive markdown report saved to repository root:
Filename: portfolio_analysis_YYYY-MM-DD.md
Report Structure:
# Portfolio Analysis Report
**Account:** [Account type if available]
**Report Date:** YYYY-MM-DD
**Portfolio Value:** $XXX,XXX
**Total P&L:** $XX,XXX (+XX.X%)
---
## Executive Summary
[3-5 bullet points summarizing key findings]
- Overall portfolio health assessment
- Major strengths
- Key risks or concerns
- Primary recommendations
---
## Holdings Overview
[Summary table of all positions]
---
## Asset Allocation
[Section from Step 3.1]
---
## Diversification Analysis
[Section from Step 3.2]
---
## Risk Assessment
[Section from Step 3.3]
---
## Performance Review
[Section from Step 3.4]
---
## Position Analysis
[Detailed analysis of top 10-15 positions from Step 4]
---
## Rebalancing Recommendations
[Section from Step 5]
---
## Action Items
**Immediate Actions:**
- [ ] [Action 1]
- [ ] [Action 2]
**Medium-Term Actions:**
- [ ] [Action 3]
- [ ] [Action 4]
**Monitoring Priorities:**
- [ ] [Watch list item 1]
- [ ] [Watch list item 2]
---
## Appendix: Full Holdings
[Complete table with all positions and metrics]Step 7: Interactive Follow-up
Be prepared to answer follow-up questions:
Common Questions:
"Why should I sell [SYMBOL]?"
- Explain specific concerns (valuation, thesis breakdown, concentration)
- Provide supporting data
- Offer alternative positions if applicable
"What should I buy instead?"
- Suggest specific stocks to improve allocation
- Explain how they address portfolio gaps
- Provide brief investment thesis
"What's my biggest risk?"
- Identify primary risk factor (concentration, sector exposure, volatility)
- Quantify the risk
- Suggest mitigation strategies
"How does my portfolio compare to [benchmark]?"
- Compare allocation, sector weights, risk metrics
- Highlight key differences
- Assess if differences are justified
"Should I rebalance now or wait?"
- Consider market conditions, tax implications, transaction costs
- Provide timing recommendation with rationale
"Can you analyze [specific position] in more detail?"
- Perform deep-dive analysis using us-stock-analysis skill if needed
- Integrate findings back into portfolio context
Analysis Frameworks
Target Allocation Templates
This skill includes reference allocation models for different investor profiles:
Read references/target-allocations.md for detailed models:
- Conservative (Capital preservation, income focus)
- Moderate (Balanced growth and income)
- Growth (Long-term capital appreciation)
- Aggressive (Maximum growth, high risk tolerance)
Each model includes:
- Asset class targets (Stocks/Bonds/Cash/Alternatives)
- Sector guidelines
- Market cap distribution
- Geographic allocation
- Position sizing rules
Use these as comparison benchmarks when user hasn't specified their allocation strategy.
Risk Profile Assessment
If user's target allocation is unknown, assess appropriate risk profile based on:
- Age (if mentioned)
- Investment timeline (if mentioned)
- Current allocation (reveals preferences)
- Position types (conservative vs speculative stocks)
Read references/risk-profile-questionnaire.md for assessment framework
Output Guidelines
Tone and Style:
- Objective and analytical
- Actionable recommendations with clear rationale
- Acknowledge uncertainty in market forecasts
- Balance optimism with risk awareness
- Quantify whenever possible
Data Presentation:
- Tables for comparisons and metrics
- Percentages for allocations and returns
- Dollar amounts for absolute values
- Consistent formatting throughout report
Recommendation Clarity:
- Explicit action verbs (TRIM, ADD, HOLD, SELL)
- Specific quantities (sell XX shares, add $X,XXX)
- Priority levels (Immediate, High, Medium, Low)
- Supporting rationale for each recommendation
Visual Descriptions:
- Describe allocation breakdowns as if creating pie charts
- Sector weights as bar chart equivalents
- Performance trends with directional indicators (↑ ↓ →)
Reference Files
Load these references as needed during analysis:
references/alpaca-mcp-setup.md
- When: User needs help setting up Alpaca MCP Server
- Contains: Installation instructions, API key configuration, MCP server connection steps, troubleshooting
references/asset-allocation.md
- When: Analyzing portfolio allocation or creating rebalancing plan
- Contains: Asset allocation theory, optimal allocation by risk profile, sector allocation guidelines, rebalancing triggers
references/diversification-principles.md
- When: Assessing portfolio diversification quality
- Contains: Modern portfolio theory basics, correlation concepts, optimal position count, concentration risk thresholds, diversification metrics
references/portfolio-risk-metrics.md
- When: Calculating risk scores or interpreting volatility
- Contains: Beta calculation, standard deviation, Sharpe ratio, maximum drawdown, Value at Risk (VaR), risk-adjusted return metrics
references/position-evaluation.md
- When: Analyzing individual holdings for buy/hold/sell decisions
- Contains: Position analysis framework, thesis validation checklist, position sizing guidelines, sell discipline criteria
references/rebalancing-strategies.md
- When: Developing rebalancing recommendations
- Contains: Rebalancing methodologies (calendar-based, threshold-based, tactical), tax optimization strategies, transaction cost considerations, implementation timing
references/target-allocations.md
- When: Need benchmark allocations for comparison
- Contains: Model portfolios for conservative/moderate/growth/aggressive investors, sector target ranges, market cap distributions
references/risk-profile-questionnaire.md
- When: User hasn't specified risk tolerance or target allocation
- Contains: Risk assessment questions, scoring methodology, risk profile classification
Error Handling
If Alpaca MCP Server is not connected: 1. Inform user that Alpaca integration is required 2. Provide setup instructions from references/alpaca-mcp-setup.md 3. Offer alternative: manual data entry (less ideal, user provides CSV of positions)
If API returns incomplete data:
- Proceed with available data
- Note limitations in report
- Suggest manual verification for missing positions
If position data seems stale:
- Flag the issue
- Recommend refreshing connection or checking Alpaca status
- Proceed with analysis but caveat findings
If user has no positions:
- Acknowledge empty portfolio
- Offer portfolio construction guidance instead of analysis
- Suggest using value-dividend-screener or us-stock-analysis for stock ideas
Advanced Features
Tax-Loss Harvesting Opportunities
Identify positions with unrealized losses suitable for tax-loss harvesting:
- Positions with losses >5%
- Holding period considerations (avoid wash sale rule)
- Replacement security suggestions (similar but not substantially identical)
Dividend Income Analysis
For portfolios with dividend-paying stocks:
- Estimate annual dividend income
- Dividend growth rate trajectory
- Dividend coverage and sustainability
- Yield on cost for long-term holdings
Correlation Matrix
For portfolios with 5-20 positions:
- Estimate correlation between major positions
- Identify redundant positions (correlation >0.8)
- Suggest diversification improvements
Scenario Analysis
Model portfolio behavior under different scenarios:
- Bull Market (+20% equity appreciation)
- Bear Market (-20% equity decline)
- Sector Rotation (Tech weakness, Value strength)
- Rising Rates (Impact on growth stocks and bonds)
Example Queries
Basic Portfolio Review:
- "Analyze my portfolio"
- "Review my positions"
- "How's my portfolio doing?"
Allocation Analysis:
- "What's my asset allocation?"
- "Am I too concentrated in tech?"
- "Show me my sector breakdown"
Risk Assessment:
- "Is my portfolio too risky?"
- "What's my portfolio beta?"
- "What are my biggest risks?"
Rebalancing:
- "Should I rebalance?"
- "What should I buy or sell?"
- "How can I improve diversification?"
Performance:
- "What are my best and worst positions?"
- "How am I performing vs the market?"
- "Which stocks are winning and losing?"
Position-Specific:
- "Should I sell [SYMBOL]?"
- "Is [SYMBOL] overweight in my portfolio?"
- "What should I do with [SYMBOL]?"
Limitations and Disclaimers
Include in all reports:
This analysis is for informational purposes only and does not constitute financial advice. Investment decisions should be made based on individual circumstances, risk tolerance, and financial goals. Past performance does not guarantee future results. Consult with a qualified financial advisor before making investment decisions.
Data accuracy depends on Alpaca API and third-party market data sources. Verify critical information independently. Tax implications are estimates only; consult a tax professional for specific guidance.
Portfolio Manager
Comprehensive portfolio analysis and management skill that integrates with Alpaca MCP Server to fetch real-time holdings data and generate detailed portfolio reports with rebalancing recommendations.
Overview
Portfolio Manager analyzes your investment portfolio across multiple dimensions:
- Asset Allocation - Stocks, bonds, cash distribution vs target allocation
- Diversification - Sector breakdown, position concentration, correlation analysis
- Risk Assessment - Portfolio beta, volatility, maximum drawdown, risk score
- Performance Review - Winners/losers, absolute and relative returns, benchmarking
- Position Analysis - Detailed evaluation of individual holdings (HOLD/ADD/TRIM/SELL recommendations)
- Rebalancing Plan - Specific actions to optimize portfolio allocation
Features
✅ Alpaca Integration - Automatically fetches positions via Alpaca MCP Server ✅ Multi-Dimensional Analysis - Asset class, sector, geography, market cap, style ✅ Risk Metrics - Beta, volatility, drawdown, concentration, HHI ✅ Position Evaluation - Thesis validation, valuation, sizing, relative opportunity ✅ Rebalancing Recommendations - Prioritized actions (TRIM/ADD/HOLD/SELL) ✅ Comprehensive Reports - Markdown reports saved to repository ✅ Model Portfolios - Compare to Conservative/Moderate/Growth/Aggressive benchmarks
Prerequisites
Required: Alpaca Account and MCP Server
This skill requires:
1. Alpaca Brokerage Account (paper or live)
- Sign up: https://alpaca.markets/
- Paper trading account (free, simulated money) recommended for testing
2. Alpaca MCP Server configured in Claude
- Provides access to portfolio positions via MCP tools
- Setup guide:
references/alpaca-mcp-setup.md
3. API Credentials (API Key ID and Secret Key)
- Generate in Alpaca dashboard
- Set environment variables:
export ALPACA_API_KEY="your_api_key_id"
export ALPACA_SECRET_KEY="your_secret_key"
export ALPACA_PAPER="true" # or "false" for live tradingOptional: Manual Data Entry
If Alpaca MCP Server is unavailable, you can provide portfolio data manually via CSV:
symbol,quantity,cost_basis,current_price
AAPL,100,150.00,175.50
MSFT,50,280.00,310.25Installation
For Claude Desktop/Code Users
1. Copy skill to Claude Skills directory:
cp -r portfolio-manager ~/.claude/skills/2. Restart Claude to detect the skill
3. Configure Alpaca credentials (see Prerequisites)
For Claude Web App Users
1. Download skill package:
skill-packages/portfolio-manager.skill
2. Upload to Claude:
- Click "+" in Claude web interface
- Select "Upload Skill"
- Choose
portfolio-manager.skill
3. Note: Alpaca MCP Server may not be available in web version; use manual CSV data entry
Usage
Basic Portfolio Analysis
Simply ask Claude to analyze your portfolio:
"Analyze my portfolio"
"Review my current positions"
"How's my portfolio doing?"The skill will: 1. Fetch positions from Alpaca via MCP 2. Enrich data with market information 3. Perform comprehensive analysis 4. Generate detailed report 5. Provide rebalancing recommendations
Specific Analysis Types
Asset Allocation Check:
"What's my current asset allocation?"
"Am I properly diversified?"Risk Assessment:
"How risky is my portfolio?"
"What's my portfolio beta?"
"What are my biggest risks?"Rebalancing:
"Should I rebalance my portfolio?"
"What should I buy or sell?"
"Is anything too concentrated?"Position Review:
"Should I sell Tesla?"
"Is Apple overweight in my portfolio?"
"What should I do with my tech stocks?"Performance:
"What are my best performing stocks?"
"Which positions are losing money?"
"How am I doing vs the S&P 500?"Analysis Output
Portfolio Manager generates a comprehensive markdown report including:
1. Executive Summary
- Overall portfolio health
- Key strengths and concerns
- Primary recommendations
2. Holdings Overview
- All positions with quantities, values, P/L
3. Asset Allocation Analysis
- Current vs target allocation
- Sector breakdown
- Geographic distribution
- Market cap distribution
4. Diversification Assessment
- Position concentration analysis
- Sector diversification score
- Correlation concerns
- HHI concentration index
5. Risk Assessment
- Portfolio beta and volatility
- Maximum drawdown
- Risk concentrations
- Overall risk score
6. Performance Review
- Total portfolio value and P/L
- Best and worst performers
- Performance vs benchmark (if available)
7. Position Analysis
- Detailed analysis of top 10-15 holdings
- Thesis validation
- Valuation assessment
- Position sizing
- HOLD/ADD/TRIM/SELL recommendations
8. Rebalancing Recommendations
- Prioritized actions (High/Medium/Low priority)
- Specific trade recommendations
- Cash deployment suggestions
- Tax considerations
9. Action Items
- Immediate actions
- Medium-term tasks
- Monitoring priorities
Report Location: portfolio_analysis_YYYY-MM-DD.md in repository root
Reference Materials
The skill includes comprehensive reference documentation:
- `references/alpaca-mcp-setup.md` - Alpaca API setup guide
- `references/asset-allocation.md` - Asset allocation theory and frameworks
- `references/diversification-principles.md` - Diversification concepts and metrics
- `references/portfolio-risk-metrics.md` - Risk measurement and interpretation
- `references/position-evaluation.md` - Position analysis framework
- `references/rebalancing-strategies.md` - Rebalancing methodologies
- `references/target-allocations.md` - Model portfolios by risk profile
- `references/risk-profile-questionnaire.md` - Risk tolerance assessment
These references are loaded automatically by the skill as needed during analysis.
Testing Alpaca Connection
Before using the skill, test your Alpaca API connection:
python3 skills/portfolio-manager/scripts/check_alpaca_connection.pyExpected output:
✓ Successfully connected to Alpaca API
Account Status: ACTIVE
Equity: $100,000.00
Cash: $50,000.00
Buying Power: $200,000.00
Positions: 5If you see errors, consult references/alpaca-mcp-setup.md for troubleshooting.
Example Workflow
Initial Portfolio Review
1. Trigger analysis:
User: "Analyze my portfolio"2. Skill workflow:
- Fetches positions from Alpaca MCP
- Retrieves account information
- Gathers market data for each position
- Performs comprehensive analysis
- Generates detailed report
3. Report generated:
portfolio_analysis_2025-11-08.md- Includes all analysis sections
- Specific recommendations provided
4. Follow-up questions:
User: "Why should I trim NVDA?"
User: "What should I buy instead?"
User: "Is my tech allocation too high?"Ongoing Monitoring
Quarterly Review:
User: "Review my portfolio for Q4 2025"After Market Events:
User: "How did the market crash affect my portfolio?"Before Rebalancing:
User: "Generate rebalancing recommendations"Key Concepts
Asset Allocation
Distribution of portfolio across asset classes (stocks, bonds, cash). The primary driver of portfolio risk and return.
Diversification
Spreading investments across multiple positions, sectors, and geographies to reduce unsystematic risk.
Rebalancing
Systematically selling overweight positions and buying underweight positions to maintain target allocation.
Position Sizing
Determining appropriate weight for each holding based on conviction, risk, and portfolio constraints.
Risk-Adjusted Returns
Evaluating performance relative to risk taken (Sharpe ratio, Sortino ratio).
Concentration Risk
Excessive exposure to single position, sector, or theme that creates elevated portfolio risk.
Limitations and Disclaimers
Important Notes:
1. Not Financial Advice - This tool provides informational analysis only, not personalized financial advice.
2. Data Accuracy - Analysis quality depends on Alpaca API data accuracy and third-party market data.
3. Market Conditions - Historical analysis may not predict future performance, especially during regime changes.
4. Tax Implications - Tax impact estimates are approximate only; consult a tax professional.
5. Execution Risk - Recommendations assume ability to execute trades at current market prices.
Always:
- Verify critical data independently
- Consult qualified financial advisor before major decisions
- Consider your unique circumstances, risk tolerance, and goals
- Review tax implications with tax professional
Troubleshooting
"Alpaca MCP Server not connected"
Solutions: 1. Verify MCP server is running (claude mcp status if available) 2. Check environment variables are set: echo $ALPACA_API_KEY 3. Restart Claude to reinitialize MCP servers 4. Verify API keys in Alpaca dashboard 5. See references/alpaca-mcp-setup.md for detailed setup
"Invalid API credentials"
Solutions: 1. Verify API Key ID and Secret Key (no typos, spaces) 2. Check ALPACA_PAPER setting matches your keys (paper vs live) 3. Regenerate API keys in Alpaca dashboard 4. Ensure account status is active
"No positions found"
Solutions: 1. Verify positions exist in Alpaca dashboard 2. Confirm you're checking correct account (paper vs live) 3. Check account number matches 4. Try refreshing: ask Claude to fetch positions again
Report seems inaccurate
Solutions: 1. Verify Alpaca data is current (check Alpaca dashboard) 2. Check if market data is delayed (free tier is 15-min delayed) 3. Manually verify a few key positions 4. Report discrepancies to improve analysis
Version History
- v1.0 (November 2025) - Initial release
- Alpaca MCP Server integration
- Comprehensive portfolio analysis
- Multi-dimensional risk assessment
- Position evaluation framework
- Rebalancing recommendations
- Model portfolio benchmarks
Support and Contributing
For Issues:
- Check
references/documentation - Review troubleshooting section above
- Test Alpaca connection with
check_alpaca_connection.py - Check Alpaca API status: https://status.alpaca.markets/
For Questions:
- Alpaca API docs: https://alpaca.markets/docs/
- Alpaca community: https://forum.alpaca.markets/
Skill Enhancement Ideas:
- Additional broker integrations (Interactive Brokers, Schwab)
- Options portfolio analysis
- Factor exposure analysis
- Monte Carlo retirement projections
- Tax-loss harvesting automation
Related Skills
This skill works well in combination with:
- US Stock Analysis - Deep dive into individual positions
- Value Dividend Screener - Find replacement stocks for rebalancing
- Market News Analyst - Understand recent market-moving events
- Sector Analyst - Analyze sector rotation patterns
- US Market Bubble Detector - Assess overall market risk environment
License
See repository root for license information.
---
Remember: Successful portfolio management requires discipline, patience, and long-term perspective. Use this skill to maintain systematic approach and avoid emotional decision-making. The best portfolio is one you can stick with through all market conditions.
Alpaca MCP Server Setup Guide
This guide explains how to set up and configure the Alpaca MCP (Model Context Protocol) Server for use with the Portfolio Manager skill.
What is Alpaca MCP Server?
The Alpaca MCP Server is a Model Context Protocol server that provides Claude with access to your Alpaca brokerage account data through a standardized interface. This allows the Portfolio Manager skill to fetch real-time portfolio positions, account information, and transaction history directly from your Alpaca account.
Prerequisites
1. Alpaca Account
You need an Alpaca brokerage account (paper trading or live):
- Sign up: https://alpaca.markets/
- Paper Trading: Free, uses simulated money (recommended for testing)
- Live Trading: Real money account (requires funding)
2. Alpaca API Keys
Generate API keys from your Alpaca dashboard:
For Paper Trading: 1. Log into Alpaca dashboard: https://app.alpaca.markets/ 2. Navigate to "Paper Trading" account 3. Go to "Your API Keys" section 4. Click "Generate New Key" 5. Save your:
- API Key ID (public key)
- Secret Key (private key - only shown once!)
For Live Trading: 1. Log into Alpaca dashboard 2. Navigate to "Live Trading" account 3. Go to "Your API Keys" section 4. Click "Generate New Key" 5. Save your API credentials
⚠️ Security Note: Never share your Secret Key or commit it to version control. Treat it like a password.
Installation
Option 1: Using MCP Server (Recommended for Claude Desktop/Web)
Step 1: Install Alpaca MCP Server
The Alpaca MCP server may be available through Claude's MCP marketplace or as a standalone package.
Check if available in your Claude environment:
# List available MCP servers
claude mcp listIf not installed, follow Anthropic's MCP server installation guide for your platform.
Step 2: Configure API Keys
Set environment variables with your Alpaca credentials:
On macOS/Linux:
# For Paper Trading
export ALPACA_API_KEY="your_api_key_id"
export ALPACA_SECRET_KEY="your_secret_key"
export ALPACA_PAPER=true
# For Live Trading
export ALPACA_API_KEY="your_api_key_id"
export ALPACA_SECRET_KEY="your_secret_key"
export ALPACA_PAPER=falseAdd to ~/.bashrc or ~/.zshrc to persist across sessions:
echo 'export ALPACA_API_KEY="your_api_key_id"' >> ~/.bashrc
echo 'export ALPACA_SECRET_KEY="your_secret_key"' >> ~/.bashrc
echo 'export ALPACA_PAPER=true' >> ~/.bashrc
source ~/.bashrcOn Windows (PowerShell):
# For Paper Trading
$env:ALPACA_API_KEY="your_api_key_id"
$env:ALPACA_SECRET_KEY="your_secret_key"
$env:ALPACA_PAPER="true"
# For Live Trading
$env:ALPACA_API_KEY="your_api_key_id"
$env:ALPACA_SECRET_KEY="your_secret_key"
$env:ALPACA_PAPER="false"To persist environment variables on Windows:
[System.Environment]::SetEnvironmentVariable('ALPACA_API_KEY', 'your_api_key_id', 'User')
[System.Environment]::SetEnvironmentVariable('ALPACA_SECRET_KEY', 'your_secret_key', 'User')
[System.Environment]::SetEnvironmentVariable('ALPACA_PAPER', 'true', 'User')Step 3: Start MCP Server
The MCP server should start automatically when Claude launches. Verify connection:
# Check MCP server status (if CLI available)
claude mcp statusOption 2: Direct API Integration (Alternative)
If MCP server is unavailable, the skill can fall back to direct Alpaca API integration using Python:
Step 1: Install Alpaca Python SDK
pip install alpaca-trade-apiStep 2: Create Configuration File
Create ~/.alpaca/config.ini:
[alpaca]
api_key_id = your_api_key_id
secret_key = your_secret_key
base_url = https://paper-api.alpaca.markets # For paper trading
# base_url = https://api.alpaca.markets # For live tradingSet proper permissions:
chmod 600 ~/.alpaca/config.iniStep 3: Test Connection
Use the provided test script:
python3 skills/portfolio-manager/scripts/check_alpaca_connection.pyExpected output:
✓ Successfully connected to Alpaca API
Account Status: ACTIVE
Equity: $100,000.00
Cash: $50,000.00
Buying Power: $200,000.00
Positions: 5Available MCP Tools
Once configured, the Portfolio Manager skill can use these Alpaca MCP tools:
mcp__alpaca__get_account_info
Fetches account summary:
- Total equity (portfolio value)
- Cash balance
- Buying power
- Account status
- Day trading buying power (if applicable)
mcp__alpaca__get_positions
Retrieves all open positions:
- Symbol ticker
- Quantity (shares)
- Average entry price (cost basis)
- Current market price
- Current market value
- Unrealized P&L ($ and %)
- Today's P&L
mcp__alpaca__get_portfolio_history
Gets historical portfolio performance:
- Equity time series
- Profit/loss time series
- Timeframes: 1D, 1W, 1M, 3M, 1Y, All
mcp__alpaca__get_orders
Lists orders (open, filled, cancelled):
- Order ID
- Symbol
- Quantity
- Order type (market, limit, stop, etc.)
- Status
- Fill price (if filled)
- Timestamps
mcp__alpaca__get_activities
Retrieves account activities:
- Trades (fills)
- Dividend payments
- Stock splits
- Journal entries
Verification and Testing
Test 1: Account Connection
Ask Claude to fetch account info:
"Can you get my Alpaca account information?"Expected response should include your equity, cash, and buying power.
Test 2: Portfolio Positions
Request current positions:
"What positions do I have in my portfolio?"Expected response should list all holdings with quantities and values.
Test 3: Portfolio Analysis
Trigger the Portfolio Manager skill:
"Analyze my portfolio"The skill should: 1. Fetch positions via MCP 2. Gather additional market data 3. Perform comprehensive analysis 4. Generate detailed report
Troubleshooting
Error: "Alpaca MCP Server not connected"
Possible causes: 1. MCP server not running 2. API keys not configured 3. API keys invalid or expired
Solutions: 1. Restart Claude to reinitialize MCP servers 2. Verify environment variables are set: echo $ALPACA_API_KEY 3. Check API keys in Alpaca dashboard (regenerate if needed) 4. Verify account status (ensure not suspended)
Error: "Invalid API credentials"
Possible causes: 1. Wrong API keys 2. Using live keys with paper mode (or vice versa) 3. API keys revoked
Solutions: 1. Double-check API Key ID and Secret Key (no extra spaces) 2. Verify ALPACA_PAPER setting matches your API keys 3. Regenerate API keys in Alpaca dashboard 4. Ensure you're using the correct account (paper vs live)
Error: "Forbidden - insufficient permissions"
Possible causes: 1. API keys have restricted permissions 2. Account not approved for trading
Solutions: 1. Regenerate API keys with full permissions 2. Check Alpaca dashboard for account status 3. For live accounts, ensure account approval is complete
Error: "No positions found"
Possible causes: 1. Portfolio is actually empty 2. Wrong account selected (paper vs live) 3. API returning stale data
Solutions: 1. Verify positions exist in Alpaca dashboard 2. Confirm ALPACA_PAPER setting matches intended account 3. Try refreshing: ask Claude to fetch positions again 4. Check Alpaca API status page: https://status.alpaca.markets/
MCP Server Not Responding
Solutions: 1. Restart Claude application 2. Check MCP server logs (if available) 3. Verify network connectivity 4. Fall back to direct API integration (Option 2)
Security Best Practices
1. Use Paper Trading for Testing
Always test with paper trading account first. Never risk real money until thoroughly tested.
2. Protect API Keys
- Never commit API keys to GitHub or version control
- Use environment variables, not hardcoded values
- Set file permissions:
chmod 600for config files - Rotate keys periodically (every 90 days)
3. Use Read-Only Keys (If Available)
For portfolio analysis only, use read-only API keys if Alpaca supports them. This prevents accidental trading.
4. Monitor API Usage
- Check Alpaca dashboard for API call logs
- Review account activities regularly
- Set up alerts for unusual activity
5. Separate Paper and Live Environments
- Use different environment variable prefixes
- Never mix paper and live credentials
- Document which keys are which
API Rate Limits
Alpaca imposes rate limits on API calls:
Free Tier:
- 200 requests per minute
- Data delayed by 15 minutes (for free market data)
Paid Tier (Alpaca Markets Data subscription):
- Higher rate limits
- Real-time data
Best Practices:
- Portfolio Manager skill includes built-in rate limiting
- Avoid running analysis more than once per minute
- For frequent monitoring, consider caching results
Alternative: Manual Data Entry
If Alpaca integration is unavailable, Portfolio Manager can accept manually entered portfolio data:
CSV Format:
symbol,quantity,cost_basis,current_price
AAPL,100,150.00,175.50
MSFT,50,280.00,310.25
GOOGL,25,2500.00,2750.00Usage: 1. Export positions from your broker as CSV 2. Provide file to Claude: "Analyze my portfolio using this CSV file" 3. Skill will parse data and perform analysis
Limitations:
- No real-time updates
- No historical performance data
- Manual updates required
Additional Resources
Alpaca Documentation:
- API docs: https://alpaca.markets/docs/
- Python SDK: https://github.com/alpacahq/alpaca-trade-api-python
- API reference: https://alpaca.markets/docs/api-references/trading-api/
MCP Protocol:
- Anthropic MCP docs: https://docs.anthropic.com/claude/docs/model-context-protocol
- MCP specification: https://github.com/anthropics/mcp
Support:
- Alpaca support: support@alpaca.markets
- Alpaca community: https://forum.alpaca.markets/
- API status: https://status.alpaca.markets/
Asset Allocation Framework
This document provides comprehensive guidance on asset allocation principles, target allocations by risk profile, and rebalancing triggers for portfolio management.
Core Principles
1. Asset Allocation Drives Returns
Academic research shows that asset allocation accounts for approximately 90% of portfolio return variability over time. Security selection and market timing contribute far less to long-term outcomes.
Key Insight: Getting the allocation right is more important than picking individual stocks.
2. Diversification Across Asset Classes
Different asset classes have different risk-return characteristics and respond differently to economic conditions:
| Asset Class | Expected Return | Volatility | Purpose |
|---|---|---|---|
| Stocks (Equities) | 8-10% | High (15-20%) | Growth, long-term appreciation |
| Bonds (Fixed Income) | 3-5% | Low (3-6%) | Income, capital preservation, volatility dampening |
| Cash & Equivalents | 1-2% | Very Low | Liquidity, stability, opportunistic deployment |
| Real Estate | 6-8% | Medium (10-15%) | Income, inflation hedge, diversification |
| Commodities | 4-6% | High (15-25%) | Inflation hedge, diversification |
| Alternatives | Varies | Varies | Non-correlated returns, risk management |
Note: Returns are historical long-term averages and not guaranteed. Actual returns vary significantly.
3. Risk Tolerance Alignment
Asset allocation should match investor's risk tolerance and time horizon:
- Risk Capacity: Financial ability to withstand losses (net worth, income stability, time horizon)
- Risk Tolerance: Emotional ability to withstand volatility (behavioral, psychological)
- Risk Requirement: Return needed to achieve financial goals
Optimal allocation balances all three factors.
Asset Allocation by Risk Profile
Conservative (Capital Preservation)
Investor Profile:
- Age: Typically 60+ or near retirement
- Time Horizon: 0-5 years
- Primary Goal: Preserve capital, generate income
- Risk Tolerance: Low - cannot afford significant losses
- Volatility Tolerance: Minimal (<5-8% annual drawdown)
Target Allocation:
- Stocks: 20-40%
- US Large Cap: 15-25%
- US Small/Mid Cap: 0-5%
- International: 5-10%
- Bonds: 50-70%
- Investment Grade Corporate: 20-30%
- Government Bonds: 20-30%
- High Yield: 0-10%
- Cash: 10-20%
- Alternatives: 0-10%
Sector Guidelines (Equity Portion):
- Defensive sectors: 60-70% (Utilities, Consumer Staples, Healthcare)
- Cyclical sectors: 30-40%
- Avoid: High-growth tech, speculative stocks
Expected Outcomes:
- Annual Return: 4-6%
- Max Drawdown: -10 to -15%
- Recovery Time: 1-2 years
Moderate (Balanced Growth & Income)
Investor Profile:
- Age: Typically 40-60
- Time Horizon: 5-15 years
- Primary Goal: Balanced growth and income
- Risk Tolerance: Medium - can handle moderate volatility
- Volatility Tolerance: Moderate (10-15% annual drawdown)
Target Allocation:
- Stocks: 50-70%
- US Large Cap: 30-40%
- US Small/Mid Cap: 10-15%
- International: 10-15%
- Bonds: 25-40%
- Investment Grade Corporate: 15-25%
- Government Bonds: 5-10%
- High Yield: 5-10%
- Cash: 5-10%
- Alternatives: 0-10%
Sector Guidelines (Equity Portion):
- Defensive sectors: 40-50%
- Growth sectors: 30-40% (Technology, Communication, Consumer Discretionary)
- Cyclical sectors: 20-30% (Industrials, Financials, Materials)
Expected Outcomes:
- Annual Return: 6-8%
- Max Drawdown: -15 to -25%
- Recovery Time: 2-4 years
Growth (Long-Term Capital Appreciation)
Investor Profile:
- Age: Typically 30-50
- Time Horizon: 10-25 years
- Primary Goal: Long-term wealth accumulation
- Risk Tolerance: Medium-High - can withstand volatility for higher returns
- Volatility Tolerance: Significant (15-20% annual drawdown)
Target Allocation:
- Stocks: 75-90%
- US Large Cap: 40-50%
- US Small/Mid Cap: 15-20%
- International: 15-20%
- Emerging Markets: 5-10%
- Bonds: 10-20%
- Investment Grade Corporate: 5-10%
- High Yield: 5-10%
- Cash: 2-5%
- Alternatives: 0-10%
Sector Guidelines (Equity Portion):
- Growth sectors: 45-55% (Technology, Healthcare, Communication)
- Cyclical sectors: 25-35%
- Defensive sectors: 20-30%
Expected Outcomes:
- Annual Return: 8-10%
- Max Drawdown: -20 to -35%
- Recovery Time: 3-5 years
Aggressive (Maximum Growth)
Investor Profile:
- Age: Typically <40 or high net worth with long horizon
- Time Horizon: 15+ years
- Primary Goal: Maximize wealth, comfortable with high risk
- Risk Tolerance: High - can emotionally and financially withstand major losses
- Volatility Tolerance: Very high (20-30%+ annual drawdown)
Target Allocation:
- Stocks: 90-100%
- US Large Cap: 40-50%
- US Small/Mid Cap: 20-25%
- International: 15-20%
- Emerging Markets: 10-15%
- Alternatives: 0-5%
- Bonds: 0-10%
- Cash: 0-5%
Sector Guidelines (Equity Portion):
- Growth sectors: 50-60% (Technology, Healthcare, Consumer Discretionary)
- Cyclical sectors: 30-35%
- Defensive sectors: 10-20%
- May include speculative positions (small caps, growth stocks)
Expected Outcomes:
- Annual Return: 9-12%
- Max Drawdown: -30 to -50%
- Recovery Time: 4-7 years
Sector Allocation Guidelines
Defensive Sectors (Lower Volatility)
Utilities (3-5% of equity allocation)
- Characteristics: Stable cash flows, dividend-focused, regulated
- Economic Sensitivity: Low
- Use: Income generation, volatility dampening
- Overweight when: Late cycle, high uncertainty, rising rates
Consumer Staples (5-10%)
- Characteristics: Steady demand, pricing power, recession-resistant
- Economic Sensitivity: Low
- Use: Stability, dividend income
- Overweight when: Economic slowdown, defensive posture
Healthcare (10-15%)
- Characteristics: Demographic tailwinds, innovation-driven, essential services
- Economic Sensitivity: Low to Medium
- Use: Growth with defensive qualities
- Overweight when: Aging demographics, innovation cycle
Growth Sectors (Higher Volatility, Higher Expected Returns)
Technology (15-25%)
- Characteristics: High growth, innovation-driven, secular trends
- Economic Sensitivity: Medium to High
- Use: Capital appreciation, secular growth
- Overweight when: Economic expansion, innovation cycles, low rates
- Caution: Concentration risk, valuation sensitivity
Communication Services (5-10%)
- Characteristics: Platform businesses, network effects, advertising-driven
- Economic Sensitivity: Medium
- Use: Growth, secular trends (digital transformation)
- Overweight when: Ad market strength, content consumption growth
Consumer Discretionary (8-12%)
- Characteristics: Cyclical demand, premium brands, e-commerce
- Economic Sensitivity: High
- Use: Economic growth exposure, consumer trends
- Overweight when: Strong consumer confidence, wage growth
Cyclical Sectors (Economic Cycle Sensitive)
Financials (10-15%)
- Characteristics: Interest rate sensitive, credit cycle dependent
- Economic Sensitivity: High
- Use: Economic expansion exposure, dividend income
- Overweight when: Rising rates, strong economy, steepening yield curve
Industrials (8-12%)
- Characteristics: Capital goods, infrastructure, global trade
- Economic Sensitivity: High
- Use: Economic growth, infrastructure spending
- Overweight when: Fiscal stimulus, manufacturing upturn, globalization
Materials (3-6%)
- Characteristics: Commodity-driven, economic cycle dependent
- Economic Sensitivity: Very High
- Use: Inflation hedge, economic growth
- Overweight when: Infrastructure spending, commodity supercycles
Energy (3-8%)
- Characteristics: Commodity price driven, capital intensive, volatile
- Economic Sensitivity: High
- Use: Inflation hedge, commodity exposure
- Overweight when: Rising oil prices, underinvestment supply cycles
- Caution: ESG concerns, energy transition risk
Real Estate (3-6%)
- Characteristics: Income-focused, interest rate sensitive, inflation hedge
- Economic Sensitivity: Medium
- Use: Diversification, income, inflation protection
- Overweight when: Low rates, economic expansion, inflation
Geographic Allocation
US Equities (60-75% of total equity)
Rationale:
- Home market bias (reduce currency risk, familiar companies)
- Deepest, most liquid markets
- Strong corporate governance and shareholder rights
- Dollar-denominated returns
Allocation by Market Cap:
- Large Cap (>$10B): 60-70% of US equity
- Mid Cap ($2B-$10B): 20-25%
- Small Cap (<$2B): 10-15%
International Developed Markets (15-25% of total equity)
Regions:
- Europe: 8-12%
- Japan: 3-5%
- UK: 2-4%
- Other (Canada, Australia): 2-4%
Rationale:
- Diversification (different economic cycles)
- Currency diversification
- Access to global industry leaders
- Valuation opportunities
Considerations:
- Currency risk (hedge or leave unhedged based on view)
- Political risk (EU regulatory environment, Brexit impact)
- Lower growth rates vs US
Emerging Markets (5-15% of total equity)
Regions:
- China: 2-5%
- India: 1-3%
- Other Asia (Taiwan, Korea): 1-3%
- Latin America: 0-2%
- Other: 0-2%
Rationale:
- Higher growth potential
- Demographic advantages
- Commodity exposure
- Diversification
Considerations:
- Higher volatility
- Political and regulatory risk
- Currency volatility
- Liquidity concerns
Risk Management:
- Limit to 5-10% for moderate investors
- Use broad ETFs rather than individual stocks
- Monitor geopolitical developments
Rebalancing Framework
Rebalancing Triggers
1. Time-Based Rebalancing
- Frequency: Quarterly or Semi-Annually
- Methodology: Review allocation every 3-6 months, rebalance if needed
- Pros: Disciplined, predictable, simple
- Cons: May rebalance when not necessary (costs), or miss urgent needs
2. Threshold-Based Rebalancing
- Trigger: Allocation drifts >5% from target
- Example: If target is 60% stocks, rebalance when stocks reach <55% or >65%
- Pros: Responsive to market moves, cost-efficient
- Cons: Requires monitoring, may miss small drifts
3. Hybrid Approach (Recommended)
- Method: Check quarterly, rebalance only if drift >5%
- Best of both worlds: Disciplined review, cost-conscious execution
Rebalancing Thresholds
| Allocation Drift | Action | Priority |
|---|---|---|
| <3% | Monitor, no action needed | None |
| 3-5% | Consider rebalancing (optional) | Low |
| 5-10% | Rebalance recommended | Medium |
| >10% | Rebalance immediately | High |
Position-Level Thresholds:
- Single stock >15% of portfolio → Trim immediately
- Single stock >20% of portfolio → Urgent trim required
- Any position doubling target weight → Review and likely trim
Rebalancing Methods
1. Sell and Redeploy
- Method: Sell overweight positions, buy underweight positions
- Pros: Precise rebalancing
- Cons: Tax implications (capital gains), transaction costs
2. Direct New Contributions
- Method: Use new cash to buy underweight positions
- Pros: No selling (tax-efficient), simple
- Cons: Slower rebalancing, requires regular contributions
3. Dividend Reinvestment
- Method: Reinvest dividends into underweight positions
- Pros: Tax-efficient, gradual rebalancing
- Cons: Very slow, limited impact
4. Opportunistic (Tactical)
- Method: Sell overweight positions on strength, buy underweight on weakness
- Pros: Improve execution prices
- Cons: Requires active monitoring, may delay rebalancing
Recommendation: Use method #1 (sell and redeploy) for large drifts (>10%), method #2 for small drifts (<5%), and method #4 when actively managing.
Tax Considerations
Tax-Loss Harvesting:
- Sell positions with losses to offset capital gains
- Reinvest in similar (but not substantially identical) securities
- Avoid wash sale rule (30-day rule)
Tax-Efficient Rebalancing:
- Prioritize rebalancing in tax-advantaged accounts (IRA, 401k)
- In taxable accounts, hold winners >1 year for long-term capital gains rates
- Use new contributions to rebalance rather than selling
Timing:
- Rebalance in December to harvest losses
- Rebalance in January to deploy fresh capital
- Avoid year-end if sitting on large gains (defer taxes)
Tactical Adjustments
While strategic asset allocation should be stable, tactical adjustments can enhance returns:
Market Cycle Adjustments
Early Bull Market:
- Overweight: Cyclicals (Financials, Industrials, Materials)
- Underweight: Defensives (Utilities, Staples)
- Rationale: Economic acceleration favors cyclical sectors
Mid Bull Market:
- Overweight: Growth (Technology, Healthcare)
- Neutral: Cyclicals and Defensives
- Rationale: Expansion matures, focus on quality growth
Late Bull Market:
- Overweight: Defensives (Utilities, Staples, Healthcare)
- Underweight: Cyclicals
- Rationale: Prepare for slowdown, reduce beta
Bear Market:
- Overweight: Cash, Bonds, Defensive equities
- Underweight: Cyclical equities
- Rationale: Capital preservation, prepare for recovery
Valuation-Based Adjustments
When US stocks expensive (high Shiller PE >30):
- Reduce US equity allocation by 5-10%
- Increase international or value stocks
- Increase cash/bonds
When sectors extremely overvalued:
- Trim sector allocation by 3-5%
- Redistribute to undervalued sectors
- Maintain overall equity target
Interest Rate Adjustments
Rising Rate Environment:
- Shorten bond duration
- Overweight: Financials, Value stocks
- Underweight: High P/E growth, Utilities, REITs
Falling Rate Environment:
- Lengthen bond duration
- Overweight: Growth stocks, Technology, REITs
- Underweight: Financials
Common Mistakes to Avoid
1. Market Timing
Mistake: Drastically changing allocation based on market predictions Impact: Missing recoveries, buying high/selling low Solution: Stick to strategic allocation, make only minor tactical adjustments
2. Over-Diversification
Mistake: Holding 100+ positions across 50 funds Impact: Closet indexing, high fees, complexity Solution: 15-30 individual stocks OR 5-10 ETFs for most investors
3. Under-Diversification
Mistake: Heavy concentration in single stock/sector (often employer stock) Impact: Excessive risk, correlated life outcomes (job + portfolio) Solution: Limit single stock to <10%, single sector to <25%
4. Ignoring Rebalancing
Mistake: "Let winners run" indefinitely Impact: Portfolio drifts to high risk, concentration increases Solution: Disciplined rebalancing schedule, trim winners
5. Emotional Rebalancing
Mistake: Panic selling in crashes, euphoric buying in bubbles Impact: Locking in losses, buying tops Solution: Systematic rebalancing rules, ignore emotions
6. Chasing Performance
Mistake: Shifting to last year's top-performing sectors Impact: Mean reversion, buying expensive Solution: Maintain strategic allocation, resist recency bias
Allocation Review Checklist
Use this checklist when reviewing portfolio allocation:
Asset Class Level:
- [ ] Current stock/bond/cash allocation vs target (within 5%?)
- [ ] Risk profile still appropriate for goals/timeline?
- [ ] Any major life changes requiring allocation shift?
- [ ] Tax considerations for rebalancing?
Sector Level:
- [ ] Any sector >30% of equity allocation?
- [ ] Defensive sectors appropriate for market cycle?
- [ ] Growth vs value balance appropriate?
- [ ] Sector allocations reasonable vs benchmark?
Geographic Level:
- [ ] US vs International allocation on target?
- [ ] Emerging market exposure appropriate for risk tolerance?
- [ ] Any country concentration concerns?
- [ ] Currency exposure considerations?
Position Level:
- [ ] Any single stock >15% of portfolio?
- [ ] Top 10 holdings represent what % of portfolio?
- [ ] Any highly correlated positions creating concentration?
- [ ] Position sizes match conviction and risk?
Performance Level:
- [ ] Performance vs benchmark acceptable?
- [ ] Any positions consistently underperforming?
- [ ] Winners becoming too large (>2x initial allocation)?
- [ ] Losers requiring re-evaluation (broken thesis)?
Summary
Key Takeaways:
1. Asset allocation is the primary driver of returns - Get the big picture right 2. Match allocation to risk tolerance and time horizon - Don't take more risk than you can handle 3. Diversify across asset classes, sectors, and geographies - Don't put all eggs in one basket 4. Rebalance systematically - Trim winners, add to losers, maintain discipline 5. Minimize taxes and costs - Tax-efficient rebalancing, low-cost implementation 6. Stay the course - Avoid emotional decisions, stick to the plan 7. Review regularly but change rarely - Annual review, infrequent major changes
Remember: Asset allocation should reflect your personal circumstances, not market forecasts. The best allocation is one you can stick with through market cycles.
Diversification Principles
This document explains the theory and practice of portfolio diversification, providing frameworks for assessing diversification quality and identifying concentration risks.
Core Concepts
What is Diversification?
Diversification is the practice of spreading investments across various assets, sectors, and geographies to reduce portfolio risk without proportionally reducing expected returns.
Harry Markowitz's Key Insight (1952):
"Diversification is the only free lunch in finance."
By combining assets with imperfect correlation, investors can achieve better risk-adjusted returns than holding individual securities.
The Math Behind Diversification
Portfolio Risk Formula:
For a two-asset portfolio:
σ_p = √(w₁²σ₁² + w₂²σ₂² + 2w₁w₂σ₁σ₂ρ₁₂)
Where:
σ_p = Portfolio standard deviation (risk)
w₁, w₂ = Weights of assets 1 and 2
σ₁, σ₂ = Standard deviations of assets 1 and 2
ρ₁₂ = Correlation between assets 1 and 2Key Insight: When correlation < 1.0, portfolio risk is less than the weighted average of individual risks.
Types of Risk
1. Systematic Risk (Market Risk)
- Definition: Risk inherent to the entire market
- Examples: Recessions, interest rate changes, geopolitical events
- Cannot be eliminated by diversification
- Beta measures exposure to systematic risk
2. Unsystematic Risk (Specific Risk)
- Definition: Risk specific to individual companies or sectors
- Examples: Management failures, product recalls, competitive losses
- Can be reduced through diversification
- Diversification benefit: Holding 15-30 stocks eliminates ~90% of unsystematic risk
Modern Portfolio Theory Goal: Eliminate unsystematic risk while accepting systematic risk (compensated by market risk premium).
Optimal Number of Holdings
Individual Stocks
Research shows diminishing diversification benefits beyond a certain number of holdings:
| Number of Stocks | % of Unsystematic Risk Eliminated |
|---|---|
| 1 | 0% (all risk remains) |
| 5 | ~40% |
| 10 | ~65% |
| 15 | ~75% |
| 20 | ~85% |
| 30 | ~90% |
| 50 | ~93% |
| 100 | ~95% |
Recommended Range: 15-30 stocks
Why not more than 30?
- Marginal diversification benefit very small
- Increased complexity and monitoring burden
- Higher transaction costs
- Diluted impact of high-conviction ideas
- "Closet indexing" (might as well own an ETF)
Why not fewer than 15?
- Insufficient elimination of unsystematic risk
- Concentration risk remains significant
- Single-stock events can severely impact portfolio
- Correlation underestimation risk
ETFs and Mutual Funds
For diversified funds (broad market, sector, international):
- 5-10 ETFs can provide excellent diversification
- Each ETF already holds dozens to thousands of stocks
- Focus on low overlap and complementary exposures
Example Well-Diversified 6-ETF Portfolio: 1. US Large Cap (S&P 500) 2. US Small/Mid Cap 3. International Developed Markets 4. Emerging Markets 5. US Bonds (Aggregate) 6. Real Estate (REITs)
Correlation and Diversification
Understanding Correlation
Correlation coefficient (ρ) ranges from -1.0 to +1.0:
| Correlation | Interpretation | Diversification Benefit |
|---|---|---|
| +1.0 | Perfect positive correlation | None (redundant holdings) |
| +0.7 to +0.9 | Very high correlation | Minimal |
| +0.3 to +0.7 | Moderate positive correlation | Good |
| 0 to +0.3 | Low positive correlation | Excellent |
| 0 | No correlation | Maximum benefit |
| -0.3 to 0 | Low negative correlation | Excellent (hedging) |
| < -0.3 | Moderate to strong negative correlation | Hedging properties |
Typical Stock Correlations
Within Same Sector:
- Large tech stocks (AAPL, MSFT, GOOGL): ρ ≈ 0.6-0.8
- Banks (JPM, BAC, WFC): ρ ≈ 0.7-0.9
- Oil companies (XOM, CVX): ρ ≈ 0.8-0.9
Across Different Sectors:
- Tech vs Healthcare: ρ ≈ 0.3-0.5
- Utilities vs Technology: ρ ≈ 0.2-0.4
- Consumer Staples vs Energy: ρ ≈ 0.3-0.5
Defensive vs Cyclical:
- Utilities vs Industrials: ρ ≈ 0.2-0.4
- Consumer Staples vs Consumer Discretionary: ρ ≈ 0.4-0.6
US vs International:
- US stocks vs International Developed: ρ ≈ 0.7-0.9 (increasing over time)
- US stocks vs Emerging Markets: ρ ≈ 0.6-0.8
Stocks vs Bonds:
- US Stocks vs US Treasuries: ρ ≈ -0.2 to +0.3 (varies by regime)
- Stocks vs Corporate Bonds: ρ ≈ 0.4-0.6
Correlation Pitfalls
1. Correlation Instability
- Correlations increase during market crashes ("correlation goes to 1 in a crisis")
- Diversification benefits diminish when most needed
- Solution: Include truly uncorrelated assets (gold, volatility strategies)
2. Hidden Correlations
- Stocks may appear different but share common risk factors
- Example: Bank stocks + homebuilders both exposed to interest rates
- Solution: Analyze underlying risk factors, not just sector labels
3. Globalization Effect
- International diversification less effective than historically
- US and global markets increasingly correlated
- Solution: Still valuable, but expect lower diversification benefit than in past
Concentration Risk Measurement
Position Concentration
Single Position Thresholds:
| Position Size | Risk Level | Action |
|---|---|---|
| <5% | Low | Acceptable for all positions |
| 5-10% | Medium | Monitor, ensure high conviction |
| 10-15% | High | Trim recommended unless exceptional conviction |
| 15-20% | Very High | Trim immediately (except rare cases) |
| >20% | Extreme | Urgent trim required |
Top Holdings Concentration:
| Top 5 Holdings | Risk Assessment |
|---|---|
| <25% | Well-diversified |
| 25-40% | Moderate concentration |
| 40-60% | High concentration |
| >60% | Excessive concentration |
Example:
- If top 5 positions = 55% of portfolio → High concentration risk
- If largest single position = 18% → Immediate trim recommended
Sector Concentration
Sector Allocation Thresholds:
| Sector Weight | Risk Level | Guidance |
|---|---|---|
| <15% | Underweight | May be intentional or opportunity |
| 15-25% | Normal | Typical for major sectors |
| 25-30% | Moderate overweight | Monitor, ensure intentional |
| 30-40% | High overweight | Trim recommended |
| >40% | Excessive concentration | Urgent diversification needed |
S&P 500 Sector Benchmarks (approximate):
- Technology: 25-30%
- Healthcare: 12-15%
- Financials: 10-13%
- Consumer Discretionary: 10-12%
- Communication Services: 8-10%
- Industrials: 8-10%
- Consumer Staples: 6-8%
- Energy: 3-5%
- Utilities: 2-3%
- Real Estate: 2-3%
- Materials: 2-3%
Deviation Analysis:
- >10% above benchmark = Significant overweight (ensure intentional)
- >20% above benchmark = Excessive overweight (trim recommended)
Herfindahl-Hirschman Index (HHI)
Formula:
HHI = Σ(w_i × 100)²
Where w_i = weight of position i (as decimal)Interpretation:
| HHI Score | Concentration Level | Portfolio Characteristics |
|---|---|---|
| <1000 | Low concentration | Well-diversified (25+ equal positions) |
| 1000-1800 | Moderate concentration | Typical diversified portfolio (15-25 stocks) |
| 1800-2500 | High concentration | Concentrated portfolio (8-15 stocks) |
| >2500 | Very high concentration | Very concentrated (5-8 stocks) |
| >4000 | Extreme concentration | Poorly diversified (<5 stocks) |
Example Calculation:
Portfolio with 5 positions:
- Position A: 30% → (30)² = 900
- Position B: 25% → (25)² = 625
- Position C: 20% → (20)² = 400
- Position D: 15% → (15)² = 225
- Position E: 10% → (10)² = 100
HHI = 900 + 625 + 400 + 225 + 100 = 2250 (High concentration)
Multi-Dimensional Diversification
Effective diversification requires spreading risk across multiple dimensions:
1. Number of Holdings (Quantity)
- Target: 15-30 individual stocks OR 5-10 diversified funds
- Measure: Count of positions
- Risk: Too few = concentration; too many = over-diversification
2. Position Sizing (Weight)
- Target: No single position >10-15%, top 5 <40%
- Measure: HHI, top-N concentration
- Risk: Unequal weighting creates concentration despite many holdings
3. Sector Allocation (Industry)
- Target: No sector >30-35%, diversified across 6+ sectors
- Measure: Sector breakdown, compare to benchmark
- Risk: Industry-specific shocks (e.g., tech crash 2000, financial crisis 2008)
4. Market Cap (Size)
- Target: Mix of large-cap (60-70%), mid-cap (20-25%), small-cap (10-15%)
- Measure: Weighted average market cap, cap-based breakdown
- Risk: Small caps more volatile; large caps may underperform in recoveries
5. Geography (Region)
- Target: US 60-75%, International Developed 15-25%, Emerging Markets 5-15%
- Measure: Revenue geography, listing geography
- Risk: Country-specific risks (politics, currency, regulation)
6. Style (Growth vs Value)
- Target: Balanced or slight tilt based on market cycle
- Measure: Average P/E, P/B, growth rates of holdings
- Risk: Style rotation (growth outperforms in some periods, value in others)
7. Correlation (Independence)
- Target: Average pairwise correlation <0.6
- Measure: Correlation matrix of holdings
- Risk: High correlation = false diversification
8. Factor Exposures (Risk Factors)
- Target: Balanced exposure to momentum, quality, volatility, etc.
- Measure: Factor loadings (requires advanced analytics)
- Risk: Concentrated factor bets (e.g., all momentum stocks)
Practical Diversification Strategies
Strategy 1: Equal Weighting
Method: Each position gets equal allocation (e.g., 20 stocks = 5% each)
Pros:
- Simple to implement
- Automatic rebalancing to smaller positions
- Reduces concentration risk
Cons:
- Ignores conviction levels
- May overweight low-quality names
- Higher turnover (frequent rebalancing)
Best for: Passive investors, index-like approaches
Strategy 2: Conviction Weighting
Method: Allocate more to high-conviction ideas, less to lower conviction
Example Tiers:
- High conviction: 7-10% positions (5-8 stocks)
- Medium conviction: 4-6% positions (8-12 stocks)
- Low conviction / Satellite: 2-3% positions (5-10 stocks)
Pros:
- Reflects analytical edge
- Better risk-adjusted returns if skill exists
- Maintains diversification
Cons:
- Requires honest conviction assessment
- Risk of overconfidence
- Can lead to concentration
Best for: Active investors with research capability
Strategy 3: Risk Parity
Method: Allocate based on risk contribution, not dollar value
Example:
- Volatile stock (beta 1.8): 3% allocation
- Moderate stock (beta 1.0): 5% allocation
- Stable stock (beta 0.6): 8% allocation
Pros:
- True diversification of risk
- More stable portfolio performance
- Thoughtful risk management
Cons:
- Complex to implement
- Requires volatility estimates
- May overweight low-quality stable stocks
Best for: Sophisticated investors, risk-focused approaches
Strategy 4: Core-Satellite
Method:
- Core (60-80%): Diversified, low-cost index funds
- Satellite (20-40%): High-conviction individual stocks or sector bets
Pros:
- Combines passive diversification with active upside
- Reduces risk of stock-picking errors
- Cost-efficient
Cons:
- Performance depends on satellite selection
- Complexity in management
- Tax efficiency varies
Best for: Investors who want both diversification and active involvement
Diversification Quality Checklist
Use this checklist to assess portfolio diversification:
Position Diversification:
- [ ] Portfolio has 15-30 stocks (or 5-10 diversified funds)
- [ ] No single position exceeds 10% of portfolio
- [ ] No single position exceeds 15% of portfolio
- [ ] Top 5 positions represent less than 40% of portfolio
- [ ] HHI score below 1800
Sector Diversification:
- [ ] No single sector exceeds 30% of equity allocation
- [ ] Portfolio includes at least 6 different sectors
- [ ] Sector weights reasonably close to benchmark (within 15%)
- [ ] Balance between growth, defensive, and cyclical sectors
- [ ] No overconcentration in single industry (e.g., semiconductors within tech)
Correlation Diversification:
- [ ] Holdings span multiple industries with different drivers
- [ ] Average pairwise correlation estimated below 0.6
- [ ] Not all positions are high-beta growth stocks
- [ ] Includes mix of cyclical and defensive names
- [ ] Some low-correlation positions included (staples, utilities, healthcare)
Geographic Diversification:
- [ ] International exposure present (15-30% of equities)
- [ ] Not 100% dependent on US economic performance
- [ ] Emerging market exposure if appropriate for risk tolerance
- [ ] Consider revenue geography, not just listing location
Market Cap Diversification:
- [ ] Mix of large-cap, mid-cap, and potentially small-cap
- [ ] Not exclusively mega-caps (>$500B)
- [ ] Not exclusively small-caps (<$2B)
- [ ] Weighted average market cap appropriate for risk tolerance
Asset Class Diversification:
- [ ] Equity allocation matches risk tolerance
- [ ] Fixed income present (unless very aggressive allocation)
- [ ] Cash buffer for opportunities and liquidity
- [ ] Alternative assets if appropriate (real estate, commodities)
Common Diversification Mistakes
Mistake 1: False Diversification
Problem: Holding many stocks that are highly correlated
Example:
- Portfolio: AAPL, MSFT, GOOGL, AMZN, META, NVDA, TSLA (all large-cap tech/growth)
- Appears diversified (7 stocks)
- Actually highly concentrated (single sector, similar risk factors)
Solution: Diversify across sectors, not just number of names
Mistake 2: Over-Diversification ("Diworsification")
Problem: Holding too many positions, diluting returns with no additional risk reduction
Example:
- 100 individual stock positions
- Overlap with index funds
- Closet indexing with higher fees
Solution: Stick to 15-30 best ideas OR use low-cost index funds
Mistake 3: Home Country Bias
Problem: Overweighting domestic stocks, missing global opportunities
Example:
- US investor with 95% US stocks
- US represents ~60% of global market cap
- Missing international diversification benefit
Solution: Allocate 15-30% to international equities
Mistake 4: Employer Stock Concentration
Problem: Large position in employer stock creates correlated life risks
Example:
- 40% of portfolio in employer stock
- Job + portfolio both dependent on same company
- "Double jeopardy" if company struggles
Solution: Trim to <10% of portfolio, diversify proceeds
Mistake 5: Sector Drift
Problem: Letting winners run creates unintended sector concentration
Example:
- Tech stocks appreciate 200%, now 50% of portfolio
- Investor didn't actively overweight tech, just didn't rebalance
- Concentrated risk without conviction
Solution: Regular rebalancing to maintain diversification
Mistake 6: Forgetting About Bonds
Problem: 100% equities for investors who can't handle volatility
Example:
- Aggressive investor holds all stocks
- Market drops 30%, investor panics and sells at bottom
- Would have been better with 70/30 stock/bond mix
Solution: Match allocation to risk tolerance and time horizon
Mistake 7: Low-Quality Diversification
Problem: Adding poor-quality stocks just to increase position count
Example:
- Has 20 quality stocks, adds 10 speculative names to "diversify"
- Speculative names drag down returns without meaningfully reducing risk
- Quality dilution
Solution: Diversify within quality standards, don't lower bar for diversification
Advanced Topics
Factor-Based Diversification
Beyond traditional diversification, consider factor exposures:
Common Factors:
- Value: Low P/E, P/B stocks
- Growth: High revenue/earnings growth
- Momentum: Recent price performance
- Quality: High ROE, stable earnings
- Low Volatility: Low beta, stable returns
- Size: Small cap vs large cap
Factor Diversification:
- Avoid loading entirely on one factor (e.g., all momentum stocks)
- Balance factor exposures or tilt deliberately
- Recognize factor cycles (value outperforms in some periods, growth in others)
Tail Risk and Black Swans
Problem: Normal diversification fails in extreme events
2008 Financial Crisis Example:
- Stocks fell 50%+
- Most correlations approached 1.0
- Traditional diversification provided limited protection
Solutions:
- Include uncorrelated assets: Gold, long-volatility strategies, managed futures
- Tail hedges: Put options, VIX calls (expensive, insurance-like)
- Portfolio construction: Barbell approach (safe core + aggressive satellites)
Dynamic Diversification
Concept: Adjust diversification based on market conditions
High Volatility Regimes:
- Increase diversification (more positions, lower concentration)
- Add defensive positions
- Reduce correlation among holdings
Low Volatility Regimes:
- Can handle slightly higher concentration
- Focus on highest conviction ideas
- Accept higher correlation
Implementation Challenge: Requires market regime detection and discipline
Summary
Key Principles:
1. Diversification reduces unsystematic risk without eliminating systematic risk 2. Optimal range: 15-30 individual stocks OR 5-10 diversified funds 3. Multi-dimensional approach: Number, weight, sector, geography, correlation 4. Avoid false diversification: Many holdings with high correlation 5. Avoid over-diversification: Too many positions dilute returns 6. Regular rebalancing prevents concentration drift 7. Match to risk tolerance: More diversification for lower risk tolerance
Practical Guidelines:
- No single stock >10-15%
- No single sector >30-35%
- Top 5 holdings <40% of portfolio
- 6+ sectors represented
- International exposure 15-30%
- Asset allocation matches time horizon and risk tolerance
Remember: Diversification is about risk management, not return maximization. A well-diversified portfolio sacrifices some upside potential to protect against catastrophic losses. The goal is to "stay in the game" through all market conditions.
Portfolio Risk Metrics
This document provides comprehensive guidance on measuring and interpreting portfolio risk using standard financial metrics.
Overview
Portfolio risk assessment requires both quantitative metrics and qualitative judgment. This guide covers:
1. Volatility-based metrics (standard deviation, beta) 2. Downside risk measures (maximum drawdown, semi-deviation) 3. Risk-adjusted return metrics (Sharpe ratio, Sortino ratio) 4. Concentration and correlation metrics 5. Interpretation frameworks for different investor types
Volatility Metrics
Standard Deviation (σ)
Definition: Measure of how much returns vary from the average return over time.
Formula:
σ = √[Σ(R_i - R_avg)² / (n-1)]
Where:
R_i = Return in period i
R_avg = Average return
n = Number of periodsInterpretation:
| Annual Std Dev | Risk Level | Typical Assets |
|---|---|---|
| <5% | Very Low | Cash, short-term bonds |
| 5-10% | Low | Bond portfolios, conservative balanced |
| 10-15% | Moderate | Balanced portfolios (60/40), dividend stocks |
| 15-20% | High | Stock portfolios, growth stocks |
| >20% | Very High | Small caps, emerging markets, sector funds |
S&P 500 Historical: ~15-18% annualized standard deviation
Usage in Portfolio Analysis:
- Compare portfolio volatility to benchmarks
- Assess if volatility matches investor risk tolerance
- Track changes in volatility over time (increasing volatility = warning sign)
Limitations:
- Assumes normal distribution (actual returns have "fat tails")
- Treats upside and downside volatility equally
- Based on historical data (may not predict future)
Beta (β)
Definition: Measure of portfolio sensitivity to market movements.
Formula:
β = Cov(R_portfolio, R_market) / Var(R_market)
Or estimated as:
β = (Σw_i × β_i)
Where:
w_i = Weight of position i
β_i = Beta of position iInterpretation:
| Beta | Market Sensitivity | Portfolio Behavior |
|---|---|---|
| β < 0.5 | Very low | Defensive, low correlation to market |
| β = 0.5-0.8 | Low | Below-market volatility, defensive tilt |
| β = 0.8-1.0 | Moderate | Slightly less volatile than market |
| β = 1.0 | Market | Moves in line with market (index-like) |
| β = 1.0-1.3 | Moderate-high | More volatile than market |
| β = 1.3-1.6 | High | Significantly more volatile |
| β > 1.6 | Very high | Extremely volatile, aggressive |
Typical Security Betas:
- Utilities: 0.4-0.7
- Consumer Staples: 0.5-0.8
- Healthcare: 0.8-1.1
- S&P 500 Index: 1.0
- Technology: 1.1-1.5
- Small-cap growth: 1.3-2.0
- Leveraged ETFs: 2.0-3.0
Example Portfolio Beta Calculation:
Portfolio:
- 40% SPY (S&P 500 ETF, β=1.0): 0.40 × 1.0 = 0.40
- 30% QQQ (Nasdaq ETF, β=1.2): 0.30 × 1.2 = 0.36
- 20% VNQ (REIT ETF, β=0.9): 0.20 × 0.9 = 0.18
- 10% TLT (Bond ETF, β=0.3): 0.10 × 0.3 = 0.03
Portfolio Beta = 0.40 + 0.36 + 0.18 + 0.03 = 0.97
Interpretation: Portfolio expected to move 97% as much as the market (slightly defensive).
Usage:
- Assess portfolio aggressiveness
- Predict portfolio behavior in market moves (β=1.2 means 12% drop when market drops 10%)
- Identify need for hedging or rebalancing
Limitations:
- Beta changes over time
- Based on historical correlations
- May not hold in extreme markets
Semi-Deviation
Definition: Standard deviation of returns below the mean (focuses on downside volatility only).
Formula:
Semi-deviation = √[Σ(R_i - R_avg)² for all R_i < R_avg / n]Interpretation:
- Lower semi-deviation = better downside protection
- Useful for risk-averse investors who care more about losses than gains
- Typically 60-70% of standard deviation for symmetric distributions
Usage:
- Evaluate downside risk specifically
- Compare defensive vs aggressive strategies
- Input for Sortino ratio (risk-adjusted return metric)
Downside Risk Metrics
Maximum Drawdown (MDD)
Definition: Largest peak-to-trough decline in portfolio value over a specific period.
Formula:
MDD = (Trough Value - Peak Value) / Peak Value
Or: MDD = max[(P_peak - P_trough) / P_peak] over all peaksExample:
- Portfolio peak: $150,000 (March 2020)
- Portfolio trough: $105,000 (March 2020 crash)
- MDD = ($105k - $150k) / $150k = -30%
Historical Maximum Drawdowns:
| Asset/Portfolio | Max Drawdown | Period |
|---|---|---|
| S&P 500 | -57% | 2007-2009 (Financial Crisis) |
| S&P 500 | -34% | 2020 (COVID Crash) |
| Nasdaq 100 | -83% | 2000-2002 (Tech Bubble) |
| Nasdaq 100 | -32% | 2021-2022 (Rate Hikes) |
| 60/40 Portfolio | -32% | 2007-2009 |
| Treasury Bonds | -48% | 2020-2023 (Rising Rates) |
Risk Tolerance Guide:
| Investor Type | Max Acceptable Drawdown |
|---|---|
| Conservative | -10 to -15% |
| Moderate | -15 to -25% |
| Growth | -25 to -35% |
| Aggressive | -35 to -50% |
Usage:
- Assess worst-case historical scenario
- Compare to investor risk tolerance
- Set risk management triggers (e.g., hedge if drawdown >20%)
- Estimate recovery time needed
Recovery Time:
- 20% drawdown requires +25% gain to recover
- 30% drawdown requires +43% gain
- 50% drawdown requires +100% gain (doubling)
Current Drawdown
Definition: Decline from most recent peak to current value.
Formula:
Current Drawdown = (Current Value - Recent Peak Value) / Recent Peak ValueExample:
- Recent peak: $150,000 (last month)
- Current value: $142,500
- Current drawdown = ($142.5k - $150k) / $150k = -5%
Interpretation:
| Current Drawdown | Status | Action |
|---|---|---|
| 0% | At all-time high | Monitor for complacency |
| -1% to -5% | Minor pullback | Normal, no action |
| -5% to -10% | Moderate correction | Review positions, monitor |
| -10% to -20% | Correction | Assess portfolio, consider adjustments |
| >-20% | Bear market territory | Review allocation, consider rebalancing |
Usage:
- Real-time risk monitoring
- Identify when portfolio is under stress
- Trigger rebalancing or risk reduction
Value at Risk (VaR)
Definition: Maximum expected loss over a given time period at a given confidence level.
Example:
- 1-month VaR at 95% confidence = $10,000
- Interpretation: 95% confident that portfolio will not lose more than $10,000 in the next month (or: 5% chance of losing more than $10,000)
Calculation Methods:
1. Historical VaR: Use historical return distribution 2. Parametric VaR: Assume normal distribution, use mean and std dev 3. Monte Carlo VaR: Simulate thousands of scenarios
Simplified Parametric VaR Formula:
VaR = Portfolio Value × (z-score × σ - μ)
Where:
z-score = 1.65 for 95% confidence, 2.33 for 99% confidence
σ = Portfolio standard deviation (daily or monthly)
μ = Expected return (daily or monthly)Example Calculation:
- Portfolio value: $100,000
- Annual std dev: 18%
- Monthly std dev: 18% / √12 = 5.2%
- Expected monthly return: 0.5%
95% 1-month VaR:
VaR = $100,000 × (1.65 × 5.2% - 0.5%)
= $100,000 × (8.58% - 0.5%)
= $100,000 × 8.08%
= $8,080Interpretation: 95% confident that portfolio will not lose more than $8,080 in the next month.
Usage:
- Risk budgeting
- Setting position limits
- Regulatory compliance (for institutions)
Limitations:
- Assumes historical patterns continue
- Underestimates tail risk (extreme events)
- Doesn't tell you about losses beyond VaR threshold
Risk-Adjusted Return Metrics
Sharpe Ratio
Definition: Excess return per unit of risk (reward-to-variability ratio).
Formula:
Sharpe Ratio = (R_portfolio - R_f) / σ_portfolio
Where:
R_portfolio = Portfolio return (annualized)
R_f = Risk-free rate (typically 10-year Treasury)
σ_portfolio = Portfolio standard deviation (annualized)Example Calculation:
- Portfolio return: 12%
- Risk-free rate: 4%
- Portfolio std dev: 15%
Sharpe = (12% - 4%) / 15% = 8% / 15% = 0.53
Interpretation:
| Sharpe Ratio | Quality | Interpretation |
|---|---|---|
| < 0 | Poor | Return less than risk-free rate |
| 0 - 0.5 | Suboptimal | Low excess return for risk taken |
| 0.5 - 1.0 | Good | Adequate risk-adjusted return |
| 1.0 - 2.0 | Very Good | Strong risk-adjusted return |
| > 2.0 | Excellent | Exceptional risk-adjusted return |
Typical Sharpe Ratios:
- S&P 500 (long-term): 0.3-0.5
- Well-managed equity portfolio: 0.5-0.8
- Exceptional hedge fund: 1.0-1.5
- Market-neutral strategy: 1.5-2.0+
Usage:
- Compare different portfolios or strategies
- Assess if additional risk is being compensated
- Benchmark against market (S&P 500 Sharpe)
Limitations:
- Penalizes upside volatility equally with downside
- Assumes normal distribution
- Sensitive to time period chosen
Sortino Ratio
Definition: Like Sharpe ratio, but uses downside deviation instead of total volatility.
Formula:
Sortino Ratio = (R_portfolio - R_f) / Semi-deviation
Where semi-deviation only counts returns below risk-free rateExample:
- Portfolio return: 12%
- Risk-free rate: 4%
- Semi-deviation (downside only): 10%
Sortino = (12% - 4%) / 10% = 0.80
Interpretation:
- Higher Sortino = better downside-adjusted returns
- Sortino typically higher than Sharpe (since semi-deviation < standard deviation)
- Preferred metric for risk-averse investors
Usage:
- Evaluate strategies with asymmetric returns (e.g., option strategies)
- Focus on downside protection
- Compare portfolios with different return distributions
Calmar Ratio
Definition: Return relative to maximum drawdown.
Formula:
Calmar Ratio = Annualized Return / |Max Drawdown|Example:
- Annualized return: 10%
- Max drawdown: -25%
Calmar = 10% / 25% = 0.40
Interpretation:
| Calmar Ratio | Quality |
|---|---|
| < 0.5 | Poor (high drawdown relative to return) |
| 0.5 - 1.0 | Acceptable |
| 1.0 - 2.0 | Good |
| > 2.0 | Excellent (low drawdown, high return) |
Usage:
- Focus on worst-case scenarios
- Evaluate hedge funds and absolute return strategies
- Assess recovery potential
Concentration and Correlation Metrics
Concentration Metrics
1. Top-N Concentration
Percentage of portfolio in largest N positions:
Top-N % = (Σ Top N Position Values) / Total Portfolio ValueGuidelines:
- Top 1 position: <10% ideal, <15% maximum
- Top 5 positions: <40% ideal, <50% maximum
- Top 10 positions: <60% ideal, <70% maximum
2. Herfindahl-Hirschman Index (HHI)
(See diversification-principles.md for detailed explanation)
HHI = Σ(Weight_i × 100)²Quick Assessment:
- HHI < 1000: Well-diversified
- HHI 1000-1800: Moderately concentrated
- HHI > 1800: High concentration
Correlation Metrics
Average Pairwise Correlation
Average correlation between all position pairs:
Avg Correlation = Σ(ρ_ij) / Number of pairs
Where:
ρ_ij = correlation between positions i and j
Number of pairs = n(n-1)/2 for n positionsExample (5 positions):
- 10 pairs total
- Sum of correlations: 5.2
- Average: 5.2 / 10 = 0.52
Interpretation:
| Avg Correlation | Diversification Quality |
|---|---|
| < 0.3 | Excellent (low correlation) |
| 0.3 - 0.5 | Good |
| 0.5 - 0.7 | Moderate (typical equity portfolio) |
| > 0.7 | Poor (positions move together) |
Risk Scoring Framework
Composite Risk Score (0-100)
Combine multiple metrics into single score:
Scoring Formula:
Risk Score =
(Volatility Score × 30%) +
(Beta Score × 20%) +
(Drawdown Score × 25%) +
(Concentration Score × 25%)Individual Component Scores (0-100):
1. Volatility Score:
- <10% std dev: 0-20 points (low risk)
- 10-15% std dev: 20-40 points
- 15-20% std dev: 40-60 points
- 20-25% std dev: 60-80 points
- >25% std dev: 80-100 points (very high risk)
2. Beta Score:
- β < 0.8: 0-20 points
- β 0.8-1.0: 20-40 points
- β 1.0-1.3: 40-60 points
- β 1.3-1.6: 60-80 points
- β > 1.6: 80-100 points
3. Drawdown Score:
- Max DD <10%: 0-20 points
- Max DD 10-20%: 20-40 points
- Max DD 20-30%: 40-60 points
- Max DD 30-40%: 60-80 points
- Max DD >40%: 80-100 points
4. Concentration Score:
- HHI <1000: 0-20 points
- HHI 1000-1500: 20-40 points
- HHI 1500-2000: 40-60 points
- HHI 2000-2500: 60-80 points
- HHI >2500: 80-100 points
Composite Risk Score Interpretation:
| Score | Risk Level | Appropriate For |
|---|---|---|
| 0-20 | Very Low | Ultra-conservative, retirees |
| 20-40 | Low | Conservative investors |
| 40-60 | Moderate | Balanced investors |
| 60-80 | High | Growth-oriented investors |
| 80-100 | Very High | Aggressive, long time horizon |
Practical Risk Assessment Workflow
Step 1: Calculate Basic Metrics
1. Portfolio Beta (weighted average of position betas) 2. Standard Deviation (if historical data available, else estimate) 3. Maximum Drawdown (from portfolio history) 4. Current Drawdown (vs recent peak) 5. Top-5 Concentration (sum of 5 largest positions) 6. HHI (concentration index)
Step 2: Compare to Benchmarks
Against S&P 500:
- Is beta higher or lower than 1.0?
- Is volatility higher or lower than ~16%?
Against Risk Profile Targets:
- Does risk level match investor's stated risk tolerance?
- Is maximum drawdown acceptable?
Step 3: Identify Risk Concentrations
Position-Level:
- Any position >15%? → Immediate trim
- Top 5 >50%? → High concentration
Sector-Level:
- Any sector >35%? → Concentration risk
- Any sector missing? → Diversification gap
Factor-Level:
- All high-beta growth stocks? → Factor concentration
- All value stocks? → Style concentration
Step 4: Risk-Adjusted Performance
1. Calculate Sharpe Ratio (if return history available) 2. Compare to benchmark: Is portfolio delivering better risk-adjusted returns? 3. Calculate Sortino Ratio for downside focus 4. Assess if excess risk is being rewarded
Step 5: Generate Risk Assessment
Summary Format:
## Portfolio Risk Assessment
**Overall Risk Profile:** [Conservative / Moderate / Growth / Aggressive]
**Risk Score:** XX/100 ([Low / Medium / High / Very High])
**Key Metrics:**
- Portfolio Beta: X.XX (vs market 1.00)
- Estimated Volatility: XX% annualized
- Maximum Drawdown: -XX% (acceptable for [risk profile])
- Current Drawdown: -X% (vs recent peak)
**Risk Concentrations:**
- Top 5 positions: XX% of portfolio ([OK / High / Excessive])
- Largest single position: [SYMBOL] at XX% ([OK / Trim recommended])
- HHI: XXXX ([Well-diversified / Concentrated])
**Risk-Adjusted Performance:**
- Sharpe Ratio: X.XX ([Below / In-line / Above] market)
- Sortino Ratio: X.XX
- Performance for risk taken: [Excellent / Good / Fair / Poor]
**Risk Recommendations:**
- [List specific actions to reduce risk if needed]Risk Management Guidelines
When to Reduce Risk
Signals:
- Portfolio beta >1.5 for moderate risk tolerance investor
- Max drawdown exceeds investor's tolerance
- Single position >15% of portfolio
- Sector concentration >40%
- Current drawdown >20% (entering bear market)
Actions:
- Trim concentrated positions
- Add defensive sectors (Utilities, Staples, Healthcare)
- Increase bond allocation
- Raise cash levels
When to Increase Risk
Signals:
- Portfolio beta <0.7 for growth-oriented investor
- Cash position >15% (unless intentionally defensive)
- Underperforming benchmark significantly with lower volatility
- Long time horizon with conservative allocation
Actions:
- Add growth sectors (Technology, Consumer Discretionary)
- Increase equity allocation
- Deploy excess cash
- Add higher-conviction positions
Summary
Key Takeaways:
1. Multiple metrics needed: No single metric tells the full story 2. Volatility measures: Standard deviation and beta for overall risk 3. Downside risk: Maximum drawdown, current drawdown, VaR for worst-case scenarios 4. Risk-adjusted returns: Sharpe and Sortino ratios for performance quality 5. Concentration: HHI and top-N positions for diversification assessment 6. Match to investor: Risk metrics must align with risk tolerance and goals 7. Monitor continuously: Risk characteristics change as markets move
Practical Application:
- Calculate key metrics quarterly
- Compare to investor risk tolerance
- Identify concentrations and gaps
- Adjust allocation to maintain target risk level
- Document risk assessment in portfolio reports
Remember: Risk metrics are tools, not absolute truth. Use judgment and consider qualitative factors (market environment, economic outlook, investor circumstances) alongside quantitative metrics.
Position Evaluation Framework
This document provides a systematic framework for evaluating individual positions within a portfolio to determine appropriate actions: HOLD, ADD, TRIM, or SELL.
Overview
Position evaluation requires both quantitative analysis and qualitative judgment. This framework helps answer:
1. Is the original investment thesis still intact? 2. Is the position appropriately sized given current conviction and risk? 3. Has the valuation become stretched or attractive? 4. What is the expected forward return vs risk? 5. Are there better opportunities elsewhere?
Four-Factor Evaluation Model
Every position should be evaluated across four dimensions:
1. Thesis Validation (40% weight)
- Is the investment thesis playing out as expected?
- Have fundamentals improved, remained stable, or deteriorated?
- Are growth prospects intact or changed?
2. Valuation Assessment (30% weight)
- Is the stock overvalued, fairly valued, or undervalued?
- How does current valuation compare to historical range?
- How does it compare to peer group?
3. Position Sizing (20% weight)
- Is current position size appropriate?
- Does it match conviction level?
- Is it creating concentration risk?
4. Relative Opportunity (10% weight)
- Are there better uses of capital?
- Would selling this improve portfolio?
- Cost of holding vs deploying elsewhere
Detailed Evaluation Framework
Thesis Validation Analysis
Original Thesis Documentation:
For each position, document the original investment thesis:
Example Thesis Template:
Symbol: AAPL
Initial Thesis (Date: Jan 2023):
- Services revenue growing 15%+ annually
- Installed base expansion (1.8B → 2.0B devices)
- Margin expansion from services mix shift
- Capital return program (dividends + buybacks)
- Valuation: P/E 24x vs historical 18x, justified by services growth
Entry Price: $145
Target Price: $180 (12-month)
Expected Return: 24% (+2% dividend = 26% total)
Risk Factors: iPhone demand slowdown, China regulatory riskThesis Validation Checklist:
- [ ] Revenue/Earnings Growth: On track vs expectations?
- Expected: +15% revenue growth
- Actual: +12% (slightly below, acceptable / -5% (concerning))
- [ ] Margins: Improving, stable, or declining?
- Expected: Expanding by 100bps
- Actual: Expanded 80bps (close enough / Contracted 50bps (negative))
- [ ] Competitive Position: Strengthening or weakening?
- Market share trends
- New product success/failures
- Competitor actions
- [ ] Management Execution: Meeting targets?
- Guidance met/beaten/missed
- Capital allocation decisions
- Strategic pivots if any
- [ ] Industry Tailwinds: Still present?
- Secular trends intact?
- Regulatory changes
- Technology shifts
Thesis Status Classification:
| Status | Criteria | Action Bias |
|---|---|---|
| Strengthening | Fundamentals improving, thesis accelerating | Consider ADD |
| Intact | On track with expectations, no changes | HOLD |
| Weakening | Some concerns, thesis partially impaired | Consider TRIM |
| Broken | Thesis invalid, fundamentals deteriorating | SELL |
Valuation Assessment
Valuation Methodology:
Compare current valuation across multiple dimensions:
1. Historical Valuation Range
| Metric | Current | 1Y Avg | 3Y Avg | 5Y Avg | Min | Max |
|---|---|---|---|---|---|---|
| P/E | 28x | 25x | 22x | 20x | 12x | 35x |
| P/B | 6.5x | 5.8x | 5.2x | 4.8x | 3.5x | 8.0x |
| EV/EBITDA | 22x | 19x | 17x | 16x | 10x | 25x |
| Div Yield | 1.2% | 1.4% | 1.6% | 1.8% | 0.8% | 2.5% |
Analysis:
- Current P/E (28x) near 3Y max (35x) → Expensive vs history
- P/B elevated vs 5Y avg → Premium valuation
- Dividend yield low vs range → Not a value play
2. Peer Group Comparison
| Company | P/E | P/B | EV/EBITDA | Dividend Yield | Rev Growth | Margin |
|---|---|---|---|---|---|---|
| [Target] | 28x | 6.5x | 22x | 1.2% | 12% | 28% |
| Peer A | 22x | 4.2x | 18x | 1.8% | 8% | 22% |
| Peer B | 31x | 7.8x | 25x | 0.9% | 18% | 32% |
| Peer C | 25x | 5.1x | 20x | 1.5% | 10% | 25% |
| Sector Median | 25x | 5.5x | 20x | 1.4% | 11% | 26% |
Analysis:
- P/E slightly above sector median → Modest premium
- Growth (12%) above median (11%) → Premium partially justified
- Margins (28%) above median (26%) → Quality justifies some premium
- Assessment: Fair to slightly expensive vs peers
3. Growth-Adjusted Valuation (PEG Ratio)
PEG Ratio = P/E / Earnings Growth Rate
Example:
P/E: 28x
Expected EPS growth: 15%
PEG = 28 / 15 = 1.87
Interpretation:
< 1.0 = Undervalued
1.0-2.0 = Fair value
> 2.0 = Overvalued4. DCF Fair Value Estimate (Simplified)
If time permits, estimate intrinsic value using discounted cash flow:
Fair Value = (FCF × (1 + growth rate)^5) / (discount rate - terminal growth)
Example inputs:
Current FCF: $100B
Growth (5Y): 12%
Discount rate: 10%
Terminal growth: 4%Valuation Status Classification:
| Status | Criteria | Action Bias |
|---|---|---|
| Undervalued | Below historical avg, below peers, low PEG | ADD |
| Fair Value | In-line with history and peers | HOLD |
| Overvalued | Above historical range, premium to peers, high PEG | TRIM |
| Severely Overvalued | Extreme multiples, bubble-like | SELL |
Position Sizing Analysis
Current Position Assessment:
Position Size = Position Value / Total Portfolio Value
Example:
Position value: $18,000
Portfolio value: $120,000
Position size: 18,000 / 120,000 = 15%Position Sizing Guidelines:
| Conviction Level | Target Position Size | Max Position Size |
|---|---|---|
| High Conviction | 8-12% | 15% |
| Medium Conviction | 5-8% | 10% |
| Low Conviction / Speculative | 2-5% | 7% |
| Starter Position | 2-3% | 5% |
Position Sizing Risk Assessment:
| Current Size | Risk Level | Typical Action |
|---|---|---|
| <5% | Low | Can add if conviction high |
| 5-10% | Normal | Monitor |
| 10-15% | Elevated | Trim if conviction not very high |
| 15-20% | High | Trim recommended |
| >20% | Excessive | Urgent trim required |
Position Drift Analysis:
Track how position size has changed due to price appreciation:
Position Appreciation Impact:
Initial investment: $10,000 (10% of $100K portfolio)
Other holdings flat, this position doubled
Current value: $20,000 (18% of $110K portfolio)
Position drift: 10% → 18% (increased 8 percentage points)
Exceeded target: Yes (assuming 10% target)
Action: Trim back to 10-12% rangeRebalancing Calculation:
To trim from 18% to 10%:
Target value: $110,000 × 10% = $11,000
Current value: $20,000
Amount to sell: $20,000 - $11,000 = $9,000
Shares to sell: $9,000 / Current PriceRelative Opportunity Analysis
Opportunity Cost Framework:
Ask: "If I sold this position today, where would I deploy the capital?"
Comparison Matrix:
| Option | Expected Return | Risk Level | Conviction | Notes |
|---|---|---|---|---|
| Hold [Current] | 8% | Medium | Medium | Fairly valued, thesis intact |
| Alternative A | 15% | High | High | Undervalued, strong thesis |
| Alternative B | 10% | Low | Medium | Defensive, lower risk |
| Cash (wait) | 4% | None | N/A | Opportunity cost |
Decision Logic:
If (Alternative Expected Return - Hold Expected Return) > Switching Cost: → Consider selling current, buying alternative
Switching Costs to Consider:
- Taxes: Capital gains (15-20% long-term, ordinary income short-term)
- Transaction costs: Commissions (minimal) + bid-ask spread
- Opportunity risk: Wrong about alternative, miss rebound in current
Example Calculation:
Current position: Expected 8% return
Alternative: Expected 15% return
Differential: 7%
Unrealized gain: $8,000 on $20,000 position (67% gain)
Tax on sale (20% long-term): $8,000 × 0.20 = $1,600
After-tax proceeds: $20,000 - $1,600 = $18,400
After-tax opportunity gain (1 year):
Hold current: $20,000 × 1.08 = $21,600
Buy alternative: $18,400 × 1.15 = $21,160
Conclusion: Tax drag eliminates benefit for 1-year hold
Consider if: (1) Multi-year horizon, or (2) Tax-advantaged account, or (3) Can tax-loss harvest elsewherePosition Action Decision Matrix
Combine the four factors to determine action:
HOLD Decision
Criteria:
- ✅ Thesis: Intact or strengthening
- ✅ Valuation: Fair to undervalued
- ✅ Position Size: Within target range (5-10% for medium conviction)
- ✅ Relative Opportunity: No clearly better alternative after costs
Example:
Position: Johnson & Johnson (JNJ)
Thesis: ✅ Intact (healthcare demand, dividend aristocrat)
Valuation: ✅ Fair (P/E 16x vs 15x historical avg)
Position Size: ✅ 7% of portfolio (target range)
Opportunity: ✅ No compelling alternative in healthcare
Decision: HOLD
Rationale: Position performing as expected, appropriately sized, no reason to change
Next Review: Quarterly earnings (Q3 2024)ADD Decision
Criteria:
- ✅ Thesis: Strengthening or intact with high conviction
- ✅ Valuation: Undervalued or fair with improving fundamentals
- ✅ Position Size: Below target, room to add without excessive concentration
- ✅ Opportunity: Among top ideas, better than alternatives
Example:
Position: Meta Platforms (META)
Thesis: ✅ Strengthening (AI monetization exceeding expectations, cost discipline)
Valuation: ✅ Undervalued (P/E 22x vs 28x historical, PEG 1.2)
Position Size: ✅ 5% of portfolio (room to add to 8-10%)
Opportunity: ✅ Top conviction, better expected return than alternatives
Decision: ADD 3-5% more (increase position to 8-10% total)
Rationale: Thesis improving, valuation attractive, high conviction
Entry Strategy: Add 3% now, 2% more if pullback to $450 support
Risk Management: Set stop-loss at $420 (recent low)TRIM Decision
Criteria:
- ⚠️ Thesis: Weakening OR still intact but lower conviction
- ⚠️ Valuation: Overvalued or expensive vs historical/peers
- ⚠️ Position Size: Exceeded target (>12% for medium conviction, >15% for high conviction)
- ⚠️ Opportunity: Better alternatives available or risk reduction needed
Example:
Position: NVIDIA (NVDA)
Thesis: ✅ Intact (AI demand strong) ⚠️ but slowing growth rates expected
Valuation: ⚠️ Expensive (P/E 65x vs 45x historical, extended vs peers)
Position Size: ⚠️ 18% of portfolio (exceeded 15% max)
Opportunity: ⚠️ Other high-quality tech at better valuations
Decision: TRIM from 18% to 10-12%
Rationale: Valuation extended, position too large, take some profits
Trim Strategy: Sell 6% now, consider selling another 2% if rallies above $950
Redeployment: Add to underweight healthcare and financials sectors
Tax Strategy: Sell highest-cost-basis shares first (minimize tax impact)SELL Decision
Criteria:
- ❌ Thesis: Broken or significantly impaired
- OR: Valuation severely overvalued with deteriorating fundamentals
- OR: Better opportunities + need to reduce position count
- OR: Risk management (stop-loss triggered, risk too high)
Example:
Position: Teladoc (TDOC)
Thesis: ❌ Broken (telehealth adoption slower than expected, competition intense, path to profitability unclear)
Valuation: ❌ Expensive vs peers despite losses (EV/Sales 2.5x vs 1.2x sector)
Position Size: ⚠️ 4% of portfolio (not excessive, but capital can be better deployed)
Opportunity: ❌ Multiple better healthcare alternatives (UNH, ELW, CVS)
Decision: SELL (exit position entirely)
Rationale: Investment thesis has not materialized, competitive position weakening, capital better deployed elsewhere
Exit Strategy: Sell entire position over 2-3 days (avoid moving market)
Redeployment: Reallocate to UnitedHealth Group (stronger healthcare thesis)
Tax Benefit: Harvest $2,000 capital loss to offset gains
Lesson Learned: Avoid unprofitable growth stocks in competitive industriesPosition Review Checklist
Use this checklist when reviewing each position:
Fundamental Review
- [ ] Read recent earnings report and call transcript
- [ ] Review updated financial metrics (revenue, margins, EPS)
- [ ] Check for guidance changes (raised, lowered, maintained)
- [ ] Read recent analyst reports or news
- [ ] Verify competitive position (market share, new entrants)
Valuation Review
- [ ] Calculate current P/E, P/B, EV/EBITDA
- [ ] Compare to 1Y, 3Y, 5Y historical averages
- [ ] Compare to peer group
- [ ] Calculate PEG ratio
- [ ] Assess if valuation justified by fundamentals
Portfolio Fit Review
- [ ] Calculate current position size (% of portfolio)
- [ ] Assess if size matches conviction
- [ ] Check if position contributes to concentration risk
- [ ] Verify sector allocation impact
- [ ] Evaluate correlation with other holdings
Risk Review
- [ ] Identify new risks (regulatory, competitive, macro)
- [ ] Assess if stop-loss should be updated
- [ ] Review downside scenario (what could go wrong?)
- [ ] Check beta and volatility (has it increased?)
- [ ] Evaluate if risk/reward still favorable
Action Decision
- [ ] Does thesis warrant HOLD/ADD/TRIM/SELL?
- [ ] If change needed, what is specific action?
- [ ] What is timeline for action (immediate, gradual, wait for level)?
- [ ] What are trigger points for future action?
- [ ] Document decision and rationale
Common Position Evaluation Mistakes
Mistake 1: Anchoring to Purchase Price
Problem: "I bought at $100, now it's $80, I'll wait to break even before selling"
Why wrong: Purchase price is irrelevant to forward returns. Sunk cost fallacy.
Correct approach: Evaluate position based on current fundamentals and forward outlook. If thesis broken, sell now regardless of gain/loss.
Mistake 2: Letting Winners Run Indefinitely
Problem: "It's my best performer, I'll never sell!"
Why wrong: Position becomes oversized, creates concentration risk, valuation may become stretched.
Correct approach: Trim winners back to target weight periodically. Take some profits. Reinvest in undervalued areas.
Mistake 3: Selling Losers Too Quickly
Problem: "It's down 15%, I need to cut losses"
Why wrong: Volatility is normal. Selling in panic often locks in losses before recovery.
Correct approach: Evaluate if thesis still intact. If yes, consider adding (averaging down). If no, sell regardless of loss size.
Mistake 4: Ignoring Valuation ("Quality at Any Price")
Problem: "This is a great company, valuation doesn't matter"
Why wrong: Even great companies can be overvalued. Future returns depend on entry price.
Correct approach: Great companies at fair prices. Trim when expensive, add when cheap, even for high-quality names.
Mistake 5: Falling in Love with Stocks
Problem: Emotional attachment prevents objective evaluation
Why wrong: Stocks don't love you back. Capital allocation should be ruthlessly rational.
Correct approach: Treat positions as capital deployment decisions, not relationships. Be willing to sell anything if better opportunity exists.
Summary
Position Evaluation Framework:
1. Thesis Validation (40%) - Is the story still true? 2. Valuation Assessment (30%) - Is the price right? 3. Position Sizing (20%) - Is the size appropriate? 4. Relative Opportunity (10%) - Are there better uses of capital?
Four Actions:
- HOLD: Thesis intact, fair valuation, appropriate size
- ADD: Strengthening thesis, undervalued, room to add
- TRIM: Weakening thesis OR expensive OR oversized
- SELL: Broken thesis OR severely overvalued OR much better alternatives
Best Practices:
- Review positions quarterly (at minimum)
- Document thesis at purchase
- Update thesis as new information emerges
- Be willing to admit mistakes early
- Trim winners to maintain diversification
- Average down only if thesis intact
- Ignore purchase price (sunk cost)
- Remain objective and unemotional
Remember: Position evaluation is both art and science. Combine quantitative metrics with qualitative judgment. When in doubt, reduce position size rather than holding full position or selling entirely.
#!/usr/bin/env python3
"""
Test script for Alpaca API connection.
This script verifies that Alpaca API credentials are correctly configured
and tests basic API functionality.
Usage:
python3 check_alpaca_connection.py
Environment Variables:
ALPACA_API_KEY: Your Alpaca API Key ID
ALPACA_SECRET_KEY: Your Alpaca Secret Key
ALPACA_PAPER: Set to 'true' for paper trading, 'false' for live (default: true)
"""
import os
import sys
try:
import requests
except ImportError:
print("ERROR: requests library not installed")
print("Install with: pip install requests")
sys.exit(1)
def load_credentials():
"""Load Alpaca API credentials from environment variables."""
api_key = os.environ.get("ALPACA_API_KEY")
secret_key = os.environ.get("ALPACA_SECRET_KEY")
paper = os.environ.get("ALPACA_PAPER", "true").lower() == "true"
if not api_key or not secret_key:
print("ERROR: Alpaca API credentials not found")
print("\nPlease set environment variables:")
print(" export ALPACA_API_KEY='your_api_key_id'")
print(" export ALPACA_SECRET_KEY='your_secret_key'")
print(" export ALPACA_PAPER='true' # or 'false' for live trading")
print("\nOr add to your shell config file (~/.bashrc or ~/.zshrc):")
print(" echo 'export ALPACA_API_KEY=\"your_key\"' >> ~/.bashrc")
print(" echo 'export ALPACA_SECRET_KEY=\"your_secret\"' >> ~/.bashrc")
print(" echo 'export ALPACA_PAPER=\"true\"' >> ~/.bashrc")
print(" source ~/.bashrc")
sys.exit(1)
return api_key, secret_key, paper
def get_base_url(paper=True):
"""Get appropriate Alpaca API base URL."""
if paper:
return "https://paper-api.alpaca.markets"
else:
return "https://api.alpaca.markets"
def test_account_info(api_key, secret_key, base_url):
"""Test account information endpoint."""
print("\n" + "=" * 60)
print("Testing Alpaca Account API Connection")
print("=" * 60)
headers = {"APCA-API-KEY-ID": api_key, "APCA-API-SECRET-KEY": secret_key}
try:
response = requests.get(f"{base_url}/v2/account", headers=headers)
if response.status_code == 200:
account = response.json()
print("✓ Successfully connected to Alpaca API\n")
print(f"Account Status: {account.get('status')}")
print(f"Account Number: {account.get('account_number')}")
print(f"Equity: ${float(account.get('equity', 0)):,.2f}")
print(f"Cash: ${float(account.get('cash', 0)):,.2f}")
print(f"Buying Power: ${float(account.get('buying_power', 0)):,.2f}")
print(f"Portfolio Value: ${float(account.get('portfolio_value', 0)):,.2f}")
# Check if account is restricted
if account.get("account_blocked") or account.get("trading_blocked"):
print("\n⚠ WARNING: Account has restrictions")
if account.get("account_blocked"):
print(" - Account is blocked")
if account.get("trading_blocked"):
print(" - Trading is blocked")
return True
elif response.status_code == 401:
print("✗ Authentication failed")
print("\nPossible causes:")
print(" 1. Invalid API credentials")
print(" 2. Using paper trading keys with live URL (or vice versa)")
print(" 3. API keys have been revoked")
print("\nSolutions:")
print(" 1. Verify API Key ID and Secret Key in Alpaca dashboard")
print(" 2. Check ALPACA_PAPER environment variable matches your keys")
print(" 3. Regenerate API keys if needed")
return False
elif response.status_code == 403:
print("✗ Forbidden - insufficient permissions")
print("\nPossible causes:")
print(" 1. API keys don't have required permissions")
print(" 2. Account not approved for trading")
print("\nSolutions:")
print(" 1. Regenerate API keys with full permissions")
print(" 2. Complete account approval process in Alpaca dashboard")
return False
else:
print(f"✗ Unexpected error: HTTP {response.status_code}")
print(f"Response: {response.text}")
return False
except requests.exceptions.RequestException as e:
print(f"✗ Network error: {e}")
print("\nPossible causes:")
print(" 1. No internet connection")
print(" 2. Alpaca API is down (check status.alpaca.markets)")
print(" 3. Firewall blocking connection")
return False
def test_positions(api_key, secret_key, base_url):
"""Test positions endpoint."""
print("\n" + "=" * 60)
print("Testing Positions API")
print("=" * 60)
headers = {"APCA-API-KEY-ID": api_key, "APCA-API-SECRET-KEY": secret_key}
try:
response = requests.get(f"{base_url}/v2/positions", headers=headers)
if response.status_code == 200:
positions = response.json()
if len(positions) == 0:
print("✓ API connection successful")
print("Portfolio is empty (no positions)")
else:
print("✓ API connection successful")
print(f"Found {len(positions)} position(s):\n")
total_value = 0
total_pl = 0
for pos in positions:
symbol = pos.get("symbol")
qty = float(pos.get("qty", 0))
avg_price = float(pos.get("avg_entry_price", 0))
current_price = float(pos.get("current_price", 0))
market_value = float(pos.get("market_value", 0))
unrealized_pl = float(pos.get("unrealized_pl", 0))
unrealized_plpc = float(pos.get("unrealized_plpc", 0)) * 100
total_value += market_value
total_pl += unrealized_pl
pl_sign = "+" if unrealized_pl >= 0 else ""
print(f"{symbol}:")
print(f" Quantity: {qty:.2f} shares")
print(f" Avg Entry: ${avg_price:.2f}")
print(f" Current Price: ${current_price:.2f}")
print(f" Market Value: ${market_value:,.2f}")
print(
f" Unrealized P/L: {pl_sign}${unrealized_pl:,.2f} ({pl_sign}{unrealized_plpc:.2f}%)"
)
print()
print(f"Total Portfolio Value: ${total_value:,.2f}")
print(f"Total Unrealized P/L: ${total_pl:,.2f}")
return True
else:
print(f"✗ Error fetching positions: HTTP {response.status_code}")
print(f"Response: {response.text}")
return False
except requests.exceptions.RequestException as e:
print(f"✗ Network error: {e}")
return False
def test_market_data(api_key, secret_key):
"""Test market data API (optional)."""
print("\n" + "=" * 60)
print("Testing Market Data API (Optional)")
print("=" * 60)
# Market data uses different base URL
base_url = "https://data.alpaca.markets"
headers = {"APCA-API-KEY-ID": api_key, "APCA-API-SECRET-KEY": secret_key}
# Test with a simple quote request for AAPL
try:
response = requests.get(f"{base_url}/v2/stocks/AAPL/quotes/latest", headers=headers)
if response.status_code == 200:
print("✓ Market data API accessible")
quote = response.json().get("quote", {})
if quote:
print(
f"Sample quote (AAPL): Bid ${quote.get('bp', 0):.2f}, Ask ${quote.get('ap', 0):.2f}"
)
elif response.status_code == 402:
print("⚠ Market data requires paid subscription")
print(" Free tier provides delayed data only")
print(" This is normal for free accounts")
else:
print(f"⚠ Market data API returned HTTP {response.status_code}")
print(" This won't affect portfolio management functionality")
except Exception as e:
print(f"⚠ Could not test market data API: {e}")
print(" This won't affect portfolio management functionality")
def main():
"""Main test function."""
print("Alpaca API Connection Test")
print("=" * 60)
# Load credentials
api_key, secret_key, paper = load_credentials()
base_url = get_base_url(paper)
mode = "PAPER TRADING" if paper else "LIVE TRADING"
print(f"\nMode: {mode}")
print(f"Base URL: {base_url}")
print(f"API Key: {api_key[:8]}...{api_key[-4:]}")
# Run tests
success = True
# Test 1: Account info
if not test_account_info(api_key, secret_key, base_url):
success = False
# Test 2: Positions (only if account test passed)
if success:
if not test_positions(api_key, secret_key, base_url):
success = False
# Test 3: Market data (optional, doesn't affect overall success)
test_market_data(api_key, secret_key)
# Summary
print("\n" + "=" * 60)
print("Test Summary")
print("=" * 60)
if success:
print("✓ All tests passed successfully")
print("\nYour Alpaca API connection is properly configured.")
print("The Portfolio Manager skill should work correctly.")
print("\nNext steps:")
print(" 1. Use Portfolio Manager skill in Claude: 'Analyze my portfolio'")
print(" 2. Review the generated portfolio analysis report")
print(" 3. Follow rebalancing recommendations if provided")
return 0
else:
print("✗ Some tests failed")
print("\nPlease review the errors above and:")
print(" 1. Verify your API credentials are correct")
print(" 2. Check that ALPACA_PAPER setting matches your API keys")
print(" 3. Ensure your Alpaca account is active and approved")
print(" 4. Check Alpaca API status: https://status.alpaca.markets/")
print("\nFor help, see: portfolio-manager/references/alpaca-mcp-setup.md")
return 1
if __name__ == "__main__":
sys.exit(main())
"""Shared fixtures for Portfolio Manager tests"""
import os
import sys
# Add scripts directory to path so modules can be imported
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
# Add tests directory to path so helpers can be imported
sys.path.insert(0, os.path.dirname(__file__))
Related skills
Forks & variants (1)
Portfolio Manager has 1 known copy in the catalog totaling 14 installs. They canonicalize to this original listing.
- aaaaqwq - 14 installs
How it compares
Choose Portfolio Manager when you need live Alpaca-linked analysis inside an agent; use generic spreadsheet or BI tools for manual, non-API portfolio tracking.
FAQ
What does portfolio-manager do?
Manage multi-asset portfolios with allocation, rebalancing, and risk metrics.
When should I use portfolio-manager?
User manages portfolio allocation, rebalancing, or multi-asset risk metrics.
Is portfolio-manager safe to install?
Review the Security Audits panel on this page before installing in production.