generate_price_series
Generate synthetic stock price data using Geometric Brownian Motion for portfolio analysis and simulation. Create customizable price series with adjustable returns, volatilities, and correlations between assets.
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 )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | ||
| days | No | ||
| initial_prices | No | ||
| annual_returns | No | ||
| annual_volatilities | No | ||
| correlation_matrix | No | ||
| seed | No |