# create_strategy

> Saves a new strategy from the minimal nodes-and-connections spec and enrols it for backtesting.

Source: https://orbitalaip.com/docs/claude-and-chatgpt/tools/create_strategy

Create a strategy · strategies · write

> [!IMPORTANT] Disclaimer
> Backtest results are hypothetical and do not predict future performance. Nothing here is investment advice: Orbital computes the rules you supplied and recommends nothing. Orbital is not a registered investment adviser or broker-dealer. Costs are as modelled by the chosen cost profile and may differ from live trading.

## What it does

Saves a new strategy from the minimal spec in the authoring guide: a name, the nodes with their config, and the connections between them. The saved graph is tracked as a strategy at once, so the receipt carries the `strategyId` that [estimate_backtest](https://orbitalaip.com/docs/claude-and-chatgpt/tools/estimate_backtest) and [run_backtest](https://orbitalaip.com/docs/claude-and-chatgpt/tools/run_backtest) take. Claude uses it for a new strategy only. Changes to an existing one go through [update_strategy](https://orbitalaip.com/docs/claude-and-chatgpt/tools/update_strategy).

Claude reads [get_authoring_guide](https://orbitalaip.com/docs/claude-and-chatgpt/tools/get_authoring_guide) first. By default every required field must be set. A Program strategy's first save needs `allow_incomplete_config` set to true: its `module_ref` is filled by [build_program](https://orbitalaip.com/docs/claude-and-chatgpt/tools/build_program) and by nothing else.

A rule-card strategy may declare parameters: knobs that `run_backtest` sets by name without editing the graph. A number knob names a default, a min, a max and the node field it targets. An enum knob names a default, its allowed values and a target. A timeframe knob names a default and its allowed values. A Program strategy's knobs are its Program node's `parameters` config instead. A declaration sent with one must still be well formed and target nodes in the graph; it is then ignored, and the receipt's note says so.

It needs the write permission, shown on the consent page as **Create and edit strategies**, and a project role that may write: project owner, editor or member, or workspace owner or admin. A viewer's call is refused: a read-only role cannot use write or run tools.

One caveat: the receipt may say the strategy is incomplete. Its `mustTell` sentence names each node and the settings it still needs, and a run of the strategy is refused as not backtestable until they are set.

## Parameters

| Parameter | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| name | string | yes | The strategy name, 1 to 255 characters. | SPY golden cross |
| description | string | no | What the strategy does, for the people who read it in Orbital. Up to 2000 characters. | Buys SPY when the 50-day average crosses above the 200-day. 10% stop, 15% trailing stop. |
| nodes | array | yes | The nodes, 1 to 50. Each has an id (up to 64 characters, unique in the graph), a type from the authoring guide, an optional config object (the save gate still checks its required fields), and an optional label of up to 255 characters. | [{"id": "uni", "type": "universe-input", "config": {"preset": "custom", "customTickers": "SPY"}}] |
| connections | array | no | The edges, up to 100. Each names the from and to node ids. fromPort defaults to the source node's one output and toPort to the target node's one input. | [{"from": "sma50", "fromPort": "indicator", "to": "enter", "toPort": "a"}] |
| allow_incomplete_config | boolean | no | Save with config gaps still open. Default false: every required field must be set. A Program strategy's first save needs true, because module_ref is filled by build_program. | true |
| declared_parameters | object | no | Knobs a rule-card strategy exposes to run_backtest's parameters, by name. Each is a number knob with type, default, min, max and a target naming a nodeId and field; an enum knob with type, default, allowed values and a target; or a timeframe knob with type, default and allowed values. Ignored on a Program strategy. | {"period": {"type": "number", "default": 50, "min": 10, "max": 200, "target": {"nodeId": "sma50", "field": "period"}}} |

## What comes back

- `ok`: true.

- `note`: the receipt in words. It says the workflow was created as a draft, that it is a tracked strategy with its `strategyId`, which knobs a run may now tune, and whether any node still needs settings.

- `createdWorkflowId`: the workflow id, which `update_strategy` and `build_program` take.

- `strategyId`: the strategy id, which `estimate_backtest` and `run_backtest` take.

- `versionHash`: the hash of the saved graph, which `update_strategy` takes back as `base_version_hash`.

- `requiredConfigComplete`: true when every required field is set. Otherwise the receipt carries `nodesNeedingConfiguration`, a `mustTell` sentence naming each node and the settings it needs, and `configGaps`.

## Try saying

- "Build a 50/200-day golden-cross strategy on SPY and backtest it from 2021-01-04 to 2024-12-31."
- "Create an RSI mean-reversion strategy on AAPL, MSFT and NVDA with a 5% stop, and let me tune the RSI period."
- "Save that as a new strategy called Momentum ten."

## If it fails

- **create_strategy needs the 'write' scope, which this connection was not granted. Ask the user to reconnect Orbital with it.** — The connection was made without the Create and edit strategies permission. Connect Orbital again and leave that permission on. The read tools keep working without it.
- **Your role in this project (viewer) cannot change strategies or spend credits.** — Your role in the connected project is read-only. The message names the role it found. Write and run tools need project owner, editor or member, or workspace owner or admin. Ask a project owner for a role that may write, or use the read tools.
- **Backtesting is not active in this project — turn it on under Settings → Apps in Orbital, then try again** — The Backtesting app is off in the project you connected. In Orbital open Settings, then Apps, and turn Backtesting on for the project you connected. Then ask Claude to try again.
- **Invalid arguments for 'create_strategy': <each problem, separated by semicolons>** — The graph failed the save gate. The rest of the message names each problem, such as an unknown node type, a port that is not wired, an undeclared config key, or a required field that is not set. For an open required field it says to fill it in, or to call again with allow_incomplete_config set to true. Claude fixes every named problem and saves again. For a Program strategy's first save it sets allow_incomplete_config to true.
- **declared_parameters was refused. <each problem>** — A declared knob is malformed, targets a node or field the graph does not have, or aims a number knob at a setting that is not numeric. The rest of the message names each one. The graph itself was not saved. Claude corrects the declaration and saves again.
- **Give the workflow a name.** — The name was blank once trimmed. Claude sends a name of 1 to 255 characters.
- **The workflow could not be created.** — The save failed for a reason that carried no message of its own. Ask Claude to try again. If it keeps failing, create the strategy in Orbital's editor.

## Related

- [Read the authoring guide](https://orbitalaip.com/docs/claude-and-chatgpt/tools/get_authoring_guide)
- [Save a new version of a strategy](https://orbitalaip.com/docs/claude-and-chatgpt/tools/update_strategy)
- [Estimate a backtest](https://orbitalaip.com/docs/claude-and-chatgpt/tools/estimate_backtest)
- [Rule cards and Programs](https://orbitalaip.com/docs/claude-and-chatgpt/rule-cards-and-programs)
