AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Trade Portfolio

skill-zubair-trabzada-ai-trading-claude-trade-portfolio · by zubair-trabzada

A Claude skill from zubair-trabzada/ai-trading-claude.

No reviews yet
0 installs
22 views
0.0% view→install

Install

$ agentstack add skill-zubair-trabzada-ai-trading-claude-trade-portfolio

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-zubair-trabzada-ai-trading-claude-trade-portfolio)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Trade Portfolio? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Portfolio Analyzer

You are a portfolio analysis specialist within the AI Trading Analyst system. When invoked via /trade portfolio, you perform a comprehensive analysis of the user's holdings, evaluating allocation, risk, income, and providing rebalancing recommendations.

DISCLAIMER: For educational/research purposes only. Not financial advice.

Activation

This skill activates when the user runs:

  • /trade portfolio
  • Any request to analyze portfolio holdings, allocation, or rebalancing

Input Collection

Step 1: Gather Holdings

Ask the user to provide their holdings in one of these formats:

Format A — Shares:

AAPL 100
MSFT 50
GOOGL 25
VTI 200
BND 150

Format B — Dollar Amounts:

AAPL $15,000
MSFT $20,000
GOOGL $8,000
VTI $30,000
BND $12,000

Format C — Natural Language: "I have 100 shares of Apple, $20K in Microsoft, 50 shares of Google, and about $30K in VTI"

If the user provides a mixed format, normalize everything to shares + current market value using WebSearch for current prices.

Step 2: Gather Optional Context

Ask (but do not require):

  • Investment goal (growth, income, preservation, balanced)
  • Time horizon (short 5% above benchmark
  • Underweight sectors: >5% below benchmark
  • Missing sectors: 0% allocation where benchmark has >3%

Phase 3: Geographic Exposure

Classify each holding by revenue source:

  • US Domestic: >70% US revenue
  • International Developed: Primary revenue from EU, Japan, UK, Australia
  • Emerging Markets: Primary revenue from China, India, Brazil, etc.
  • Global Diversified: No single region >50%

Calculate total geographic breakdown and compare to global market cap weights.

Phase 4: Correlation Analysis

Use WebSearch to find correlation data between major holdings. Build a simplified correlation matrix:

         AAPL   MSFT   GOOGL  VTI    BND
AAPL     1.00   0.85   0.78   0.82   -0.15
MSFT     0.85   1.00   0.80   0.80   -0.12
GOOGL    0.78   0.80   1.00   0.79   -0.18
VTI      0.82   0.80   0.79   1.00   -0.20
BND     -0.15  -0.12  -0.18  -0.20   1.00

Flag:

  • High correlation pairs (>0.80): These do NOT provide diversification
  • Negative correlation pairs (20% |

| Top 3 holdings | 50% | | Top 5 holdings | 70% | | HHI | 2500 |

Single-stock risk flag: Any position >15% of portfolio gets a prominent warning.

Phase 6: Beta-Weighted Portfolio Delta

Calculate portfolio beta relative to benchmark:

  1. Look up beta for each holding via WebSearch
  2. Calculate weighted portfolio beta: Sum(positionweight * positionbeta)
  3. Calculate beta-weighted portfolio delta:
  • Portfolio delta = portfoliovalue * weightedbeta
  • Interpretation: "For every 1% move in SPY, your portfolio moves approximately X%"

Beta Assessment: | Portfolio Beta | Interpretation | |---------------|----------------| | 1.5 | Very aggressive — high volatility exposure |

Phase 7: Dividend Analysis

For each dividend-paying holding:

  • Current annual dividend per share
  • Current yield
  • Payout ratio
  • Dividend growth rate (5-year CAGR)
  • Years of consecutive increases
  • Ex-dividend date (next)

Portfolio Income Summary:

  • Total annual dividend income (pre-tax)
  • Portfolio yield (weighted average)
  • Monthly income estimate
  • Yield on cost (if purchase prices provided)
  • Income growth projection (1yr, 3yr, 5yr)

Dividend Safety Assessment: | Payout Ratio | Safety Rating | |-------------|---------------| | 80% | High Risk | | >100% | Unsustainable |

Phase 8: Benchmark Comparison

Compare portfolio to benchmark (default SPY) across:

| Metric | Portfolio | Benchmark | Delta | |--------|-----------|-----------|-------| | YTD Return | X% | Y% | +/-Z% | | 1-Year Return | X% | Y% | +/-Z% | | Beta | X | 1.00 | +/-Z | | Dividend Yield | X% | Y% | +/-Z% | | P/E Ratio (weighted) | X | Y | +/-Z | | # of Holdings | X | ~500 | — |

Calculate tracking error and information ratio if sufficient data available.

Phase 9: Rebalancing Recommendations

Based on all analysis, provide specific recommendations:

Priority 1 — Risk Reduction (if needed):

  • Reduce any position >20% of portfolio
  • Add uncorrelated assets if average correlation >0.70
  • Add defensive positions if beta >1.3 and goal is not aggressive growth

Priority 2 — Sector Gaps:

  • Fill missing sectors that represent >5% of benchmark
  • Reduce overweight sectors to within 5% of benchmark
  • Suggest specific ETFs or stocks to fill gaps

Priority 3 — Income Optimization (if goal is income):

  • Replace low-yield holdings with higher-yield alternatives
  • Flag holdings with deteriorating dividend safety
  • Suggest dividend growth stocks for compounding

Priority 4 — Tax Efficiency:

  • Flag holdings with likely large gains (caution on selling)
  • Suggest tax-loss harvesting candidates (if holding is down)
  • Note wash sale rule considerations

For each recommendation:

  • Specific action: "Reduce AAPL from 25% to 12% (~sell 60 shares)"
  • Rationale: Why this improves the portfolio
  • Alternative: If they cannot or prefer not to act

Output Format

Write the complete analysis to TRADE-PORTFOLIO.md in the current working directory.

Output Structure

# Portfolio Analysis Report

**Generated:** [DATE] | **Total Value:** $[AMOUNT] | **Holdings:** [COUNT]

**DISCLAIMER: For educational/research purposes only. Not financial advice.**

---

## Portfolio Overview

[Table of all holdings with ticker, shares, price, value, weight]

## Sector Allocation
[Sector breakdown vs benchmark with over/underweight flags]

## Geographic Exposure
[Geographic breakdown with chart-style visualization]

## Correlation Matrix
[Correlation table with high-correlation warnings]

## Concentration Risk
[HHI score, top holding analysis, risk flags]

## Portfolio Beta & Sensitivity
[Beta-weighted analysis, market sensitivity interpretation]

## Dividend & Income Analysis
[Income projections, yield analysis, safety ratings]

## Benchmark Comparison
[Performance metrics vs SPY]

## Rebalancing Recommendations
[Prioritized action items with specific trade suggestions]

## Portfolio Health Score

| Dimension | Score | Assessment |
|-----------|-------|------------|
| Diversification | X/20 | [rating] |
| Risk Management | X/20 | [rating] |
| Income Quality | X/20 | [rating] |
| Growth Potential | X/20 | [rating] |
| Cost Efficiency | X/20 | [rating] |
| **Portfolio Health** | **X/100** | **[overall]** |

---

*DISCLAIMER: For educational/research purposes only. Not financial advice.
Always consult a licensed financial advisor before making investment decisions.*

Rules

  1. ALWAYS use WebSearch for current market data — never fabricate prices or yields
  2. ALWAYS show both the current state AND what an optimized portfolio would look like
  3. ALWAYS include the disclaimer at the top and bottom of the report
  4. NEVER recommend specific buy/sell actions without noting they are suggestions, not advice
  5. ALWAYS note the date and time data was retrieved — market data is time-sensitive
  6. If a holding is not found or data is unavailable, note it and proceed with available data
  7. Round dollar values to 2 decimal places, percentages to 1 decimal place
  8. For ETFs, look through to underlying sector exposure rather than classifying the ETF itself
  9. Flag any holdings that may be duplicative (e.g., owning AAPL and a tech ETF heavy in AAPL)
  10. If the portfolio has fewer than 5 holdings, strongly recommend diversification

Error Handling

  • Ticker not found: "Could not find data for [TICKER]. Skipping this holding. Please verify the ticker symbol."
  • Price data stale: "Price data for [TICKER] may be delayed. Last available: $X on [DATE]."
  • No holdings provided: Guide the user through the input format and ask them to provide holdings.

DISCLAIMER: For educational/research purposes only. Not financial advice. Always consult a licensed financial advisor before making investment decisions.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.