Michael J. Carr, CMT
After deciding which markets and what timeframe are right for you, the next step is to come up with the rules for trading. There are actually four different types of rules that are needed to have a complete trading system:
2. How much to trade on each position
3. When to get out of a losing trade
4. When to close a winning trade
Entry rules can be simple or complex. In deciding on how to structure your rules, it’s worth considering the wisdom of Father William of Ockham, a 14th century Franciscan monk, who noted that the simplest solution is usually the best. This idea is known as Occam’s Razor. Trading rules relying upon multiple conditions aren’t likely to work as well in the future as they have in a backtest. That can be proven with a lot of math, and it’s logical since simple things really do tend to work better.
Simplicity avoids curve fitting, which can mean creating a system that is almost perfect based upon past data. Some of these systems are advertised in the back of popular magazines and offer strategies that double your money in a year with at least 9 out of 10 winning trades. The rules for this might be something like buy when the price of the S&P 500 is down today after trading higher at midday, but up compared to yesterday’s opening price and lower than it was on the close four days ago while market breadth is advancing but below its 8-day exponential moving average. There are at least eleven variables associated with that buy rule. By examining so many different variables, we can often find a winning system using old data. Trading software allows for easy optimization, and the result is a system based on the past that is unlikely to perform the same in the future.
The characteristics described in that buy rule could find a market that was experiencing a short-term pullback in a long-term bull market. Trading an idea that works only in a bull market can be profitable, if you also know when the market is bullish and can stop trading when it turns bearish. This is unrealistic, so rules should be as simple as possible and intended to work in any market conditions.
Buy rules, and sell rules, should be grounded in logic. In this example, we might be trying to find a way to identify a short-term pullback in a bull market as the entry point. The pullback could be defined as a close below the closing price five days ago. Bull markets can be defined as closes above the 50-day moving average. The logic can now be tested to see if it works. Rules to apply in systems trading require logic and testability.
Before testing, the system still needs an objective set of criteria that define how much to buy, and then when to sell. Money management rules determine how much to buy, which is known as position sizing. There are several possibilities. Experienced traders often incorporate volatility into their position sizing algorithm. The word algorithm refers to a process or set of rules used to solve a problem.
Initially, beginning traders often use a fixed trade size. Fixed size can mean either a set number of shares (like 100 shares) or one contract trades for futures traders. These methods are easy, but they are not the optimal way to maximize your capital. The desire to buy 100 shares of a stock would mean that traders wouldn’t be able to trade a high priced stock like Google, which would require more than $50,000. That’s unfortunate because Google is a highly volatile stock and represents a good trading opportunity. Low priced stocks can offer volatility, which is required to make money trading. But, a 20% move in 20 shares of Google could deliver the same profits as more than 600 shares of Cisco, another volatile tech stock, and either position would cost about $10,000. Traders need gains and should try to get them in any fast moving stock. They’ll generally be better off trading a fixed dollar amount than a fixed share amount.
Trading one contract positions in futures fails to consider the simple reality that crude oil has a lot more volatility and risk than rice does. Rice is actually a good trending, low margin contract that beginning traders often fail to consider. On a dollar basis, oil delivers four times more bang for the buck than rice does. This means that four rice contracts could be bought to get market exposure similar to one crude oil contract.
As a rule of thumb, stock traders should consider position sizes of 10-20% of their account equity. Academic studies and financial planners will generally say a well-diversified portfolio has at least 25 positions, equivalent to a position size of 4% or less. Warren Buffett, who has amassed a fortune of more than $50 billion from trading in the real world, says that diversification is a protective measure to limit the damage from ignorance. He prefers to place all his eggs in one basket and watch the basket closely.
Futures traders should hold at least 3 or 4 positions to obtain some diversification. Because these markets use leverage, this is possible even for small accounts of about $10,000. There are only a few dozen futures markets available to most traders, because of liquidity or trading restrictions. Holding ten positions is usually as much diversification as is needed. Very large traders may have positions in about twenty different markets. The number of contracts in each position could be determined by a volatility formula.
A useful formula is to divide the maximum position size by the volatility-adjusted risk. Probably everyone already knows how to do that, but an example may be useful for the few who don’t. We’ll start by assuming the trader wants to hold no more than 10 positions at any one time. This would then be divided by the product of the 20-day moving average of the Average True Range and the dollar amount of 1 point in the contract. The formula, in general terms is:
((max # of positions/100) * account size) / (20-day MA of ATR * dollars per point)
Numerous web sites define the ATR, and the dollars per point of any contract is easily found on a broker’s web site or the contract specifications on the exchange web site. Futures trading involves a great deal of risk, and to be honest, if a trader can’t define the inputs for a formula like this, they should be trading stocks or something with less risk.
Buffett’s advice to put all your eggs in one basket and watch it closely translates to knowing when to sell in systems trading. Closing a losing trade is usually done with a protective stop. Traders tend to know how much they’re willing to lose on any trade, maybe 20% of the position (2% of account equity for someone holding ten positions). When this dollar threshold is met, the trade is closed. This example works for larger accounts. Smaller accounts should hold fewer positions, maybe 3-5, and be willing to accept greater risk per position. The 20% loss still works as a good level to sell, but it would represent up to 8% of the account equity. Traders with small accounts need to accept that idea so they can maximize gains in their winning positions.
Traders often fail to think about how they’ll close a winning trade. A trailing stop is one approach that is effective. Once a trade is entered, a stop is placed 20% under the entry to get out if the trade turns out be catastrophically wrong. As the price moves up, the trader can just keep moving the stop up, keeping it at about 20% of the highest price traded at since entry. It is important to never lower the stop price which would increase the acceptable loss. A twist on this idea is to jump the stop to at least breakeven after a 10% gain. The advantage of this is that it prevents winners from becoming losers.
Exits can also be based on symmetric rules that in some way reverse the entry rules. This works well with moving average systems or with traditional technical indicators. If a buy signal is generated when price moves above the moving average, a sell would occur on a close below the average. This should be combined with an initial stop loss if the exit rule would result in a very large loss. The percentage stop would prevent that.
That’s all there is to developing system rules. Define testable entries and exits combined with a position sizing rule. Backtesting can be done with many different software packages and simple systems can even be tested with a spreadsheet. Interpreting the test results will be the subject of the next article in this series.