How to build an LLM crypto trading strategy
Educational only. Not investment advice. Crypto trading carries significant risk of loss.
Most people who try to automate a trading idea start in the wrong place: they wire up an API key, point a bot at the market, and then wonder why it does things they never intended. The strategy was never explicit. The logic was assumed rather than written. The limits were left at defaults.
This walkthrough reverses that order. Before any automation runs, you will have a written strategy, a prompt you authored, hard limits you set, and a paper validation run behind you. The automation is the last step, not the first.
Nothing here is investment advice. Crypto markets are volatile, leveraged positions amplify losses as readily as gains, and no strategy — however carefully designed — is immune to regime change. Build this as a disciplined thinking tool, not as a shortcut to returns that cannot be guaranteed.
1. Write your edge as plain rules
Start entirely offline. Before you open any tool, open a text editor and write down the thesis your strategy is based on. Not vague intuitions — concrete conditions. What specific market state makes you want to take a position? What tells you the edge is absent?
A useful forcing function: write it so that a disciplined trader with no prior knowledge of your view could read it and execute exactly what you intend. If the description requires knowing what you meant rather than what you wrote, it is not specific enough yet.
For example: "Enter long when BTC funding rate is below -0.02% (shorts paying longs) and the 4-hour close is above the 20-period EMA, suggesting a potential short squeeze against elevated short positioning. Skip if open interest has dropped more than 15% in the last 24 hours — that suggests shorts are already covering rather than building."
That is a falsifiable thesis. You can check whether the market state it describes actually exists right now. You can check whether a signal fired when it should not have. You can trace a loss back to a specific condition that was wrong. That traceability is the foundation of every iteration you will do later.
Write out the exit criteria with the same specificity: what closes the position, what stops it out. Incomplete strategies — entries without exits — are the single most common source of runaway automation.
2. Turn it into an entry prompt
An LLM trading strategy lives in a prompt. That prompt is yours: you write it, you own it, and it expresses your analysis criteria, not someone else's. This is not a metaphor — it is the actual regulatory and practical distinction between using KAI as a software tool versus delegating your trading decisions to a third party.
KAI ships prompt templates with labeled blanks — scaffolding for the structure a signal needs — not pre-filled strategies presented as proven winners. You fill in your entry conditions, your analysis framing, your risk appetite. The template tells the model what to look at; your content tells it what to conclude and why.
Translate the plain-language rules you wrote in Step 1 into the prompt. Be explicit about conditions: name the indicators, name the thresholds, name the exceptions. LLMs are good at contextual reasoning, but they cannot guess what you meant when you wrote "elevated funding" if you did not define what elevated means for your strategy.
Include a clear instruction about when to skip. A strategy that never skips is not a strategy — it is a noise machine. The skip condition is as important as the entry condition.
Finally, instruct the model to explain its reasoning in plain language. Every signal KAI generates includes a human-readable thesis. That explanation is how you audit whether the model is applying your criteria correctly — not whether the signal won, but whether the reasoning was faithful to your intent.
3. Set hard limits
Before the strategy runs a single signal, configure the hard limits. These are not suggestions you put in the prompt — they are enforced in code before any order is sent to the exchange. The distinction matters: a prompt instruction can be reasoned around; a hard limit cannot.
The minimum set of limits you should configure:
Daily loss cap. The maximum the strategy is allowed to lose in a single calendar day, expressed as a percentage of the allocated capital or a fixed dollar figure. When this limit is hit, the strategy pauses and no new positions are opened until you manually resume it. This is your first circuit breaker against a bad day becoming a catastrophic one.
Total drawdown limit. The maximum cumulative loss from peak before the strategy locks out entirely. This is the limit that stops a slow bleed: a series of smaller losing days that individually stay under the daily cap but together represent an unacceptable erosion of capital.
Maximum leverage. Leveraged derivatives amplify both gains and losses, and liquidation happens faster than any automation can respond to in a fast market. Set a leverage cap below your exchange's maximum. Starting at 2–3× for a new strategy is not timid — it is the correct risk posture for a system you have not yet validated in live conditions.
Maximum position size. Cap the notional size of any single trade as a percentage of allocated capital. This prevents a single signal from deploying a disproportionate amount of capital regardless of how confident the model's reasoning sounds.
Maximum concurrent open trades. A limit on how many positions the strategy can hold simultaneously. Without this, a strategy that fires on correlated signals can accumulate concentrated exposure without any single limit being breached.
Set all of these before you approve the first signal, not after the first loss.
4. Choose manual-approve first
Manual-approve is the default in KAI for a reason. In this mode, every signal the strategy generates is shown to you before any order is sent: the entry, the reasoning, the model's confidence framing. You approve or reject it. The exchange never sees a trade you did not explicitly clear.
The purpose is not to create friction. It is to let you verify, on real signals in real market conditions, that the model is applying your strategy criteria faithfully. The first twenty signals a new strategy generates will tell you more about whether your prompt is working than any amount of offline reasoning about it.
Look for signals where the reasoning is clearly faithful to your criteria — where the model saw what you told it to look for, concluded what you expected, and skipped when it should have. Look for signals where the reasoning is technically compliant but misses the spirit of what you wrote. Those are the signals that tell you where to tighten the prompt.
Auto-approve mode exists for strategies you have already validated. It is an opt-in that makes sense after you have spent real time in manual mode and satisfied yourself that the model's decisions match your intent across a range of market conditions. Starting in auto-approve is optimizing for convenience at the expense of verification. Do the verification first.
5. Validate on paper
Paper validation means running your strategy against live market data without any real capital at risk. KAI lets you run the full signal pipeline — the model reads live market context, generates signals with reasoning, and logs the outcomes — without connecting real funds. You watch what happens at no cost.
The signal log at /stats shows aggregate performance across strategies: signal counts, win rates, average hold times, and the model's reasoning on each decision. Paper performance is not a guarantee of live performance — market impact, slippage, and fill quality do not exist in paper mode — but it tells you whether the strategy is generating the kinds of signals you intended, at the cadence you expected, in the market conditions you designed it for.
Run paper validation for long enough to cover multiple market regimes: at least a trending period and a ranging or corrective period if you can. A strategy that only generates signals in trending markets may look excellent on paper during a trend and generate nothing — or worse, generate noise — when the market regime shifts.
During paper validation, your primary question is not "is this strategy profitable?" It is: "is this strategy doing what I designed it to do?" Profitability on paper is an encouraging data point. Behavioral faithfulness to your stated criteria is the actual validation target.
6. Iterate the prompt, swap the model
After paper validation, you will have a concrete set of cases where the strategy worked as intended and cases where it did not. The ones where it did not are your editing instructions.
If the model consistently enters when you did not intend it to, tighten the entry condition: add the exception you forgot to write, narrow the threshold, make the skip condition more explicit. If it consistently skips signals that look correct to you, the prompt may be over-constrained or missing context the model needs to evaluate your criteria accurately. Add the context.
Each iteration is a small edit to a plain-text document — your prompt. You do not need to touch any code. You do not need to redeploy anything. Write the new version, activate it, watch the next batch of signals.
The model is interchangeable in the same way. KAI is model-agnostic: you can run your strategy through Claude, Gemini, DeepSeek, or any other frontier model you have API access to. Your strategy lives in the prompt; the model is the inference engine that reads it. When a new model is released that you want to evaluate, change the configuration. Run both in parallel if you want to compare. The prompt stays the same; the brain changes.
This also means your strategy is not tied to any single provider's pricing or availability. If a model degrades, goes offline, or reprices, you change the configuration and continue. Treat the model as infrastructure, not as the strategy itself.
Strategy development is iterative by nature. Markets change, your read of them changes, and the prompt needs to keep up. The advantage of an LLM-based approach is that the iteration cycle is fast: edit text, revalidate on paper, deploy. That loop is the actual practice of running a systematic strategy — not a one-time setup, but an ongoing discipline.
Not investment advice. Crypto trading carries significant risk of loss. Past signal performance does not guarantee future results. Paper validation results do not predict live trading outcomes.