Trading System Development – The Right Way

Performing trading system development the right way is critical to the profitability of your trading system. The correct process will yield a more robust and profitable system far more quickly and effectively than the alternative. The process for developing a robust trading system is the same regardless of whether you are going to use it for stock trading, futures trading or forex trading. Many new traders focus on the stock market first, but the process can be applied to futures and forex as well.

Click here to download my FREE trading system development cheat sheet

The Trading System Development Process

Contrary to what most new traders expect, Trading system development needs to be focused on you and your beliefs first, and the methods / markets second.

This is because it will be impossible for you to stick to a trading system that is based on a premise that you don't believe in…you simply won’t feel comfortable with the trading signals.

If you have set your trading system goals and chosen a trading strategy which suits your personality, objectives and lifestyle then you are now ready to develop your trading system. The 4 steps to trading system development are:

Trading System Development ProcessTrading system development is a 4 step process
  1. Write hypotheses for each component of your system
  2. Select trading signals to match your hypothesis
  3. Trading system backtesting to evaluate and improve performance
  4. Design risk management and position sizing rules

1. Write hypotheses for each System component

Trading System Development Process - Step 1

A hypothesis is simply a statement about what you believe should happen. You may remember writing hypotheses in high school science classes before you started your experiments. For example, if you were about to test solubility of sand, salt and sugar in water, then you might have the hypothesis that salt and sugar will dissolve, while sand will not.

In trading, your hypothesis is similar. All you are doing is stating what you think should work in each of trading system component. The image below demonstrates how you simple it is to write a hypothesis to guide your trading system development. These example hypotheses are for a trend following stock trading system.

Starting with a strong hypothesis that you are testing is extremely important - it saves time and helps ensure you are not just data mining to find something that worked in the past with no value in the future.

2. Select Trading Signals to match your hypothesis

Trading System Development Process - Step 2

Selecting the right trading signals to capture what your hypothesis states should work is much more important than testing the most complicated new indicators from some magazine. Thinking about the underlying logic of the signals you choose will bring far more value than testing lots of different indicators without regard to what they are really trying to achieve.

For your trading system to work long term, it must be based on some underlying market behaviour that gives you an edge in the market. This is why your hypothesis for each trading system component discussed above is so important. Without the hypothesis to guide you, it is very hard to select the right trading signals to backtest.

The illustration below gives an example of how to choose trading signals based on the hypothesis you have written for each part of your trading system.

3. Trading system backtesting

Trading System Development Process - Step 3

Backtesting to analyse and improve the performance of your trading system will tell you if your idea has any merit and whether it is tradeable. If your unoptimised system does not turn a profit then optimising it is probably a waste of time. Optimizing your trading system is a special art, which is covered extremely well in Pardo's excellent book The Evaluation and Optimization of Trading Strategies.

Backtesting your system may sound complicated and time consuming, but it can be a fairly straight forward process if you follow the right approach:

1. Separate Data:
Create separate in sample and out of sample data sets by splitting your markets up and setting date ranges for the in sample data sets. The system will be optimized on in sample data. To do this well you need a lot of data - I use and recommend Metastock Data because of the wide range of markets and cost effectiveness. (Click here for a free trial of Metastock Data)



2. Identify System Parameters:
List the parameters in your system to be optimized. The example illustrated below has 4 parameters to optimize during the backtest.

3. Set Optimization Ranges:
Set a logical optimization range for each system parameter based on your trading strategy and timeframe. To keep your backtest manageable you need to restrict your optimization ranges to values that make sense based on your trading strategy.

4. Set Step Size:
Set a step size for each parameter to give enough granularity without creating too many parameter set combinations. If you select too few steps then you will not be able to select a clear optimal value. If you select too many steps then you will have too many optimization parameter sets to manage effectively.

5. Run Optimization:
Run the optimization using your portfolio backtesting software to identify performance of each parameter set combination. You will need portfolio backtesting software like TradingBlox, Multi Charts or TradeSim

6. Select Most Robust Parameter Set:
Select a profitable parameter set which is surrounded by similarly profitable parameter sets as the optimum for your system

7. Out of sample test:
Run the trading system with the optimal parameter set on the out of sample data to ensure the system is robust and not curve fitted to the in sample data

If your trading system performs equally as well on in sample and out of sample data sets then you know you have a good, robust trading system that should continue to work well into the future.

For stock traders, one of the best ways to get out of sample data is to test on stock data from other exchanges around the world. The most cost effective way I have found to do this is to subscribe to Metastock Data because you get access to a whole region of stock markets for one very low price.

If your trading system works on your local market plus any other stock market data that you test it on then the chances are you probably have a good stock trading system! Click here to get a free month's subscription to Metastock Data for a region of your choice.

4. Design Risk management & position sizing rules

Trading System Development Process - Step 4

Finally designing portfolio management and position size rules to ensure you meet your objectives is probably the most important of the four steps. But you can't do this until you have completed the previous three steps and gotten the most out of your trading system.

There are three main elements in your risk management:

  • Position sizing / risk per trade
  • Total number of simultaneous trades / total risk
  • Total exposure

Now that you have a trading system that is profitable and performs well on out of sample data, you need to adjust your risk management and position size rules to best meet your trading goals. For example, if you vary your risk per trade in small steps you will find that your risk adjusted performance improves up to a point and then rapidly deteriorates. This is illustrated in the diagram below.

When you select your risk per trade and position sizing rules remember that the historical optimum will be too aggressive for future trading. You should always trade at lower risk levels than your portfolio backtesting suggests you should. This is because market conditions will shift over time and this can lead to severe drawdowns if you are trading too aggressively.

Test your trading system with different levels of risk per trade, total risk and total exposure to find the combination of portfolio management rules that best meet your trading goals.

Remember your biggest drawdown is always ahead of you, so trade conservatively!

This concludes my overview of the trading system development process. If you follow steps 1-4 above you should end up with a profitable system that will continue to work into the future. But be careful - there are many pitfalls in trading system development that could lead to curve fitting and poor future profitability.

Below I have included some additional tips to help you develop a robust trading system.

Trading System Development Tips

If you follow the 4 steps above, then by the end you should have a profitable trading system that meets your objectives and suits your personal situation and preferences.  There are many tips and tricks to help your trading system development work as smoothly as possible. 5 of my best tips are:

  1. Balance focus across all trading system components
  2. Follow the process to avoid wasting time
  3. Use hypothesis driven approach to avoid curve fitting
  4. Diversify your trading systems
  5. Start trading conservatively to confirm your system works


Balance focus across all system components

Many new traders spend countless hours looking at different trading signals to find the best entry technique. They are hoping to find the magic bullet, the perfect indicator that will give them winning trades 100% of the time.

However after spending countless hours testing different trading ideas and indicator, I came to the conclusion that there is no perfect indicator. Most indicators work some times and fail to work at other times. The secret to success is not finding the perfect entry signal, but balancing your effort across all of the trading system components to give you an edge in each part of your system.

Spending all your time on entries may give you a good entry, but you will not make money because you will not have exits that capture the profit from your trades effectively.

Similarly if you do not place sufficient emphasis on your initial stop loss then you will end up holding onto losing trades for too long and taking big losses or conversely exiting potentially profitable trades too early.

As discussed here, there are 12 components in a complete trading system and you must ensure you balance your focus across all of them to build a robust trading system.

Follow the Process to Avoid wasting time

Early in this process there is a huge risk that the new trader starts tinkering with ideas, 'playing' with them in an unstructured way. Tinkering or using trial and error is a massive time sink which will hold you back from reaching your trading objectives.

There is no end to the number of ideas you can play with which means there is no end to the amount of time you can waste. Collectively we wasted many months in the past tinkering before forcing some structure and discipline into the trading system development process.

The cost of wasted time in this business is high. Say it takes you 6 months before you launch...and compare this to a structured approach which may take you 1-2 months from start to finish (assuming you are developing your trading system part time after work etc).

Now imagine that you have $50,000 to trade and your system can produce 30% per year with the right position sizing algorithm. This means the extra 4-5 months you spend tinkering could potentially cost you something like $5-6K and this assumes that you end up with the same quality product (your trading system) at the end of the process - which you almost certainly won't.

The cost of wasted time in trading system development is thousands of dollars – learn to do it properly and avoid this cost.

Hypothesis Driven Approach Avoids curve fitting

Trading system development done in an unstructured and unscientific way can very easily lead you down the lossmaking path of curve fitting to past data.

Without a hypothesis guiding your trading system development you are left data mining, looking endlessly for a set of rules that gave good trades in the past. In our experience this leads to overly complex trading systems that do not work on the unseen data of the future.

It is easy to tell a curve fitted system from a robust system that has a strong philosophy and hypothesis based testing behind it - One of them makes money when you trade it real time and the other one doesn't...

…The trouble is that unless you know what to look for, you won't find out until it is too late.  You will be left wondering why your system 'stopped working'...In reality it never worked - you just designed a set of rules that fit the past data and gave no predictive value for the future.

Optimizing your trading system requires a carefully structured approach. Correctly done you should be able to identify broad ranges of parameters for your system which give good performance as illustrated in the graphic below. This optimization was performed using TradingBlox using the trading system development approach described by Pardo in his outstanding book "The Evaluation and Optimization of Trading Strategies".

Diversify your Trading Systems

Once you are successfully trading one system that you developed for yourself, it is time to supercharge your results with diversification.

Diversification is the only real free lunch - but it is a 5 Star meal!

If you already have one profitable system then you can substantially improve your performance by diversifying beyond this original system. Diversification can be achieved in several ways:

  • Trading more markets
  • Trading different versions of the same system
  • Adding additional systems to your portfolio
  • All of the above

Diversification may require you to learn about different markets, but it is quite practical and very powerful to trade a portfolio of systems that cover stocks, futures, forex and options or some combination of these. Research the areas that most interest you and plan to build trading systems and diversify into each of these areas following the correct trading system development process.

Start trading conservatively to confirm it works

Now that you have completed the trading system development process and have fully documented your trading plan (you have done this right?), you are ready to open an account and get started.

At this point you need to decide whether you start immediately with real money or whether you should start paper trading for a period first. The choice depends on how experienced you are and how confident you are in each of your trading system components and your overall trading plan.

If you are brand new to trading and are not sure about the process of running your system, sizing your trades, executing them and managing your open positions, then paper trading first is probably a good idea.

If you are more experienced and you are confident in all of the components of your system then you should probably start trading it at a conservative (very low risk) level first. This will allow you to confirm all of the mechanics of the system are working correctly before you scale up.

Most new traders will benefit by trading with
a small amount of real money at low risk levels

Trading with a small account and low risk per trade will teach the trader much more about trading mechanics and the emotional impact of gains and losses than paper trading could ever hope to achieve.

Unless you actually have no funds available for trading, it probably makes the most sense to just get started, but in a very conservative, low risk way. If you are very uncertain, or if you need some time to build an initial trading stake then you should consider paper trading first.

Related Articles:

Main Page: What are stock trading systems and how do they work?

FOLLOW US: