generate_flow_paths
Generate simulated multi-step price trajectories from a trained Flow model to stress-test portfolios and forecast returns, with percentile bands, sample paths, and terminal statistics.
Instructions
Generate simulated multi-step price trajectories from a trained Flow model. Returns per-asset percentile bands (p5/p25/p50/p75/p95 per timestep), sample paths per target asset, and scalar terminal statistics. Requires model_group_id from train_flow_model or list_model_groups. If paths already exist, returns cached results instantly. Path generation takes ~1-3 min on GPU. Defaults: horizon=60 (~1 quarter), n_paths=1000.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| horizon | No | Forecast horizon in trading days. Default 60. | |
| n_paths | No | Number of paths to generate. 1000 default. | |
| portfolio_id | No | UUID of the portfolio. Resolved automatically if omitted. | |
| model_group_id | Yes | UUID of a trained Flow model group (from train_flow_model or list_model_groups). | |
| price_history_length | No | Days of historical prices to include before the paths start. Defaults to horizon. Set higher (e.g. 120) to warm up indicators like MACD or z-score before forward_test_rules. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |