Strategy builder
Describe it in plain English. Get a real strategy file.
A ready-made prompt that teaches any AI the exact rules for writing a Period Trader strategy. The model has never heard of this platform — the prompt carries the whole specification, so it writes code that validates and runs the first time.
Works with ChatGPT, Claude, Gemini, DeepSeek, Grok — anything that writes code. The prompt is the product here: no account needed to read it.
Why a prompt works better than a tutorial
Most strategies fail for one boring reason: the code is written against libraries the platform does not allow, or it manages its own positions instead of emitting signals. An AI has no way to know that unless it is told. This prompt states the contract up front — the imports that are rejected, the functions that are banned, the exact indicator library, and the rule that the strategy produces signals while the engine handles sizing, stops and profit.
What the prompt pins down
- The one rule that decides everything: your strategy returns two boolean series — when to go long, when to go short. The engine owns position sizing, stop-loss, take-profit, trailing and costs.
- The complete import allowlist and the denied-call list, so the model never reaches for os, sys, requests, sklearn, talib or getattr.
- The full indicator library with real signatures, including the ones that return tuples: macd returns three series, bbands and stochastic return two.
- The config keys the engine reads, and the instruction to never write into them — risk and exits stay yours, not the strategy’s.
- A required META block, so every tunable you declare shows up in the research sweep instead of being hard-coded.
- A self-check list the model runs before answering, plus a hard ban on inventing backtest numbers it never ran.
How to use it
Copy the prompt
The whole block below is the prompt. Copy all of it — it is written to stand alone.
Paste it into any AI
Start a fresh chat, paste the prompt, then describe your idea in plain language.
Paste the result back
In the app, open Add Strategy, paste the code into Source, then Validate and Add Strategy.
Get the prompt
One text file, the whole prompt. Copy it straight into your AI of choice.
periodtrader-strategy-prompt.txt — 16 KB, plain text, nothing else in the file.
Free. No account needed.
Then let the research engine do its job
Once a strategy is added it becomes a normal research strategy: the platform sweeps its declared parameters, scores the results against the other strategies and shows you the best runs. A strategy that never made money still loses the sweep, exactly like a built-in one.
See the setup guideThe prompt describes the platform’s rules for a strategy file. It is not investment advice and it does not generate a strategy for you — you describe the idea, the AI writes the code, and the backtest tells you whether it is any good.