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

Money management for portfolios: It’s a risk game

Links to the easylanguage codes can be found throughout the following article.

Having a simple, reliable trading system is key to success for those trading one or two contracts. If all goes as planned,  your account will grow. Regardless of how robust that original system is, if you overtrade or take on too much risk, you can blow up. It’s always easier to trade small accounts. The bigger challenge is growing up responsibly.

Most traders have accounts from $10,000 to $50,000. While large enough to support a portfolio of carefully selected markets, the size will restrict you to one contract if you’re operating with reasonable risk control. That restricts your profit and trailing stop options. Often, if trading a portfolio, you may have to skip certain signals if your account size will not allow more positions than funds will support. This gets to the heart of a common problem with portfolio trading. 

If we trade one 30-year Treasury bond futures contract and one Canadian dollar contract, the risk is diametrically different. Consider one measure of risk control: The highest-high in the past 20 bars minus the lowest-low in the past 20 bars. The risk in T-bonds is slightly more than double that of the Canadian dollar, so trading one contract in each market does not balance the risk. This effect gets multiplied across a larger portfolio. 

A basic fundamental fact, but one that’s helpful to keep in mind, is: You cannot apply a money management scheme to a losing strategy and make it a winning strategy. Consider a losing system that has a 50/50 chance of winning but must pay 1% commission on each trade. No risk management method will make this a winner. 

Of course, real-world trading systems are much more complicated than our example. We must estimate such performance metrics to judge how robust a system is and predict how it will perform in the future. That prediction must have a positive expectation, including the effects of slippage, commissions and rollover costs on futures contracts.

All of these considerations affect the trade-sizing methods that we employ. These techniques also must take into account win/loss ratios and the realities of funding, among other key factors.

Classic sizing algorithms

Perhaps the simplest money management strategy is the percent-risk approach. Many traders have heard the adage that you should risk no more than 2% on a given trade. This theory makes sense for large traders with multimillion dollar accounts. However, it is unrealistic for small traders. If you are trading T-bonds, for example, and have a $25,000 account and limit risk to 2%, that is $500. A $500 stop in T-bonds simply does not give the market room to move and most likely will turn any winning system into a losing one by prematurely stopping out any potential winning trade.

“Simple channel breakout” (below) shows the logic for a 20-day channel breakout strategy. We can view trade risk as the difference between the highest-high and lowest-low over the look-back period. For example, as of Jan. 25, the difference between the 20-day highest and lowest price is 4.75 points. This implies a risk of $4,750. If we use the 2% rule, then we would trade only one contract for every $237,500 in our account. 

Click here to download the following code as text
image

A more realistic method of position sizing is volatility based. A volatility-based method would use the dollar value of each market’s average daily range or true range over a given period. We could use some multiple of this measure to size trades. Roughly 3.5 times the 40-day average daily range is a good estimate of a constant leverage. You could create a buffer by doubling that to seven times. This is referred to as a dynamic margin strategy. Using 25% to 40% of capital in a dynamic margin is a reasonable strategy.

There are two parts to this strategy. The first calculates dynamic margin on a market-by-market basis. Here’s the function in TradersStudio code:  

Function DynamicMargin(mkt As TSProcessor.IMarket,LBPeriod,MARGINEST)

Dim Arr As Array

Dim SummVal

Dim I

Arr =mkt.DataArray(0, “TrueRange”)

SummVal=0

For I = 0 To LBPeriod-1

SummVal=Arr[I]+SummVal

Next

DynamicMargin=((SummVal/LBPeriod)*mkt.BigPointValue)*MARGINEST

End Function

In this function, we first pass an object for each market to this function. We then multiply the average true range by the big point value for this market (“bigpointvalue”) and our margin multiplier (“marginest”), which is seven in this case.

Next, we will implement a trade plan with three parameters. This is expressed in the code shown in “Trading the plan” (below). Percent is the percent of dynamic margin to allocate. Also, we divide money by the number of markets available, so we do not become over-leveraged. RangeLB is the length used to calculate the average range and DMarginMult is the multiple of that average range to use as dynamic margin. Typical inputs might be 30% to 40% for the percentage, 40 for RangeLB and seven for DMarginMult.

Click here to download the following code as text
image

The idea is to skip trades when we don’t have enough money to trade a one-lot. The dynamic margin strategy also can be extended to multiple systems where we divide the money between sessions and each market.

Optimal f

Optimal f is a method described by Ralph Vince in the book “Portfolio Management Formulas: Mathematical Trading Methods for the Futures, Options and Stock Markets.” The book goes beyond the optimal f concept; however, it’s this subject — an optimized way to increase trading size as an account grows — that has become part of the trading vernacular.

To optimal f, we need a few definitions:

Pn — Profit of the nth trade
HPRn — Holding Period Return. The return for the nth trade at %Risk f.
WCS — the Worst Case Scenario. The worst HPR in the series of trades. A negative number.
TWR — Terminal Wealth Relative. The return at the end of all trades.
f — the fraction of current equity risked on each trade.

Note that optimal f assumes that a fixed fraction of equity (or %Risk) will be put at risk. That is, each trade in the series risks the same fraction of equity; therefore, as equity changes, so will the amount placed at risk.

Optimal f itself is found in a roundabout way: 

HPRn = 1 - f * (Pn / WCS)
TWR = HPR1 * HPR2 * ... HPRn

Using these formulas, we optimize to find the largest TWR: the optimal f value. 

Optimal f itself has many shortcomings (acknowledged and addressed by Vince). First, it really only is useful for a single market system. Second, your max drawdown is the same as your f value, so an optimal f value of 0.40 means at some point you will have a 40% drawdown. In addition, optimal f is based on past performance. As performance metrics, such as WCS or trade distribution, change over time, the f you are trading becomes suboptimal.  

Dynamic portfolio selection

Dynamic portfolio selection lets you trade large baskets of markets by selecting the best trades from the larger basket of markets. For example, you could have a basket of 1,000 stocks and select 25 to trade at one time based on relative strength. 

Dynamic portfolio selection also is valuable for trading managed futures. Most of the long-term trend-following systems require more than $200,000 to trade. Large baskets may require $1 million to trade across all markets. We’ll design our analysis around a portfolio of 40 markets, including non-U.S. stock indexes, interest rates, currencies, U.S. indexes, agricultural markets, precious metals and more.

We will charge our system $25 for slippage and $25 for commission trading a classic triple moving average crossover, using 15, 55 and 95 for the moving averages. To simplify the test and allow us to compare apples-to-apples during portfolio analysis, we will include only dates that have active trading in all markets. The test will run from Nov. 27, 2002 through Jan. 25, 2012.

This system makes a total hypothetical net profit of $1.343 million. It has 658 trades with 292 winning trades (44.38%). The average winning trade is $9,473 and the average losing trade is $3,886, a win-to-loss ratio of 2.44. The maximum drawdown is –$375,386 with a profit factor of 1.94.

We’ll now apply dynamic margin, a way of calculating a theoretical margin based on volatility using true range, and use this to size our trades (DynamicMargin = (Average(TrueRange,40,0) * 7) * BigPointValue). We simply divide our money by the number of markets and then risk the dynamic margin value for each market. Here’s the code for the approach:

Function DynamicMargin(mkt As TSProcessor.IMarket,LBPeriod,MARGINEST)

Dim Arr As Array

Dim SummVal

Dim I

Arr =mkt.DataArray(0, “TrueRange”)

SummVal=0

For I = 0 To LBPeriod-1

SummVal=Arr[I]+SummVal

Next

DynamicMargin=((SummVal/LBPeriod)*mkt.BigPointValue)*MARGINEST

End Function

The LBPeriod we use is 40, and Marginest is seven. The DollarsPerMarket is our account size divided by the number of markets and the size is (DollarsPerMarket * (Percent / 100)) / DynamicMargin).

Using the dynamic margin money management strategy, the system makes a total hypothetical net profit of $2.067 million. It has 644 trades with 288 winning trades (44.72%). The average winning trade is $15,556 and the average losing trade is –$6,777 for a win-to-loss ratio of 2.30. The maximum drawdown is –$542,032 with a profit factor of 1.86.

We can use this method to select dynamically a subset of these markets to trade as our active portfolio. We will use relative strength to pick the top 10 markets based on an 18-day average directional index (ADX). We also will allow only two new positions per day even if we have four to five new entries in the top 10 (code for this is below). When we write out custom ranking function, we use three fields, one of which is a flag for active orders. This function returns both the ranking globally for a given symbol, as well as its ranking within the subset of active orders. This allows us to implement a strategy that limits both maximum positions as well as how many entries we can have in a given day. This screening radically changes our results.

Click here to download the following code as text
image

We apply this filter with a maximum of six positions and the following parameters for the dynamic portfolio ADX function: DYNAMICPORT_ADX(30, 1000, 18, 6, 2, 20021127, 1). Starting with a $1 million account, and traded on the same time frame as before, our total net profit is $16.883 million. We have 90 trades, 46  are winners (51.11%). The average winning trade is $1.3 million and the average losing trade is $1 million. The average win-to-loss ratio is 1.31, and we have a maximum drawdown of $25.9 million and a profit factor of 1.37.

In addition, the hypothetical compound annual growth rate goes from 15.45%, when taking all the trades, to more than 38% with the filter. However, while this strategy improved the results, it was not done with less risk. Increasing your exposure in the markets brings greater profits, but also greater risk. The next step is to rein in that risk while keeping much of the profit.

Page 2 of 6
Comments
comments powered by Disqus

eNewsletter Signup

Get the latest news and timely trading strategies for stock, options, forex, commodity, and financial derivatives markets with Futures' Daily Market Focus - FREE!