Portfolio review, P&L analysis, exposure assessment, and rebalancing for IG Markets accounts. Use when the user wants to review their portfolio, check profit/loss, assess concentration risk, or rebalance positions.
Skill for reviewing, analyzing, and managing an IG Markets trading portfolio. Use this when the user asks about their positions, P&L, account health, exposure, or wants to rebalance.
Trigger phrases: "portfolio review", "how are my positions", "P&L", "profit and loss", "account summary", "exposure", "rebalance", "what am I holding", "position summary", "account health", "margin usage", "how much am I up/down".
ig_session_status before running any workflow. If not authenticated, guide the user to log in.This is the go-to workflow when the user asks "how's my portfolio" or similar.
ig_session_statusig_accounts -- note available balance, equity, margin used, total P&Lig_positions -- get all open positions with market dataPresent as a clean table:
| Market | Direction | Size | Entry | Current | P&L | Stop | Limit |
|---------------|-----------|------|---------|---------|---------|--------|--------|
| FTSE 100 | BUY | 2 | 7450.0 | 7520.0 | +£140 | 7400.0 | 7600.0 |
| EUR/USD | SELL | 1 | 1.0850 | 1.0830 | +$20 | — | — |
Use when the user asks about margin, available funds, or account risk level.
ig_accounts -- get balance details for all accountsUse when the user asks "what am I exposed to" or wants to understand portfolio concentration.
ig_positions -- get all open positionsUse when the user asks "how much have I made/lost" or wants a P&L breakdown.
ig_positions -- calculate P&L per position from entry vs. current priceig_transaction_history with type ALL_DEAL -- for recent closed tradesPresent both together:
Use when the user wants to adjust their portfolio allocation or reduce risk.
ig_positions -- current portfolio stateig_deal_confirmation after eachUse when the user asks "what have I traded recently" or wants to review recent activity.
ig_activity_history with appropriate date rangeig_transaction_history for P&L on closed tradesmargin_utilization = (margin_used / account_balance) * 100
BUY P&L = (current_bid - entry_level) * size
SELL P&L = (entry_level - current_offer) * size
position_weight = abs(position_value) / sum(abs(all_position_values)) * 100