Variation Overview
Portfolio Agent provides 4 progressive variations, each building on the previous with additional capabilities for more advanced use cases.
33
V1: Core
Holdings & history
42
V2: Advisor
Risk + tax
53
V3: Options
Options workflows
70
V4: Complete
Monitoring + analytics
Variation 1: Core Analytics (33 tools)
Holdings, Allocation, Performance, History
Essential tools for portfolio analysis covering holdings, allocation, performance, comparisons, model portfolios, and historical tracking.
Categories
- Holdings (5): list_holdings, get_position_detail, get_top_performers, get_losers, show_capabilities
- Allocation (3): get_asset_allocation, get_sector_breakdown, visualize_allocation
- Performance (3): get_portfolio_performance, get_position_performance, visualize_gains
- Income (3): get_dividend_income, get_position_yield, visualize_income
- Summary (1): get_portfolio_summary
- Comparison (6): compare_positions, position_vs_sector, portfolio_vs_benchmark, rebalance_scenario, add_position_scenario, rank_positions
- Model (6): get_model_portfolios, compare_to_model, allocate_to_model, hypothetical_reallocation, allocation_stress_test, visualize_allocation_comparison
- History (6): get_snapshots, get_portfolio_history, get_position_history, compare_periods, get_position_changes, visualize_portfolio_trend
Use Cases
- Basic portfolio review and analysis
- Performance tracking over time
- Benchmark comparison
- Model portfolio alignment
Variation 2: Advisor + Tax (42 tools)
V1 + Risk Assessment + Tax Optimization
All V1 tools plus risk-based recommendations and comprehensive tax optimization.
V1 Tools (33)
All tools from V1 included
V2 Additional Tools (9)
- Advisor (4): assess_risk, get_recommendations, optimize_for_goal, explain_recommendation
- Tax (5): set_tax_profile, get_tax_summary, find_harvest_opportunities, calculate_sale_tax, get_tax_efficient_moves
Use Cases
- Risk-adjusted portfolio management
- Tax-loss harvesting
- Tax-efficient rebalancing
- Goal-based optimization
Variation 3: Options (53 tools)
V2 + Options Workflows
All V2 tools plus comprehensive options trading capabilities.
V2 Tools (42)
All tools from V2 included
V3 Additional Tools (11)
- Options (10): set_options_profile, get_options_approval, find_covered_call_opportunities, find_cash_secured_put_opportunities, calculate_options_income, build_options_strategy, options_tutorial, track_options_position, select_strike_expiration, get_roll_opportunities
- Reference (1): options_reference
Use Cases
- Options income generation
- Covered call writing
- Cash-secured put selling
- Strategy building and education
Variation 4: Complete (70 tools)
V3 + Monitoring + Cross-Pollination
Full capability set with watchlist monitoring and cross-pollinated analytics from other domains.
V3 Tools (53)
All tools from V3 included
V4 Additional Tools (17)
- Alerts (5): add_to_watchlist, get_watchlist, remove_from_watchlist, check_alerts, set_alert_preferences
- Cross-Pollinated (2): detect_unusual_returns (YieldModel), calculate_sector_concentration (PPR_Agent)
Use Cases
- Active portfolio monitoring
- Price target tracking
- Outlier detection
- Concentration risk analysis
Tool Distribution Summary
| Category |
Tools |
V1 |
V2 |
V3 |
V4 |
| Holdings |
5 |
Yes |
Yes |
Yes |
Yes |
| Allocation |
3 |
Yes |
Yes |
Yes |
Yes |
| Performance |
3 |
Yes |
Yes |
Yes |
Yes |
| Income |
3 |
Yes |
Yes |
Yes |
Yes |
| Summary |
1 |
Yes |
Yes |
Yes |
Yes |
| Comparison |
6 |
Yes |
Yes |
Yes |
Yes |
| Model |
6 |
Yes |
Yes |
Yes |
Yes |
| History |
6 |
Yes |
Yes |
Yes |
Yes |
| Advisor |
4 |
- |
Yes |
Yes |
Yes |
| Tax |
5 |
- |
Yes |
Yes |
Yes |
| Options |
10 |
- |
- |
Yes |
Yes |
| Reference |
1 |
- |
- |
Yes |
Yes |
| Alerts |
5 |
- |
- |
- |
Yes |
| Cross-Pollinated |
2 |
- |
- |
- |
Yes |
| Total |
60 |
33 |
42 |
53 |
70 |
Database Schema
# Snapshots metadata
snapshots(snapshot_date PRIMARY KEY, source_file, loaded_at, total_value, position_count)
# Holdings (7 positions per snapshot)
holdings(id, snapshot_date, ticker, name, shares, cost_basis, total_cost, current_price,
market_value, unrealized_gain, unrealized_gain_pct, gain_type, sector,
UNIQUE(snapshot_date, ticker))
# Asset Allocation (3 classes per snapshot)
asset_allocation(id, snapshot_date, asset_class, market_value, percentage,
UNIQUE(snapshot_date, asset_class))
# Income (6 records per snapshot)
income(id, snapshot_date, ticker, income_type, annual_income, yield_pct,
UNIQUE(snapshot_date, ticker))
# Options positions
options_positions(id, ticker, strategy, option_type, strike, expiration,
contracts, premium_received, premium_paid, opened_date,
status, closed_date, close_price, realized_pnl, notes)
Running the Agent
# Run the Portfolio Agent GUI
cd project-phoenix/domains/Portfolio/cockpit_poc/agent/tests
python test_agent.py
# Rebuild database from PDF statements
cd project-phoenix/domains/Portfolio/scripts
python pdf_parser.py
# Validate variations
python scripts/validate.py --variation v1
python scripts/validate.py --variation v2
python scripts/validate.py --variation v3
python scripts/validate.py --variation v4