2. Anatomy of a strategy: signal, entry, exit and position sizing
Theory 5: What algorithmic trading really is
What separates a trader who lasts ten years from one who blows up the account in ten months is usually not the signal. It is the piece almost nobody talks about.
We now know what separates a systematic decision from a discretionary one. It is time to open up that 'explicit rule' and look at the specific building blocks of any trading strategy, systematic or not.
They are exactly the same pieces that an algorithm will later have to execute automatically.
The signal: the condition that switches the light on
Every strategy starts from a signal: the specific, observable condition indicating there may be an opportunity.
A signal can be based on several different sources:
- Price: for example, price crossing above its 50-day moving average.
- Volume: an unusual volume spike relative to the recent average.
- Fundamental data: a company whose P/E falls below a given threshold relative to its sector.
- Or any combination of these and other variables.
The essential feature of a well-defined signal is that it must be objective and verifiable. Any person, or any program, looking at the same data must reach exactly the same conclusion about whether the signal has triggered, with no room for subjective interpretation.
The entry: triggering is not acting
A signal triggering does not automatically mean you should enter the position. The entry rule adds the further conditions confirming that it is time to act on that signal.
It can be as simple as 'enter immediately at market price as soon as the signal fires'. Or it can add extra filters:
- Requiring the signal to hold for two consecutive sessions.
- Requiring volume to exceed a certain threshold on the same day.
Those filters are designed to cut down the number of false signals. But they come at a cost: you sometimes enter later and at a worse price than acting immediately would have secured.
That trade-off — fewer false signals versus a worse entry price — is one of the most recurrent design decisions in any strategy. And it rarely has a single correct answer: it depends on the asset, on the time horizon, and on how much 'noise' the chosen signal typically carries.
The exit: the half that gets forgotten
The exit rule is, in practice, just as important as the entry rule. And it usually gets considerably less attention when a strategy is designed for the first time.
It can be based on several things:
- A fixed profit target: exit on reaching a certain percentage gain.
- A stop-loss: exit if the loss exceeds a certain threshold, as we saw in the level devoted to market execution.
- A condition opposite to the entry signal: exit when the moving average crosses back the other way.
- A time limit: exit after a maximum number of sessions, whatever the result.
A strategy without a clearly defined exit rule is not, strictly speaking, a complete strategy. It is only half a strategy.
The reason is that it leaves the hardest decision unresolved in advance: when to accept that the position must be closed. And that is exactly the ground where loss aversion and the disposition effect from the previous level hit hardest.
Position sizing: the piece that decides survival
Position sizing — how much capital to risk on each trade — is the piece most often overlooked. And probably the one that most determines a strategy's long-term survival, even more than whether the signal itself is good or mediocre.
Risking a small, fixed percentage of total capital on each trade — no more than 1-2%, for instance — limits the damage of any individual losing streak.
That makes it possible to survive statistically long enough that, if the strategy really does have a positive edge over the long run, that edge eventually shows up in the aggregate results.
Compare the two extremes:
- A strategy with an excellent signal but aggressive, uncontrolled position sizing can blow up the account before that statistical edge has any chance to express itself.
- A strategy with a mediocre signal but disciplined position sizing can survive long enough to be adjusted or improved.
Hence the claim we opened with, which is no exaggeration. Position sizing, more than the signal, is often what separates a trader who lasts ten years from one who blows up the account in ten months.