portfolio_analysis
Analyze stock portfolios to calculate P&L, weights, risk, and identify top performers and underperformers based on holdings data.
Instructions
Analyze a stock portfolio — P&L, weights, risk. [PRO]
Provide your holdings and get total P&L, individual stock performance, portfolio weights, concentration risk, winners and losers.
Args: holdings: JSON string of holdings array. Each holding needs: symbol, quantity, buy_price. Example: '[{"symbol":"RELIANCE","quantity":10,"buy_price":2500}, {"symbol":"TCS","quantity":5,"buy_price":3800}]'
Examples: portfolio_analysis('[{"symbol":"RELIANCE","quantity":10,"buy_price":2500}]') portfolio_analysis('[{"symbol":"AAPL","quantity":5,"buy_price":150}, {"symbol":"MSFT","quantity":3,"buy_price":380}]')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| holdings | Yes |