compose_graph
Validate a strategy graph plan, count parameter configurations, and produce a run specification for debugging before backtesting; nothing is executed or read.
Instructions
Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.
Check a strategy graph plan and turn it into a run specification, counting how many parameter configurations it would test. Nothing is executed and no data is read.
Use it to build and debug a plan before backtest_graph, which takes the same arguments.
Returns ok, configs, runnable, strategy, filters, gates and the full spec; an invalid plan
returns ok false with the exact field at fault. A plan carrying custom Python is reported in
custom_code_nodes with runnable_over_mcp, since backtest_graph refuses it unless the user
allowed custom code. Strategy and filter params are single-value locks; omit one to sweep its
catalogue values. Gates take a threshold, op "ge" or "le", and window "oos", "is", "oos2",
"sealed", "full" or "wfa". Cost nodes charge the run; lectures are informational. Needs
Stochastly open with an Atelier or Portfolio licence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tf | No | Bar timeframe, for example "1h". | 1h |
| plan | Yes | Strategy graph. Keys: strategy {key, params, code}, filters [{key, params, code, mode}], gates [{key, threshold, params, op, window}], lectures [{key, params}], execution {..}, data {is_pct, oos1_pct, purge_bars, embargo_bars, wfa_is_len, wfa_oos_len}, cost, cost_nodes [{name, params}], propfirm, propfirm_ev. Node keys are "family/name" from node_catalog. | |
| symbols | No | Symbols to trade; omit for the default universe. | |
| direction | No | Trade direction: "L" (long only), "S" (short only) or "LS" (both); long, short, both and similar spellings are accepted. | LS |