I asked Q how to set up my Builder instead of telling it what to set
No previous article Q built 201 breakout custom blocks for me in three and a half minutes. This is what I did with them the same day, and the whole setup happened in a conversation instead of in the Builder tabs.
I asked instead of telling
I know how to set up the Builder. That is the problem with it. I know it well enough to click through the tabs on autopilot, pick what I picked last time, and not think about any of it.
So this time I did not tell Q what to set. I asked it what it would set, and said we should talk about it first.
The first thing it did was look at my data: the Nasdaq futures I had downloaded the week before, and the Dukascopy CFD I also have, which it told me to leave alone because the history stops in 2024 and the spread is wide. Only then came the proposal. H1 rather than M15, from 2009, thirty per cent of the period held back, the cash session only, stop orders above and below a breakout level, ADX and ATR as filters, exits built on ATR.
Q’s first answer: what data to use and how it would set the Builder up
Every line of that carried the reason for it. H1 because it balances enough trades against too much noise on a breakout, with M30 or H4 as a second run later, and 2009 because thirty per cent held back then leaves the 2022 bear market in the part the Builder never gets to see.
That is worth more to someone who is not sure what belongs in those tabs than it is to me. The Builder was never hard to click. It is hard to fill in, and the answers are not written down anywhere: which period to hold back, how much slippage is honest on a stop order into a breakout. Until now you either had them from your own runs, or you set something, waited for it and learned from what came out wrong. You can ask first now, argue with what you get back, and then let it set the program up for you.
The four questions
Then it stopped and asked me four things. One full Nasdaq contract or the micro, and how big an account. Intraday only, or positions left open overnight. Long and short, or long only. And whether I wanted just a Builder run or the whole chain: build, an out-of-sample retest, a filter into a final databank.
These are the decisions I usually make without noticing I am making them. It had a view of its own on them and said so, then waited for my answer.
I answered the way I had been thinking all week. One full contract on a hundred thousand, intraday, long only, and the Builder alone for now. Then I pushed back on the rest: fifteen minutes rather than hourly bars, from 2012, two ticks of slippage, and my own filters on the results.
Q confirms the settings: @NQ M15, 2012 to 2026, 30 % out of sample, the filters
It wrote all of that into the task itself and told me the check had passed, so there was nothing left for me to click. The stamp under the answer says fourteen seconds. Doing the same by hand is a pass through the Builder tabs, and the part that really costs me time is checking afterwards that nothing from the last project is still sitting in there.
It also caught something I would have walked straight past. Moving the start date to 2012 had pushed the out-of-sample share to thirty-six per cent on its own, so it set it back to thirty. The settings summary says the same thing its answer does.
Builder settings summary after Q’s edit
One line in that answer saved me an evening of confusion later. The task still points at a strategy template file, but the Builder is set to build its own strategies, so that file is ignored and changes nothing.
I changed my mind after it had started
I said “start it” and Q started the Builder itself. It also warned me that on fifteen-minute bars over fourteen years I should expect a run of several hours.
Then I changed my mind with the build already running. It had the one-minute precision retest and Monte Carlo ticked, and for a first look I wanted the answer faster than I wanted it perfect. One line from me was enough: it stopped the build, took both checks off and started it again. On my own I would have let the run go to the end, because stopping a build to untick two boxes always feels like more trouble than it is.
It was straight with me about the price of that. Nothing would now check whether a stop-order strategy survives when the fills are tested on one-minute data, and that is a test these strategies have to pass before I believe any of them.
Q turns the robustness checks off and says what that costs
What came back
It took under six minutes, not the several hours. The Builder looked at more than nine thousand strategies, kept a hundred, and stopped there because that was the limit I had set.
Builder task log: the run finished on its own at 100 accepted strategies
Instead of sorting the databank myself I asked Q what came out of it.
Q goes through the 100 strategies, in sample and out of sample
The middle of the hundred looks like this: profit factor around 1.6 in sample and 1.3 out of sample, return to drawdown about ten in sample and three and a half out of sample, a few hundred trades on each half, all of it after commission and two ticks of slippage. Every one of the hundred made money in both halves, though that is the filters talking, not the market: a strategy only got into the databank if its profit factor stayed above 1.3 in sample and above 1.2 out of sample.
Then came the part I would have left out if I had written it myself. Out of sample is much weaker than in sample, the drawdowns are several times larger, and as Q said, that is what you get when you pick the best hundred out of nine thousand. Most of the profit sits after 2020, because the index is far higher than it was in 2012, so the same move in per cent pays several times the dollars. And none of it has been through the one-minute test, because I was the one who turned that off.
The one I would keep
Q ranked the top five by return to drawdown in sample. At the top of that list is Strategy 0.1957. The one I would keep is third on it, 0.2507, the one Q called the most balanced of the five: more than eight hundred trades in sample and three hundred out of sample, profit factor 1.64 and 1.37, return to drawdown 17.2 and 5.2. The eight hundred trades are the reason. A profit factor like that over a hundred trades tells me nothing; over eight hundred it has earned a proper test.
Then I put the equity curve up, and the line keeps climbing straight through the green part on the right, which is the out-of-sample period. The Builder did not search on those four and a half years, but it did filter on them, so the curve there is not a complete surprise either.
Equity curve of Strategy 0.2507, with the out-of-sample period shaded
Two things in that picture keep me honest. The first three or four years are almost flat and the curve only gets going around 2016. And the deepest drawdowns in the whole chart, down to thirteen thousand dollars, sit in the green part rather than the blue, about three times the worst the strategy had to live through in sample.
I am not going to pretend this is something I would trade tomorrow. It is one evening and one run. What I have at the end of it is a hundred strategies worth working on, and that is what I came for.
Everything from here is a statistics job: which ones to carry forward and by which number, how many of them are the same strategy wearing different blocks, how much the whole picture moves when you shake the fills and the order of the trades around. That is the next place I expect to lean on Q, and it had already offered me the chain at the start, as the fourth of its questions. Its own next step reads like the one I would have written myself: retest the best of them at one-minute precision, add Monte Carlo and a harder slippage test, and only then look at how much they overlap with each other.
How I ask Q
Nothing in this evening needed a clever prompt. I asked what Q would set before I told it anything, so the reasoning came while I could still argue with it. When I did decide, I said it in numbers: m15 not h1, from 2012, two ticks, profit factor above 1.3. Five things in one message and all five landed, because there was nothing in any of them to interpret. A vague instruction comes back as a reasonable guess instead of a question. And I read the settings summary after every change, because that is where I see what actually went into the task.
Where this leaves me
The whole setup took five messages. I asked for an opinion, got one, argued with half of it, changed my mind about the robustness tests, and each time Q went and set the program up.
If you have only used Q for building blocks, ask it how to set up a task. It reads the project, it writes the settings into StrategyQuant itself, and when the run is done it reads the results back to you, including the numbers it would not trust.
What I left out this time is the strategy template. The Builder drew each whole strategy at random inside the rules we had agreed on; a template gives it fixed slots instead, one breakout level for the entry, a filter, the exits.
This is one article out of several I am writing about working this way. The ones after it go into random groups, into strategy templates, into building strategies the way I want them built rather than the way the Builder puts them together on its own, and into how I word things when I talk to Q at all.
If you set up your Builder this way, I would like to hear which of those four questions you answered differently. The comments are open.
Negocio há 15 anos e venho desenvolvendo com o StrategyQuant X desde 2014. Hoje em dia, faço três coisas: desenvolvo e testo estratégias automatizadas em condições reais de mercado, amplio o próprio SQX com indicadores personalizados, trechos de código e ferramentas em Python para aprendizado de máquina e pesquisa quantitativa, e ajudo outros traders a chegarem lá mais rápido — sem passar pelos anos de erros caros que cometi ao longo do caminho.
A maioria das estratégias de trading parece ótima em um backtest, mas desmorona na prática. Meu trabalho é exatamente o oposto: estratégias que são honestas, validadas e robustas o suficiente para que se possa confiar nelas com dinheiro real. Escrevo sobre esse processo — o que dá certo, o que dá errado e o sobreajuste de que ninguém fala — no meu site, algotrading.space.
Se você quiser se aprofundar no tema da validação, no desenvolvimento personalizado de SQX ou na criação de uma vantagem competitiva real com dados e código, é lá que eu compartilho tudo isso. www.algotrading.space
Q, the AI assistant in StrategyQuant X, searched the web for breakout ideas and turned them into 201 custom blocks, the entry conditions and price levels that strategies are built …
What if you could control StrategyQuant X simply by talking to an AI agent? With the introduction of MCP (Model Context Protocol), we’re taking another step toward a new era …
Can you identify major market turning points before they become obvious on a price chart? Most traders rely on technical indicators such as RSI, MACD, or moving averages. But these …