Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
holdingsYes

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/finstacklabs/finstack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server