Getting started
How to build your own trading system
By Koen van Goch · Updated
To build your own trading system, start with what you want it to do for you, pick a market behaviour with a clear reason to exist, write exact entry, exit and sizing rules, and test them honestly on data you didn't use to design them. Then size the risk so the worst drawdown is one you can live through, and decide in advance when you'd stop. Simple systems with few rules usually hold up better than clever ones.
Step 1. What do you want the system to do?
Most people start with an indicator. Start with a goal instead. Do you want to grow capital over many years, protect an existing portfolio in bear markets, or add returns that don't depend on the stock market going up?
Each goal leads to a different kind of system. A long-term growth engine looks nothing like a hedge. Write down your time horizon, how much capital is involved and, most importantly, the deepest drawdown you could sit through without abandoning the plan.
Step 2. Why should this system get paid?
Every lasting edge has a reason behind it. Trend following can earn a premium because big moves keep going further than most people expect, and someone has to hold the risk while they do. Short-term mean reversion can get paid for providing liquidity to forced or emotional sellers. A hedge system is paid insurance: it costs you something in calm years and is meant to help when markets break.
If you can't explain why a pattern should keep working, treat a good backtest with suspicion. Logic first, data second.
Step 3. Write exact rules, as few as possible
A system needs four things, written so a computer (or a stranger) could follow them without asking you anything:
- Universe: what you trade (for example, liquid US stocks, or one index future).
- Entry: the exact condition that opens a trade.
- Exit: when you take a loss and when you take a profit, or when the reason for the trade has gone.
- Sizing: how much you buy on each trade.
Every extra rule is another chance to fit the past. If a rule doesn't make sense on its own, drop it, even if it improves the backtest.
Step 4. Test it honestly
Use clean data. For stocks, that means data that includes companies that were delisted. Otherwise you're only testing on the survivors. Include commissions and slippage. Test across bull markets, bear markets and sideways years.
Then check robustness. Do nearby parameter values give similar results, or does the system only work at one magic number? Does it hold up on data you didn't use to design it? See how to avoid overfitting a backtest.
Step 5. Size the risk to your drawdown, not to your hopes
Position sizing is your main lever on how deep your drawdowns get. Size each trade so that a realistic bad run, usually worse than the backtest's worst one, stays within the drawdown you wrote down in step 1. More detail in position sizing in trading.
Step 6. Decide how you'll go live and when you'll stop
Before the first live trade, write down how you'll execute (ideally automated, so you're not tempted to step in), how you'll compare live results to the backtest, and what would tell you the system is broken rather than just in a normal drawdown. Making that call in advance is far easier than making it in the middle of a losing streak.
Step 7. Add systems that do different jobs
One system on its own is fragile. Every system has periods when it struggles. A small set of systems with different jobs, such as a trend following engine, a mean reversion system and a hedge, can make the whole portfolio smoother. My own live portfolio is built exactly like that: a combination of trend following, mean reversion and hedge systems. You can follow it on the live track record.
What software do you need?
You need a backtesting platform and good data. The right platform is the one you'll actually keep using. It depends on what you trade and whether you want to code. Compare the options in how to choose backtesting software.