Skip to main content
Glama
l4b4r4b4b4
by l4b4r4b4b4

generate_price_series

Generate realistic synthetic price series using Geometric Brownian Motion. Supports multiple assets, custom parameters, and correlated price movements for portfolio analysis.

Instructions

Generate synthetic price series using Geometric Brownian Motion.

Creates realistic-looking stock price data with customizable parameters for each asset. Supports correlated assets via a correlation matrix.

Large results are cached and returned as a reference with preview. Use get_cached_result to paginate through the full price series.

Args: symbols: List of asset symbols (e.g., ['GOOG', 'AMZN', 'AAPL']). days: Number of trading days to generate (default: 252, one year). initial_prices: Optional initial price per symbol. Defaults to 100.0 for all symbols. annual_returns: Optional expected annual return per symbol. Defaults to 0.08 (8%) for all symbols. annual_volatilities: Optional annual volatility per symbol. Defaults to 0.20 (20%) for all symbols. correlation_matrix: Optional correlation matrix for the assets. Should be a symmetric positive semi-definite matrix. Defaults to identity matrix (uncorrelated). seed: Random seed for reproducibility.

Returns: Dictionary containing: - ref_id: Reference ID for accessing full cached data - symbols: List of symbols - preview: Sample of the price data - total_items: Total number of data points (days) - parameters: Generation parameters used - message: Instructions for pagination

Example: ``` # Generate 1 year of data for 3 tech stocks result = generate_price_series( symbols=["GOOG", "AMZN", "AAPL"], days=252, annual_returns={"GOOG": 0.12, "AMZN": 0.15, "AAPL": 0.10}, annual_volatilities={"GOOG": 0.25, "AMZN": 0.30, "AAPL": 0.22}, seed=42 )

# Use ref_id to paginate
page2 = get_cached_result(ref_id=result["ref_id"], page=2)
```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolsYes
daysNo
initial_pricesNo
annual_returnsNo
annual_volatilitiesNo
correlation_matrixNo
seedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses the model (GBM), caching for large results, and pagination via get_cached_result. It also notes that results include a preview and reference ID. However, it does not mention error conditions, rate limits, or any external dependencies, slightly reducing transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (intro, args, returns, example) and uses concise language. Every sentence adds value, and the example demonstrates typical usage. There is no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, caching behavior, output with multiple fields), the description is complete. It explains input parameters thoroughly and describes the return dictionary with all keys. The presence of an output schema signal but actual schema not provided is mitigated by the description's own return documentation. No gaps remain for an AI agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must fully explain parameters. It provides detailed explanations for all 7 parameters, including defaults, types, and examples (e.g., symbols list, annual_returns dict). This adds substantial meaning beyond the bare schema types and defaults, making it easy for an AI agent to understand each parameter's purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates synthetic price series using Geometric Brownian Motion. It defines the core functionality and customizable parameters. However, it does not explicitly differentiate from sibling generation tools like generate_portfolio_scenarios, which could lead to confusion about which to use for price-only data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implicit usage guidance through examples and parameter explanations, indicating it's used for creating realistic stock price data. It mentions caching and pagination, which helps in subsequent steps. However, there is no explicit guidance on when not to use this tool or alternatives, such as when to prefer generate_portfolio_scenarios for portfolio-level analysis.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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