A Guide to Creating a Successful Algorithmic Trading Strategy by Perry J. Kaufman

Book cover of A Guide to Creating a Successful Algorithmic Trading Strategy by Perry J. Kaufman

1) A Brief Introduction: The Ground Rules

Perry Kaufman first used automated trading systems in the 1970s. At the time, he was very much in the minority. But today, algorithmic trading has become mainstream. The objective of this book is to be a painless lesson in reality. Each chapter covers the important steps in creating a trading system.

All traders are biased on the best approach to trading. Perry Kaufman is no different. He likes fully automatic simple systems which work in more than one market. He also favors macrotrends, arbitrage, and pattern recognition.

Kaufman says there are eight steps needed to design a trading system:

  1. Come up with an idea to be tested.
  2. Get a supply of data.
  3. Set up the testing platform.
  4. Define the system rules.
  5. Test the system.
  6. If the test results are bad, refine the rules and retest.
  7. If the test results are good, test the system on new data.
  8. If this final test is positive, the system is worth trading. For anything less than good results, it's best to scrap the idea.

The book covers creating two types of systems, trend and short-term. The trend systems most often use a moving average to determine the trend's direction. The short-term systems are based on patterns and breakouts.

2) The Idea

Good trading system ideas require a logical basis. The idea should be simple, with a cause and effect easy to see. When systems are based on fundamental market action or human behavior, it's likely what has happened in the past, will happen in the future.

The opposite of simple and logical is the kitchen sink approach. This is a system created by randomly combining various indicators to match the testing data. The only thing this process ensures, is zero chance for future profits.

The basis for a good system idea can come from anywhere. The seasonal nature of travel is a simple example. Most travel happens around the holidays and in the summer. This pattern is likely to still hold true in the future. And any reoccurring event, like a seasonal pattern, can be the heart of a trading system.

Other patterns which repeat are economic cycles and reversion to the mean. Prices don't go up or down forever. They always return to a long-term average. An arbitrage system is one way to take advantage of the reversion principle.

Pick two stock in the same sector. Buy the under-valued stock and short the over-valued one. As one or both stocks revert back to their long-term average, the trade becomes profitable.

A system idea can come from a market adage. "Buy on the rumor and sell on the news", reflects a fundamental market truth. Markets anticipate events instead of only reacting to them. Regular patterns of institutional buying and selling at certain times of the month is a market constant which can be anticipated.

Obvious cause and effect is another source for system ideas. When interest rates rise or fall, some stocks can be expected to move in the opposite direction.

From intrinsic factors, like reversion to the mean, or extrinsic forces, like interest rates, there's no shortage of sources for system ideas. But if you have trouble coming up with an idea, start trading without a system.

Ironically, the best way to create a trading system can be to trade before you have one. When your money is on the line, you pay attention to prices and the surrounding market events.

Coming up with the best system depends on both the idea and the trader. Real-time trading can help you decide your trading preferences. System trading requires discipline in following the system's rules. If you're uncomfortable trading a system, it's likely you won't follow the rules. This makes matching a system to your trading personality equally as important as the system.

The idea you choose should be aligned with your risk and reward values. What is a tolerable account drawdown, in terms of amount and for how long? Is the trade win rate as important as the overall profit? What is an acceptable minimum rate of return?. Do you prefer short or long-term trades? The right system for you, is the one which best fits the answers to these questions.

3) Don't Make It Complex

The chapter title says it all. The more rules or parts a system has, the more sources for failure. A good system should not only be simple, but profitable in different markets. If a system is derived from a fundamental characteristic of human behavior or market activity, it should work in most, if not all markets.

The objective should be to create a "robust" system. A system is considered robust if it has tested good performance in different markets and under changing market conditions. This adaptability trait is what makes robust systems successful.

A system which works in all markets is a desirable goal, but there is one exception. The exception relates to the concept of "noise". Price is similar to a TV or cell phone signal. It carries information, but it also has random fluctuations called noise.

Kaufman created a way to measure market noise. The formula calculates an efficiency ratio. The ratio is the price change over a period, divided by the absolute values of all the individual price changes. If a stock moved 5 points in 10 days with 5 closes up 2 points and 5 closes down a point, the total is (2 x 5) + (1 x 5) for a total of 15 points. The resulting efficiency ratio is 5 points divided by 15 points, or 33 percent.

The lower the efficiency ratio is, the noisier the market. Markets with high efficiency ratios are best traded with a trend system. Noisy markets are best suited to a counter-trend, mean reversion system.

Keeping things simple is important for system creation, but also for system testing. Test each system rule by itself to see how profitable each one is. When multiple rules are tested at the same time, there's no way to know which one adds profit.

Individual rule testing can also have value later on. If a system stops working well, the initial rule testing can indicate which rule or rules may need to be altered. Individual rule test results allow for easy before and after comparisons to see if a rule has become less effective.

Simple systems have a small number of simple rules. Too many rules usually results in overfitting. This is a process of creating rules to precisely match historic price data, the kitchen sink approach. An excessive number of rules not only reduces future trading opportunities, it also makes failure more probable. History repeats, but not in exactly the same way as in the past.

4) Why Should I Care about "Robust" If I'm Trading Only Apple?

It's possible to create a profitable system for trading only one security. But there would have to be a reason why the security was so unique. And even if the security was somehow unique, it's most probable the system rules fit only the past prices, not the future ones. Whether it's one market or many, a robust system gives a better chance for future profitability.

Many professionals rely on long-term trend following systems because they are robust. Trading long-term trends has shown a profitable record in multiple markets over different time periods. Of course no system is perfect. There are limits to how well a system will work over a range of markets and time periods. But if 70 percent of system tests are profitable, consider the system robust.

One of the important questions in system testing occurs with parameters which have a range of values. Which of the values should be used? The most profitable one? No, usually the most profitable ones benefit from some chance occurrence which won't repeat. This is part of the value of a large test sample, it can reduce the effect of chance events.

By the same reasoning, should you choose the worst performer? Maybe it was hurt by a chance event and will do better in the future. Again the answer is no. Good or bad performance is no guarantee of future results.

So what to do? The answer is, treat the system like a stock portfolio. The most common way to reduce portfolio risk, is by holding a diverse group of stocks. Usually the better performing stocks will make up for the poor performers. The same effect can apply for system parameters. Instead of risking the choice to only one parameter value, choose a range.

Choose at least four values with a nonlinear relationship. Linear values are a series like 5, 10, 15, 20. The difference between a higher number and the previous number is always the same. Nonlinear values have the same ratio between each higher and lower number. For instance, the series 5, 10, 20, 40 is nonlinear. Each number is twice the value of the preceding number.

When choosing parameters for a trend following system, be aware there is no best way to follow a trend. All trend methods work for trending markets and fail when a market doesn't trend.

The main difference with trend methods is their win rate and how their drawdowns occur. Moving average systems tend to have low win rates with many small losses. Breakout systems have higher win rates, but larger per-trade losses.

Kaufman prefers breakout systems over moving averages for determining trends. A breakout indicates a change in the market and has more significance than the crossing of a moving average. Also, a moving average will keep moving towards prices even when prices have stalled, but not reversed.

An advantage in creating trend following systems is the variety of methods which work. Which method you choose depends on matching your risk preferences with the method's risk profile.

5) Less Is More

Both long-term trends and short-term price action can be the basis for an effective trading system. But short-term systems have a unique advantage. They present less risk than trend-following systems.

The simplest way to not lose money, is to not risk it. By their nature, trend-following systems have to spend more of their time in the market, than out of it. If the system is a reversal type, it's always holding a position. This makes trend-following systems subject to unforeseen negative events which occur every so often. By staying out of the market most of the time, short-term systems lower exposure to random event risk.

Of course, making money requires making trades. And short-term systems can be consistently profitable. Short-term systems have high win rates with small profits and losses which makes for a smooth equity curve. In contrast, trend systems have a more irregular equity curve due to lower win rates with most of their profit coming from just a few trades.

Long-term traders are in a position to survive the extremes of temporary market volatility. However, this is not the case for short-term traders. Prices must move enough for short-term traders to make a profit. But when the move is to excess, the risk increases substantially. It's a good idea for all traders to monitor annualized volatility and avoid trading when it gets too high. Kaufman doesn't trade when volatility is over 50 percent.

Trends can last for long periods and markets will always be in and out of balance. This means both trend-following and short-term systems have a profitable future. But one thing neither type of system should rely on, is the news.

After the fact, news always comes up with a reason for market action, but market are not that simple. If there was a consensus on the value of any asset, its price would never change. Prices change because people don't agree on the asset's value. It's this disagreement which moves markets, not the news.

6) If You're a Trend Follower, Don't Use Profit-Taking or Stops

"No one every went broke taking a profit", is popular trading advice. This trading maxim shows up when a trader is quick to close out a profitable trade. Taking even a small profit, is seen as better than allowing any possibility of a loss. Most traders also know if you don't use stops to exit trades, you will eventually go broke. Both ideas are common sense and common advice. And both are not always right.

The reason to avoid using a stop-loss for trend systems is due to the nature of trends. With more international influence in all markets, the noise level has increased when compared to the trends of previous decades. This higher noise level makes it harder to tell the difference between a temporary price shock and a trend reversal.

Stops can prevent short-term losses within a trend, but lose at least some of the profit if the trend continues. A loss of potential profit in a trend system is especially critical, since trend following relies on a few big profits to make up for the more frequent losses.

It's not always wrong to use a stop-loss with a trend system, but it should not be automatically included. Instead, test the stop's effect on the profit and win rate before choosing to use it.

One of the values of a trading system is the elimination of decisions. Follow the system's rules and that's it. As with using a stop-loss, profit-taking sets an arbitrary limit on trade profits. If taking a profit misses the opportunity for extra profit, it's the same as taking an additional loss.

Of course, like getting stopped out, a trade can always be reentered. But at what price? The best moves often don't offer a good second chance. Trend-following systems can't afford to lose those slices of extra profit.

Taking profits and using stop orders tends to make trend-following less effective. But a modification of trade entries or exits, can be effective. Instead of entering or exiting a trend when a reversal is indicated, wait for a minor reaction. This method can increase per-trade profits, but it also increases the risk for missing out on profitable trades. For his systems, Kaufman uses a reaction for entry, but not the exit.

Comparing Three Popular Trend-Following Methods
  • A moving average system is typical of most trend-following systems. It has many small losses when in trendless markets but these losses are offset by a few large profits. The drawback of a moving average as a trend indicator is how it continues to show a trend when prices first start moving sideways. And after a certain amount of time, if prices remain in congestion, the moving average may falsely signal a reversal.
  • Breakout trend systems usually have a higher win rate than moving average systems, but this comes with a larger per-trade risk. A breakout system doesn't react to every market move, which makes it more adaptable to changes in market volatility.
  • Linear regression trend-following systems automatically draw lines through prices to indicate the trend. In its simplest form, the slope of the line indicates the trend direction. Linear regression systems show similar performance to moving average and breakout systems.

There is no system type which is best for following trends. It's more a choice about taking losses. Moving average systems take many small losses and breakout systems take fewer but larger losses.

Most traders probably use moving averages, but Kaufman prefers breakout systems. He feels their signals are more definitive, have reduced false indications, and give similar profits on fewer trades.

7) Take Your Profit If You're a Short-Term Trader

Contrary to trend following, short-term traders should take profits. Over the long term, prices trend with only short-term price corrections. Unlike trend following, short-term systems can't rely on the continuation of a trend for their profit. Instead, their profit is in constant up and down price movement. This means an above average price move in a short amount of time, is most likely due for a reversal.

The best way to judge when to take these short-term profits is by using the average true range (ATR). The true range of a price bar is the high minus the low, or the high minus the previous close, or the previous close minus the low, whichever of these is the largest. The ATR averages the true range for a number of price bars. When used for taking a profit, it's best to take partial profits at several multiples of ATR. Suggested values are 1.5, 2.0, and 4.0 ATRs.

Using stops with short-term systems is tricky. Since short-term price moves tend to react instead of trend, a market will often react when it hits a stop-loss price. It's suggested to not exit a trade until after the stop-loss price has been penetrated. Either wait for a reaction or if intraday, get out on the close. Usually market noise will work in your favor.

In general, Perry Kaufman doesn't like stops. They interfere with a system's logic and are basically a trader's opinion of what are acceptable losses. The one area which Kaufman feels stops are important, is pairs trading.

If the price between two related stocks exceeds the usual norm, a pairs trade buys one stock and shorts the other. When the price gap returns to its typical average, the trade is closed out.

During the trade, both stocks are subject to significant positive or negative news. This risk makes stops important. A stop should be placed 10 to 20 percent off the stock price. This stop level gives protection against adverse events, while still allowing for natural price swings.

8) Searching for the Perfect System

If a past price pattern will repeat in the future, then back-testing a system idea can validate its concept. To test an idea, create rules with a range of parameters. Decide on the time frame for testing and what kind of results are acceptable. Do you want a few large profits with many small losses, a mix of small losses with small profits, or some other combination?

The type of system choice depends on the general characteristics of the markets traded. Trend following works best with slow moving, less volatile markets. Short-term systems work best with volatile, noisy markets.

When the initial testing is finished, there are four possible outcomes:

  • All the combinations of rules and parameters made money. This is highly unlikely. Most likely this outcome was due to a testing error.
  • Nothing works. Again there may be a testing error or it's possible prices move in reverse to what was tested.
  • Some combinations make money, but most lose. This is a typical result.
  • Most combinations are winners, but the profit amount varies widely. In this case, the ideal situation has the best results cluster around a certain point and taper off gradually.

If some of the rule and parameter combinations made money, are they clustered around certain combinations? If they are, it's a good sign and the system could be tradeable. What's not wanted is the profitable combinations scattered in a random fashion.

When there is a cluster of winning combinations, don't choose a single combination, but several. Just as diversifying a stock portfolio lowers risk, choosing a range of parameters or combinations do the same. Diversifying won't get the best return, but it does eliminate getting the worse.

The quality of back-testing relies on the quality of the data. There can never be too much data. The test data should include every kind of market situation which may happen in the future, and this requires lots of data.

Likewise, the more trades tested, the better. The sample error should be a minimum of 5 percent. The sample error is one divided by the square root of the number of trades. So for 100 trades, the sample error equals 1/10 or 10 percent. To achieve a 5 percent sample error requires 400 trades

9) Equal Opportunity Trading

One of the ways to control risk is to limit each trade to the same loss amount. You may feel that some trades will outperform the average, but you can't be sure. The only thing you can control is how much you're willing to risk on each trade. Staying with the same amount for each trade is both easier and safer to your finances.

Sticking to an equal risk per trade, also makes choosing position size easier. With 20 stocks in a $100,000 account, each stock would get $5,000. For a $50 stock, this equals 100 shares. Due to their potential for excessive volatility, it's suggested to exclude stocks priced under $5.

Futures allow position sizing according to volatility. Since volatility is a measure of risk, control your risk by rating the volatility. Measure the volatility of a future's contract with a 20-day average true range (ATR). Divide a set dollar amount by the ATR. This gives the less volatile futures more money and reduces the amount for the high volatility futures.

In addition to risk control by position sizing, assign a target risk. This is a percentage of your account you're willing to lose. You might decide your target risk is 10 percent or $10,000 in a $100,000 account. To calculate the target risk, add up all the daily profits and losses for each stock or futures contract. If the amount for a stock was $1,000 and your target risk was 10 percent, then you would divide $1,000 by 10 percent which gives $10,000. That's how much to invest in the stock or futures contract to meet the target risk amount.

If you're tracking your target risk, you can use the daily profits and losses to calculate the portfolio rate of return. Divide each daily profit or loss by the investment size which gives the daily investment returns. Starting with an initial net asset value (NAV) of 100, add each daily return to the initial NAV. To find the annualized rate of return (ABOR) divide the last NAV by the first and take the exponent of that using 252 divided by the number of years recorded. Finally, subtract one from that number.

ABOR = [(NAV/NAV0) ^ (252/years)] - 1

A diversified stock portfolio is a common risk reduction technique. Less common, but at least as good, is system diversification. Use both long and short-term systems to average out changing market conditions. It's suggested to use different strategies to achieve good diversification. Any more than four systems will do very little for risk reduction or profits.

A final way to reduce risk is through market selection. Follow a diverse group of markets, but it's not necessary to include each stock or futures in the group. If an individual group member has never tested to show a profit, simply leave it out.

10) Testing—The Fork in the Road

When testing a trading idea, keep in mind garbage in equals garbage out. It's easy to make an error entering rules or parameters, so don't only look for errors in bad results. It's even more critical to scan the good tests.

Overlooked errors in a bad test result, cause no harm since the system won't be traded. However, overlooked errors in good test results can lead to trading a losing system.

The basic system creation principles are as follows:

  • Get all the data you can.
  • Set aside some data for final testing. A good way to do this is to start with a pair of two years. Then skip the next two years and add the following two years to the first pair. The idea is to have a random diverse group of data to test.
  • Decide before testing, how you're going to rank the results. Kaufman likes to keep the criteria simple and uses the information ratio (IR). It's the annual rate of return divided by the target risk.
  • Keep parameter values spaced by percentages. This makes every increase in the range of values in proportion to all the others.
  • Have a reasonable limit of parameter values. It's easy to test for a wide range of values and have a few work out, simply by random chance.
  • Each rule should improve the average of all tests, not just one. If a rule makes only minor improvement, leave it out.
  • If the testing of the data set aside is not profitable, testing is done. Don't alter the system and test again. That would be overfitting to the data, which is a bad idea.

An important quality of any system is how robust it is. How well can the system handle various conditions in different markets? The percentage of profitable parameter combinations tested, gives a basic measure of how robust a system is. Ideally, 70 percent or more of the tests are profitable. But realistically, 50 percent is more likely.

When evaluating test results, it's important to account for price shocks, especially with trend systems. Price shocks are unexpected random events which can strongly affect prices. If a day's range is 2.5 times or greater than the average range, consider that a price shock.

It's unlikely random price shocks will benefit a system more than 50 percent of the time in the future. So reverse the test results for all price shocks in excess of 50 percent.

Another way to keep test results realistic, is to include any commissions, margin fees, and price slippage. Use your own trading data if you have it, or ask a trading friend or broker for usable numbers.

Although it's good to use as much data as possible, price-adjusted data introduces unique situations. Futures data is often made continuous by adjusting the price of the previous contracts to line up with the current contracts. Stock prices are also back adjusted for splits. This means the previous prices are not the same as when they occurred and some may actually show up as negative. Absolute and percentage price changes will be different, and need to be accounted for when testing.

It's the nature of system design that live results don't often measure up to testing results. Expect risk to increase with real trading, which is a good reason to be cautious when trading a system live. However, with experience in creating more systems, the live results should gradually begin to match the test results.

11) Beating It into Submission

When a system idea doesn't test well, it's best to drop it. If you modify the rules, it's likely you'll overfit the system to the data. However, positive initial results support the tested idea's validity. In that case, you may decide to revise the rules or parameters.

If you do revise the system, the new results should show improvement over all tests, not just one trade or market. Beware if the new results are too good, as this indicates overfitting. The best results will show a smooth increase of all tests without a sharp peak for some values.

In revising a system, the point isn't to come up with the best parameter values from testing a large range. Instead, before testing, choose a reasonable parameter range for the type of system tested. A long-term trend system might use periods of 40 to 120 days and 5 to 15 days for a short-term system.

What is wanted from testing is a good average of results. The best parameters in testing are not likely to be the same ones in the future. It's the average of the tests which is most likely to be matched in the future.

An example of improving overall results is shown with the 3-Day Trade system.

3-Day Trade System Rules for Buying (reverse for shorting)
  1. Prices close down two days in a row.
  2. Buy if the next day's open or close is lower than today's close.
  3. Exit on the close following the entry day.

A profit target of 2 x ATR could be one addition. A price spike of 2.5 x ATR and a close in the upper 25 percent of the daily range could be the trigger for a short sale.

Both of the additional rules are a general response to volatility and adapting to the noise in a market. In testing, they improved the results for a wide range of equity index markets, which is a sign the changes were not a case of overfitting to the data. Any other changes should show the same type of overall improvement to be acceptable system additions.

As this example demonstrates, responding to volatility is one way to improve general system performance. Monitoring volatility allows a system to avoid the extremes. Usually it's best to avoid high volatility, especially with trend systems. Low volatility is also to be avoided since without enough price movement, there's no profit potential.

12) More on Futures

The main trading appeal of futures is the leverage they offer. Typically it's about 10 percent. You put up a good faith deposit, called margin, which is a small fraction of the face value of the futures contract. A margin of $2000 might control a futures contract worth $20,000 or more. Price changes for a contract are multiplied by the amount of the commodity per contract. If a wheat contract of 5,000 bushels has a price change of 1 cent, that equals $0.01 x 5,000 or $50.

Futures are traded internationally and the exchanges work the same as in the United States. The only difference is the quotes are in the local currency, which in Europe is the euro. For U.S. traders, this means returns need to be converted to dollars.

Similar to stock sectors, futures are divided into six groups. The groups are interest rates, forex, equity index, energy, metals, and agricultural.

To diversify within a futures group, look for uncorrelated members. The interest rate group doesn't qualify, since all interest rates move in the same direction. But other groups have uncorrelated members and further diversification can be achieved by trading in at least three groups.

13) I Don't Want No Stinkin' Risk

Risk is not sexy. It doesn't have the same appeal as doubling your money in a year. But if you want your trading account to survive, you need to plan for market risks. Controlling risk is like an insurance policy on your account. It won't eliminate losses, but it will make them less financially painful.

A risk management plan should have the following elements:

  • Risk the same amount on each trade.
  • Trade in diverse markets and more importantly, use diverse systems.
  • Adjust position size when necessary to maintain equal risk levels.
  • Avoid the volatility of low-priced stocks and when market volatility is excessive (more than 50 percent when measured over a 20-day period).
  • If two systems are about the same, use the one with the shorter average trade period. This helps avoid price shocks.
  • Set a maximum account loss and decide what happens if that should occur.

The longer you trade, the more likely it is you'll have a drawdown worse than your test results. How will you deal with that? If the amount is more than your account loss limit, you have two choices. You can either quit trading or adjust your trading.

If your account loss is approaching your loss limit, it's safest to assume the losses will continue and you should cut back on your position size. It's suggested when losses exceed one half of your account loss limit, you should consider scaling back your positions.

The next step is wait until the drawdown has stopped and profits are building. When the total profit off the low is 5 percent of the pre-drawdown amount, start scaling back in your positions. When scaling in, wait for small equity curve dips before adding a new incremental amount.

14 Picking the Best Stocks (and Futures Markets) for Your Portfolio

The reality is, you can't devise a portfolio or system, which gives you control over the outcome. Your objectives are meaningless to the market.

That's the bad news. The good news is, a simple selection process is all that's needed to get a sound mix of stocks or futures. The process works off the assumption recent good performance indicates continued near-term success.

From a group of markets, pick all those which had a profit, large or small, over the past two years. Then rank their performance over the last three months. Choose the top ranking ones for your portfolio. Each day rank a large group (250 or more) of stocks or futures by their system performance. If any have performed better than your current selections, use them to replace the under-performers.

You could come up with a lot of rules and calculations for deciding what to trade, but like system creation, simplicity seems to work best.

15) Matching the Strategy to the Market

Trend following relies on trends continuing and short-term trading relies on frequent reversals. This relationship makes it helpful to match markets to the type of system used.

Perry Kaufman created the efficiency ratio (ER) to rate how smoothly a market trends. The efficiency ratio takes the net price change for a period and divides it by the absolute value of all the individual price changes. If the ER was measured over a period with all higher closes or all lower closes the individual changes would equal the net change. This results in an ER of 100%. High ER markets are the best fit for trend systems. Low ERs, noisy markets, are the best fit for short-term trading.

ER ratings tend to stay the most consistent with futures, then ETFs to a lesser degree, and stocks are the least consistent. Stocks are sensitive to company news which is a reason for their less consistent efficiency ratio.

Measured over 20 days, high-tech stocks generally have higher ERs than older mainstream company stocks. ETFs tend to have lower ERs with an exception for new or low activity ETFs. Institutions are the main players in the quiet ETFs. These companies often act in unison, which means there are more frequent straight-line moves in those ETFs.

Futures markets have a wide range of asset types with a resulting range of ERs. Short-term interest rate futures are efficient and trend, while index futures are noisy and best for short-term trades.

16) Constructing a Trend Strategy

To create a long-term trend system requires a decision on the following items:

  • How the trend is determined.
  • When to buy and sell.
  • Stop-loss placement or other risk reduction method.
  • Taking profits and re-entering the trend.
  • Single entry and exit or scaling in and out.
  • Position sizing.
  • Adjustments for volatility.
  • The test plan components: which markets to test, data used, transaction costs, and what qualifies as a successful result (such as 70 percent of periods tested showed profits and the adjacent periods results were similar).

There are three common ways to determine the trend, a moving average, a price breakout, and a linear regression line. They can do equally well in a trending market and just as poorly when a market is trendless. The frequency and size of the trade profits and losses is the main difference between the three. Your preference is the best guide on which to choose.

When deciding on the trading rules, keep in mind the value of simplicity. Start with something basic like buying when the moving average turns up and selling when it turns down. Due to the upward bias of the stock market, usually it's best not to short securities, only futures.

In designing a long-term trend system, use a period of at least 2 to 3 months. But not too long, or there will be too few trades. Stick with a maximum of 120 days. If the low end was 40 days, space the longer periods in even percentages. 25 percent spacing would give, 40, 50, 62, 78, 97, and 122 days.

Long-term systems require a lot of data to get an adequate number of trades in a test. There should be at least 100 trades in the results, which may require three or more decades of data.

The choice of markets is a matter of understanding the basic characteristics of each one. Interest rates trend, but offer little diversification. Major currencies are diverse and usually trend well. Stocks go through periods when most trend, but usually they are noisy and poor long-term trend prospects. Equity index markets follow the trending or non-trending periods of stocks.

Although it's not necessary, if your tests are positive, it's useful to test other markets. If the same rules and parameters hold with other markets, it shows the system is robust. The profits may be less, but that's acceptable. A good indication of what actual trading results will be, is the average profits for both sets of markets.

If the initial tests don't show positive results, it's time to rethink the original idea. Adding more rules to a losing system is a way to fit the system to the data and not the way to create a reliable system.

17) Constructing an Intraday Trading Strategy

Long-term systems rely on the stability of economic trends. Short-term systems rely on market noise.

The process for designing a short-term system is the same as for a long-term system as listed in chapter 16. Create buy and sell rules, decide on stops or other risk controls, determine when to take profits, define position size, and choose which markets to test. In addition, short-term systems have the following considerations:

  • The time period for the price bars.
  • Testing markets which tend to trend, mainly fluctuate (reversion to the mean), or do both.
  • The typical holding period for a trade.
  • Making adjustments or trading limits due to volatility.
  • Allowing for the greater impact of trade costs and slippage on small profits.

Depending on the markets chosen, you may want to trade with the trend or trade short-term reversals (mean reversion). A trading range breakout or an above average move, are two common strategies which can work with either trading type. Both trend following and mean reversion can be profitable, but trend following offers longer holding periods with higher per-trade profits.

Shorter time frames intensify the importance of trade factors like profit taking and the effects of volatility. When profits are small, using price or time targets to take profits makes sense. Minimum and maximum volatility levels are also important when trying to maximize small profits. Once you have a basic plan that works, see if various filters will improve the performance.

18) Summary

Ideas to remember when creating a trading system:

  • The trade idea must be simple, sound, and fit your preferred trading style.
  • Systems with few rules have the best chance of success and each rule must be profitable on its own.
  • The best systems are robust. Robust systems work in multiple markets with various market conditions.
  • Some volatility is necessary, but if too high, it poses too great a risk.
  • Multiple parameters offers a better chance for success than a single parameter.
  • When possible, exit on a system's natural exits instead of stops.
  • Taking profits (at multiple target levels) makes sense for short-term trading but not for long term.
  • When a trading idea tests poorly in the out-of-sample data, don't try to fix it, scrap it.
  • When all else is equal, favor the systems which are in the market the least.
  • Simple is better (and easier) when ranking portfolio stocks.
  • Apply equal-weighting to your trades and portfolio.
  • System diversity is better for trading success than market diversity.
  • Testing is no guarantee of future success, but it's better than untested ideas, no matter the source.

Resources

A listing of trading platform websites, a MetaStock user group, various financial and trading blogs, periodicals, and Perry Kaufman's three websites.


PJ Nance
Previous  Next 
Book cover of How To Trade In Stocks by Jesse L. Livermore How To Trade In Stocks by Jesse L. Livermore
Jesse Livermore was known as the millionaire Boy Plunger due to his trading skill at a young age. Livermore's first success in the stock market made him a…
Book cover of Bollinger on Bollinger Bands by John Bollinger Bollinger on Bollinger Bands by John Bollinger
When John Bollinger makes investing decisions, he uses a process he calls, Rational Analysis. This process is an intersection of fundamental analysis…
FreeReminiscences
of a
Stock Operator
Reminiscences of a Stock Operator was called, "One of the most highly regarded financial books ever written." by Jack Schwager (Market Wizards author). Get your free book now and an email when a new book summary is posted.
Email
We will never rent, sell, or share your information. Unsubscribe anytime.
Recent Summaries