A trader entrusted us with his method so that we could hand it over to a program. The result is public: a case study describes the rules we kept, the figures from twenty years of simulation and the message that goes out every evening after the New York close. This article tells the other half of the work, the half that does not get shown. Between the first result, obtained within a few days, and the one we agreed to publish, we added almost nothing: mostly, we took things away.
What gives way is not the method, it is the way it is applied
The client is convinced that his method works when he follows it consistently. Our job was not to take that belief for granted, but to turn it into rules and put those rules to the test. The problem he came to us with lies elsewhere. On an evening when the market has fallen, after a bad week, nobody applies a rule the way they do on a quiet evening. You wait one more day, you exit a little early, you skip a session because you are travelling. That is where the return is lost.
A program has neither fatigue nor any memory of bad trades. At identical prices, it places the same order, whether the week has been good or bad. For this project, that was the advantage that mattered most.
It still has to be told what to do in the situations the trader settles by instinct, without even noticing them: two conditions that contradict each other on the same evening, a stock already held that drops out of the selection, an opening price a long way from the close on which the decision was taken. This is not about completing the method, but about writing down what its author already does.
Illustrative scenario. Tuesday, 10 p.m. The American market has just closed lower. The rule says sell. The trader looks at the chart, remembers that the same configuration turned around within three sessions last spring, and decides to wait until Thursday. He may well be right that evening. Or he is wrong.
The framing work therefore consisted of putting the method in writing as it is practised, then having it validated line by line by the man who invented it. It is optimization work more than development work, and it closely resembles what we do when we measure a process before putting a price on it in a clinic or a small business.
Survivorship bias: the first figure is always too good
Once the rules were written, we applied them to the last twenty years of price data, from December 2005 to November 2025, starting with 100,000 dollars. This exercise has a name, the backtest: it is a simulation of the method on the prices of the past, as if it had been running at the time.
The first result was excellent. It was also wrong, for a reason that nothing on screen points out.
The method picks its stocks from the hundred names of the Nasdaq-100 index and those of the energy sector of the S&P 500, about 120 candidates. That list, however, is revised continuously, and our first version took the 2026 one for every date. It has to be updated for each simulated period instead, with the composition the index really had at that moment. Without that, the program only picks its stocks from the companies that succeeded long enough to still be in the index today, which is known as survivorship bias.
So we reconstructed the exact composition of the index at each date, working back through the 211 changes published since February 2007, then we ran the whole simulation again with those lists. Figure 1 shows what that single correction takes away from the result.
The final capital is almost halved, on both sides. The annual rate of progress loses three and a half points, for the method as much as for the plainest comparison there is: the same stocks, bought when the method selects them and then held, with no exit rule.
That correction remains incomplete, and we say so to the client at the same time as we show him the curve. The price provider no longer distributes the history of delisted companies, so 57 of the 123 stocks in the universe of November 2005 cannot be found. The dated lists are therefore accurate on the companies that entered late, and still missing the ones that left. Among the latter there are bankruptcies and buyouts at a premium, whose net effect remains unknown. That is a limitation of the simulation, and it persists in the figures published here.
The list of the energy sector, for its part, was not reconstructed at all: the simulation takes its 2022 composition for the whole period. That is a second source of the same bias, smaller than the first, and it too remains in the figures published here.
Look-ahead bias: how to keep a simulation from reading the future
There is a still more discreet way of flattering yourself: letting a calculation consult, without meaning to, a piece of data that did not yet exist on the day of the decision. It is easy to introduce and almost impossible to spot by eye, because the chart stays plausible and the curve simply rises a little better.
We protect ourselves against it with an automated test, run again on every change to the code, whose principle has two steps. We first take a price history and cut it in two at a date chosen in the middle. We then build a second version of it, strictly identical up to that date and deliberately false after it: every later price is multiplied, by ten, by twenty-five, by fifty. We then have the program compute its indicators and its decisions on both versions, and we compare only the part before the cut, the part we did not touch.
A calculation that consults only the past has to return exactly the same values in both cases, since the past is the same in both. The slightest difference therefore means, with no other possible explanation, that it went and read a price later than the date of the decision. The doctored prices are multiplied by such large factors so that this difference, if it exists, shows up immediately instead of getting lost in the rounding. The test then fails, and the change does not go to production. The project has 174 tests, which are run again before every publication of a result.
To this are added two execution rules, which the case study details and which we merely recall here: the decision is read on the closing price but the order goes out at the next day’s open, and every execution pays a tenth of a percent in fees, half commission, half price slippage. The simulation thus takes transaction fees into account and reflects real costs.
An assumption is only kept once it has been simulated
Once the measurement was judged reliable, we tried what looked like common sense: renewing the selection every three months rather than every six, to stay closer to the market; requiring two closes instead of one before holding on to a position, to avoid false starts; widening the pool to the healthcare sector, so as not to depend on technology alone; judging each stock against its own sector, or on the contrary against the whole market.
None of these assumptions is absurd. All of them cost money, and figure 2 says how much.
Widening to the healthcare sector deserves a word, because it illustrates the surprise well. Diversifying passes for a precaution; here, it takes 17.9% off the final capital. And the same experiment, redone on the variant that uses a leveraged product, takes 66.4% off it while deepening the worst drop to −89%.
The two heaviest gaps, −34.1% and −36.4%, come from the two variants that add a filter to the selection of stocks. It is therefore the selection rule, more than the rotation schedule or the conditions for holding on, that decides the result over these twenty years.
What is left once everything has been taken away
At the end of this clear-out, the rule we kept finishes the twenty years at 1,312,607 dollars, a rate of +13.7% a year. This figure is not the one of figure 1: the survivorship correction was measured on the version of the simulation in use at the time, which renewed the basket once a year and started each year again from cash. The version we kept, the one the variants of figure 2 are measured against, renews the basket every six months and carries over the positions whose trend still holds, and it is that carry-over that lifts the final capital. Holding those same stocks with no exit rule would have given +12.4% a year over the same period and with the same fees. The gap is therefore about a quarter of the capital after twenty years. That is little, and it is not enough to justify writing a program. The portfolio holds only five stocks at a time: a single different stock in a single basket can move the final capital by the same proportions. That gap may therefore come from the method or from chance, and we say so to the client.
The real gain of the method lies elsewhere: it reduces risk. By exiting positions when the market turns, it spares the portfolio the most violent falls. The worst drop between a peak and the trough that follows it — professionals call it the drawdown — goes from −72% for those same stocks simply held to −40% for the rule we kept. The capital therefore follows a distinctly smoother path, for an almost identical return. That is what the Sharpe ratio sums up, which sets the return against the jolts endured to obtain it: it rises from 0.55 to 0.67.
This smoothing has a direct consequence for leverage. Leveraged products, such as turbos and certificates, lose the whole of their value as soon as the price touches a threshold set when they are issued. The wider the swings of the portfolio, the more likely that threshold is to be reached, and the sooner. A strategy that limits the falls therefore makes these products worth considering without their being knocked out at the first jolt.
We measured that variant. It puts the whole of the pocket on a three-times leveraged certificate, issued by a bank, which multiplies both the rise and the fall by three. It finishes at 5.7 million dollars, or +22.4% a year, four times better than the rule without leverage. But its worst drop reaches −79% and its Sharpe ratio comes back down to 0.64: leverage amplifies the consequences of the signals, it does not improve their quality. A curve that ends higher after passing through −79% does not hold, because nobody follows it to the end.
What the client receives in the end
Going into production is the simplest part, once the rest is done. Every evening a server runs a scheduled task that downloads the prices after the New York close, redoes every calculation from the first day, passes a series of checks and sends a message carrying a verdict: buy, sell, or do nothing. The client schedules his orders the next morning, before the open.
He receives with that the code, the result files and everything he needs to redo each calculation on his own machine, without us, and that part counts as much as the rest. The exact values that set his strategy belong to him, and they are published nowhere: the published case study describes the approach and gives the performance figures.
Placing the orders, for its part, stayed in his hands because he wants it that way. It can be automated in turn and go straight to the broker, as soon as the broker exposes an interface to receive the orders.
The same approach away from the stock market
Nothing of what precedes is peculiar to trading. Three stages repeat themselves as soon as a decision comes round regularly and rests on rules that somebody knows without always applying them: write the rule out to the end, measure honestly what it gives, then hand its execution over to a program. The decision remains the client’s: it is his rule, he changes it whenever he wants, and he sees every day what the program has done. What automation adds is reliable application, continuous monitoring and, on the markets, less unpredictability. We follow exactly this progression to automate a business process, and it is also what our method page describes.
The first figure of a project is almost always flattering, because it was obtained under the most favourable conditions, the ones in which the answer is already known. The work begins when you set out to catch it at fault.
If you have a method that you apply by hand and would like to hand over to a program, on the markets or elsewhere, a 30-minute conversation is usually enough to know whether it can be coded and what would have to be measured before committing. Write to us at the bottom of the page, or book a slot in our calendar directly.
All the figures in this article come from simulations on past prices, and not from a history of orders actually placed. No order is transmitted to a broker by us, and nothing of what precedes constitutes investment advice.