When a good trading plan comes together

When a good trading plan comes together

Ruggiero, Murray A Jr

In the first installment of this two-part series, we looked at the pros and cons of various money-management techniques, discussing them conceptually as part of a larger trading plan. Here we cover the application of this approach.

The ability to manage your trading program properly requires you to do a lot of things simultaneously. Good trade management should allow you to process all traded systems and markets, walking forward one time frame at a time. In other words, different parts of your plan cannot be executed in a vacuum.

While many traders, and trading programs, apply trade management after processing the trading signals, this ignores the reality that trade management concepts can affect future trades. Trade management can even change entries and exits depending on the rules of the trading system. This is why it is necessary to completely process one bar at a time, rolling forward. In this article, we’ll demonstrate the importance of this concept with a case study approach by developing a complete systematic trading plan.

Trade management, position sizing and risk management are concepts that are sometimes considered applicable to large traders only. While it’s true that in some markets only large accounts can afford to trade multi-lot positions, trade management also can help small traders select trades that accommodate many strategies.

FOR ALL SIZES

One popular risk management approach is to limit risk to a given percentage of an account or a given dollar value. There are two ways to implement this. The first way is to take all signaled trades but enter a stop at the percentage or dollar level. The other way is to calculate the initial reversal or exit implied by the risk management guidelines and skip entries that carry a larger risk.

We can test this idea by seeing how it works with a basic channel breakout system. The TradersStudio Basic code, written for TradersStudio, is shown in “Pick and choose” (right). We’ll test this system on a basket of 25 markets (right).

Tested from Jan. 2, 1980 to June 12, 2008, deducting $100 per trade for slippage and commissions, we made $1,083,729 with a drawdown of $132,281. Our average trade returns $223.82 and generates an average annual return of 28.81%. The largest losing trade is $19,650. We also have a roughly 20% chance of a $40,000 drawdown. Assuming we need at least two times the maximum drawdown to trade this system, we would need an approximate account size of $265,000.

Now, consider what happens if we limit our trades to ones that have $2,500 or less risk. We now make only $846,314.25 but our drawdown is $66,482.24. The average annual return jumps to 44.76%. Our 20% drawdown probability level becomes $22,000, and the likelihood for a 40% drawdown drops to 2.8%. Also of note, the largest losing trade on this portfolio is only $4,262.50. This is critical because the largest losing trade and drawdown figures greatly affect the leverage used in many profit reinvestment strategies.

DIVERSITY IS KING

Many understand the benefits of trading a basket of markets to reduce risk. A related concept is trading multiple trading systems and multiple baskets. In fact, as long as they trade on different time frames, two systems can even trade the same markets. One example is an intermediate-term stock index system coupled with an intraday or one- to three-day swing system. The shorter-term system can reduce the longer-term exposure during periods of short-term negative volatility, even unwinding a position or reversing it for a profit.

Again, let’s look at an example to see how a trading program might implement this approach. The first session is long five E-mini S&P 500 futures (ES) and short five E-mini Nasdaq futures (NQ). The second session is short 10 ES futures and long two NQ futures.

In this case, the net position for ES is -5 (five long minus 10 short). The margin required is not calculated based on 15 contracts but five, or ES margin = ABS(-5 * $4,500 ) = $22,500. For the NQ position, we are short five contracts and long two for a net short of three. Our margin is based on these three contracts, or NQ margin = ABS(-3 * $3,250) = $9,750. The total margin for the plan is $32,250 ($22,500 + $9,750).

The concept of net position and effective net margin are important when trading multiple strategies on the same markets. Using this, you want to limit position sizing not by actual contracts but by net position held. This is also important because some sizing algorithms take margin into account.

Being able to implement this, you can trade multiple systems based on different concepts on market baskets that overlap. One example would be a trend-following system and an intermarket system, both trading crude oil. Some of the time, both systems will be long or both will be short, and sometimes they will offset each other. In addition, trading models on the same market but different time frames in effect solves the issues of equity-curve give back because the shorter-term models will go short before the longerterm ones. This offers an elegant solution to a complex market analysis issue for those with a large enough pool of money. Trading to solve equity-curve give back at a single system level is difficult and can lead to curve fitting. This solution can be robust if the individual components are robust.

POWER OF REINVESTING PROFITS

Reinvesting profits is another common concept that few traders approach with the proper logistical design. One of the classic methods for reinvesting products is optimal f, introduced to the trading industry by researcher Ralph Vince. However, optimal f is not designed to trade on a portfolio. Optimal F also uses past trades. This leads to scenarios where those running simulations using optimal f are generating an f value that is calculated with hindsight.

One version of optimal f, developed by this author, solves both these issues. It’s called adaptive f. First, it calculates f based on a given number of trades walking forward. We only use a moving window of past trades in calculating f, allowing the value to adapt over time. In addition, because f is not valid for a portfolio, it is calculated on each market individually.

We can walk though this application using a simple channel breakout system. The only difference is that we use two sets of buy/sell signals. One signal is used by the trade plan and sized. The other is to calculate f and is based on a one-lot position. The code is shown in “Breakout” (page 47). The VirtualBuy and VirtualSell reflect the second channel that is not affected by sizing at the trade plan level. These are used to calculate optimal f.

We ran this on cotton, the euro, copper, the yen, natural gas, sugar and 10-year T-notes from Jan. 2, 1980, to June 12, 2008. Each trade was charged $100 for slippage and commissions. Performance on a one-lot basis shows a net profit of $449,323.66 on 601 trades, 41.1% of which were profitable. The largest winner is $78,220, and the largest loser $14,120. The average trade makes $747.63, and the maximum drawdown is $82,605.01.

Now, let’s consider the performance using adaptive f. The code for the adaptive f function is shown in “Window of opportunity” (left). TradeLookBack is a look back based on a number of trades. Increment is the step sized used in searching for the maximum f value. TradeLookBack is the number of trades used to calculate f. We then pass a handle to the market object from the trade plan interface that is objMark As TSProcessor.Imarket. It also returns the largest losing trade, which is needed to calculate position sizing using optimal f.

Finally, the code for the entire trade plan is shown in “Top to bottom” (below). F_TradeWindSize is the number of trades used to calculate f. ScaleF is the multiplier of f to use; this number should be less than 1.00. Ceiling is an absolute limit to the number of contracts that can be traded. We also restrict the system to trading only one unit for the first 500 bars, or about two years. In addition, after seven to eight winning trades in a row we artificially limit f to 0.60 or less.

Here are the parameters we use in the simulation:

Steps = 0.05

F_TradeWindowSize = 40

ScaleF = 0.9

Ceiling = 500

The results for the same period and markets referenced above are impressive. The net profit is $4,987,739.42 on 602 trades, 41.2% of which were profitable. The largest winner is $1,306,125, and the largest loser $704,720. The average trade makes $8,285.28, and the maximum drawdown is $1,293,602.71. The maximum number of contracts held is 403.

A word of warning: This trading plan is presented as merely a demo and not a tradable system. Results are only to show how we can use an optimal f concept on a basket of markets.

Another issue with f is that if the performance of the system is worst in the walk-forward period, it could cause the account to go bankrupt. We added a few protections in the above code to guard against this, but one valuable area of additional research would be to determine how to adapt f to predict future trends in its own value.

Trade management is more than just an exciting area of research for all traders. It is a vital step in developing a viable long-term systematic solution to the problem of market analysis and trading. Thankfully, with new trading software and more powerful computers, we can take better advantage of these adaptive concepts and better keep risk under control.

Note: The codes imbedded in this article also can be found at futuresmag.com on our downloads page.

Murray A. Ruggiero Jr. is a consultant His firm, Ruggiero Associates, develops market-timing systems. He is the author of “Cybernetic Trading Strategies” (John Wiley & Sons). E-mail him at ruggieroassoc@aol.com.

Copyright Futures Magazine Group Aug 2008

Provided by ProQuest Information and Learning Company. All rights Reserved