AI
The model is cheap. Being right about the money is not.
A model can now be written in minutes, and it gets cheaper every month. What did not get cheaper is being right about the money: position accounting through a reversal, the average cost a realised profit is measured against, the exposure snapshot taken at the instant of the fill and not a tick later, the order that has to be refused before it is sent rather than explained after, two feeds whose timestamps must line up, a simulator that must not accidentally see the future. These are invariants, not code, and a generated implementation of any of them is plausible on sight and wrong in a way that surfaces only as a number you believed. A backtest that is wrong still prints a profit.
The boundary moved
It did not vanish. The scarce thing is now the verified machine underneath the strategy: the parts that have to be right, and have to behave identically in research and in production.
Cheap generation raises the value
When producing candidates costs nothing, the bottleneck becomes trusting them and comparing them. Every candidate is measured the same way here — the same statistics for a two-line crossover as for a deep learning model, and the per-period features a selection model ranks them with.
The engine never looks inside
Your data processor is a function pointer of a fixed signature and a pointer the engine does not interpret. Whether a person or a model wrote what is behind it changes nothing.
Any model, same object
A three-line moving average, a gradient-boosted model, a neural network scoring news sentiment and a call out to an external service are the same thing to the engine. Swapping one for another changes no wiring at all: the same builders, the same patterns, the same rules keep working.
Local or public, your choice
An AI running on your own hardware and a public API are interchangeable from the engine's side, so which one you use is yours to decide. The library reaches the network only where you point it — through the connectors you configure, and through a processor of yours that calls out.
Only the licence check leaves
The licence check is the only exchange the engine ever initiates on its own behalf. No market data, no contract, no strategy, no order, no trade and no statistic has a field to travel in it.
Start with this prompt
The failure is not a model that cannot code. It is a model that codes too much.
Ask a model for a moving-average robot and it will write you a moving average, a crossover test, a position tracker, a stop loss and a Sharpe ratio — all of which the library already has, all of which now differ from what every other candidate was measured with. Nothing in that output looks wrong. The robot compiles, the backtest prints a profit, and the number means something slightly different from the number beside it. The prompt below spends most of its length on this one problem: it hands the model the inventory, so the only thing left to invent is the idea.
Everything highlighted in yellow is yours to replace: the folder you unpacked the SDK into, and the final line, which is where you say what the robot should do. The long middle block is the part that matters most, and it is not yours to change: it tells the model what already exists, so that it wires the library instead of rebuilding it.
Read the strategy examples at https://solo76.com/examples, their source at https://github.com/andreysolovyev381/tse, and the product documentation at https://solo76.com/docs.
Read the full reference at https://solo76.com/llms-full.txt, one Markdown file that describes the engine and its C, C++ and Python surfaces completely; the same chapters are published as HTML pages at https://solo76.com/reference.
Keep that file in your context for the whole conversation, and fetch it again before every substantial task, such as a new robot, a change to the graph or a question about the API, so that you work from the current text rather than from memory; its second line names the version, and a changed version means your copy is stale. If the whole file does not fit your context, load only the chapters you need from the addresses listed at https://solo76.com/llms.txt. If you cannot fetch addresses, ask me to paste the file before you start.
Use the SDK I unpacked into /path/to/tse-sdk: the C headers under include/tse, the C++ wrapper tse.hpp with its compiled translation unit lib/libtse_export_cpp.a, and the Python module python/tse.py.
The engine has five nodes and no others: an Input turns ticks into a number, a Pattern watches Inputs and fires, a Rule turns a firing into an order, a Robot owns a set of Rules, an Account owns the robots.
Every trade a Rule orders is one of four position verbs: an Entry opens from flat, a Rebalance stays on the side it is on, a Flip crosses zero to the other side, an Exit closes to exactly zero. The quantity keeps them apart: a Flip must exceed the position, an Exit must equal it, a Rebalance against its side must stay below it, and an order that breaks the bound of its verb is refused.
Assemble the graph bottom-up out of names: a Pattern names its Inputs, a Rule names its Pattern, a Robot names its Rules. Declaring is not running — nothing touches data until the robot is started.
The strategy itself lives in one callable, the data processor an Input is given. Put the decision there and nowhere else.
Before you write any function, look for it in the reference. The engine already ships the parts below, and reimplementing one of them is the main way a generated robot goes wrong: it compiles, it runs, and it is measured against a yardstick you invented instead of the one every other candidate was measured against.
- Indicators: nine processors ship with the library — simple, exponential and weighted moving averages, sample and historical volatility, average true range, the Parkinson estimator, a rolling median and a robust rolling z score. Declare one with a built-in input instead of writing it. They are incremental, so cost per tick does not grow with the window.
- Conditions: six pattern kinds — comparison, crossover, threshold, peak, timestamp and formula. A crossover is a pattern, not an if inside a processor. Reach for a formula pattern only when the other five cannot say it.
- Orders: eight rule builders — market, risk, multileg, bracket, OCO, cancel, replace and modify. A stop loss or a take profit is a risk rule or a bracket, never your own watcher over the position.
- Pre-trade limits: risk policies gate an order before it is sent, on position value, on position quantity or on the trading window. Do not check a limit inside the processor after the fact.
- Position and money: the engine owns the accounting. Read it with the position and portfolio state calls; never keep your own running position, average price or profit and loss.
- Results: the summary, the per-robot summaries and the duration-bucketed ex-post scores are computed for you, and the statistics surface has sixty-five entry points. Do not compute a mean, a quantile, a Sharpe-like ratio or a drawdown by hand.
- Series and files: the timeserie tools slice, transform, split and join, and the CSV reader and writer are part of the library. Do not write a CSV parser.
- Parameter sweeps: run the grid the library provides rather than a loop of your own.
- Fills: the built-in Simulator is the execution in a backtest. Do not write a fill model.
The only code you should produce is the body of the data processor, a formula pattern if one is genuinely needed, and the dozen declarations that wire the graph. If you believe something is missing from the library, say so and stop rather than filling the gap silently.
Backtest it against the built-in Simulator and print the summary. Leave the graph, the risk checks and the statistics untouched, so that going live is a swap of the market data source and the execution.
>>> REPLACE THIS LINE with what the robot should do: what it trades, what data it reads, and the conditions on which it enters and exits.
Browse the examples it will read The examples repository on GitHub From a trading idea to paper trading in five steps, done by AI on solo76