Skip to main content
Glama

update_portfolio_weights

Modify asset allocation weights in an investment portfolio and automatically recalculate performance metrics to reflect the new distribution.

Instructions

Update the allocation weights of an existing portfolio.

Changes the weight distribution across assets in a portfolio and recalculates all metrics.

Args: name: The portfolio name. weights: New allocation weights per symbol. Must sum to 1.0.

Returns: Updated portfolio information with new metrics.

Example: result = update_portfolio_weights( name="tech_stocks", weights={"GOOG": 0.5, "AMZN": 0.3, "AAPL": 0.2} ) print(f"New Sharpe: {result['metrics']['sharpe_ratio']}")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
weightsYes

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/l4b4r4b4b4/portfolio-mcp'

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