compute_betas
Calculate factor exposures (betas) for a trained model group. Adjust the lookback window to compare betas across time horizons, detect regime changes, and get a simulation batch ID for returns.
Instructions
Compute factor exposures (betas) for an already-trained model group. Use this when you already have a trained model_group_id (from analyze_quantitative or list_model_groups) and want to refresh betas with a different lookback window, or get a new simulation_batch_id. You do NOT need this if you just ran analyze_quantitative — it already includes this step. Returns per-asset factor exposures with R² (goodness-of-fit), rolling_window used, factor_last_date (effective beta date), data_truncated_by (stale factors), and simulation_batch_id (for compute_returns). Key use: call with different lookback_days (e.g. 63, 126, 252) to compare betas across time horizons — divergence signals regime changes. Check R² to gauge how well factors explain each asset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lookback_days | No | Historical lookback window in trading days | |
| model_group_id | Yes | UUID of the trained model group (from analyze_quantitative or list_model_groups) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |