From the April 01, 2007 issue of Futures Magazine • Subscribe!

Building your own trading system

Our first article in this trading system series discussed the pros and cons of building your own trading system versus buying one off the shelf. If you are inclined to build, here are the necessary steps.

First you must determine your time horizon: short term, medium term or long term. “Short term trading requires more capital because your trades are shorter and capture less profit and commissions are set at a higher percentage,” says Justin Kuepper, a financial writer for Accelerize New Media Inc. “For longer-term trades you also need sufficient capital to account for volatility.”

Next, decide which markets you will trade and whether you will be a trend follower or a reversal trader. As a trend trader you’re mainly looking for the best exits, whereas for trend reversal trading, you’re looking for the best entries.

Once you decide what kind of trader you want to be, you need to chose the appropriate indicators for your trading methodology and markets.

Leading indicators include the Commodity Channel Index (CCI), the Momentum Indicator, the Relative Strength Index (RSI), the Stochastic Oscillator and Williams %R.

Lagging indicators include moving averages and the moving average convergence divergence (MACD).

Kuepper says RSI and the MACD are used to determine the strength of a trend for entry points and moving averages are used to find exits because they are lagging indicators.

The next step is constructing your trading system. A key component is data. “Because the system designer must use extensive backtesting, past price history is essential to constructing a trading system,” Kuepper says.

Michael Browne, DTN Market Access vice president of ProphetX and operations, agrees. “Without solid data, it doesn’t matter what indicators you use, or how fancy your software is, you’re trading is not going to be successful.”

Such data can be integrated into trading system development software, or as a separate data feed. Live data is often provided for a monthly fee while delayed data can be obtained for free. At DTN, the basic package runs $50 per month plus exchange fees for real-time data.

Just as important as data is software. Kuepper says common features enable the trader to automatically place trades and code a trading system. Automatically placing trades often requires permission from the broker and can be expensive. Coding a trading system involves implementing rules for your system. Each indicator you use has a set of parameters (rules) you must program into your trading software. For example, MetaTrader uses MQL (MetaQuotes Language).

Sometimes, this programming can be done automatically via a graphical user interface. This allows you to create rules without learning a programming language. Here is an example of a moving average crossover system:

If SMA(20) CrossOver EMA(13) then enter;

If SMA(20) CrossUnder EMA(13) then exit;

A trading system is created by simply typing the rules in the code window of your software and saving them. The software automatically generates entries and exits.

“Putting code into a system is a huge effort,” Browne says. The average robust system can have up to half a million lines of code. While it may take a while to code your system, it is not very complicated. “Often, just reading the manual and experimenting should allow you to pick up on the basics of the language your software uses,” Kuepper says.

It’s also important to backtest your strategy. “System development software often contains a simple backtesting application that allows you to define a data source, input account information and backtest for any amount of time with the click of a mouse,” Kuepper says.

After the backtest is run, a report is generated that outlines the results. This includes profit, number of unsuccessful/successful trades, consecutive days down, number of trades and an overall performance graph.

Kuepper says backtesting and paper trading are essential to the successful development of a trading systems and reminds you to factor in fees and slippage. “Make sure that you are using the real commission and account for inaccurate fills.” Over-optimization is another danger. “Don’t tailor the system to a very specific market environment; try to be profitable in as broad of an environment as possible,” he says.

Your trading system will generate entries and exits based on your rules that you can enter into the market manually. Completely automating your trading, where your trading system executes all your signals electronically, is possible but is more widely used by professional and institutional traders who can afford the $1,400 per month cost. Besides cost, your broker must offer an application programming interface for your system to connect to electronically and be able to connect to all of the exchanges of the markets you’ll be trading, and your system must be robust enough to trust on auto pilot.

Kuepper recommends manual trading until you are confident in your system’s performance and consistency.

“It takes a long time to develop a successful trading system, and before you perfect it, you may have to endure some live trading losses to detect glitches. Back testing cannot perfectly represent live market conditions and paper trading can be inaccurate,” he says. “If your system loses money, go back to the drawing board and see where it went wrong.”

Comments
comments powered by Disqus