portfolio_analysis
Analyze stock portfolio performance including P&L, weights, and risk by providing holdings as JSON.
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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |