Professional Stock Trading System Design and Automation phần 6

pdf
Số trang Professional Stock Trading System Design and Automation phần 6 16 Cỡ tệp Professional Stock Trading System Design and Automation phần 6 1 MB Lượt tải Professional Stock Trading System Design and Automation phần 6 0 Lượt đọc Professional Stock Trading System Design and Automation phần 6 0
Đánh giá Professional Stock Trading System Design and Automation phần 6
4.2 ( 15 lượt)
Nhấn vào bên dưới để tải tài liệu
Đang xem trước 10 trên tổng 16 trang, để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

146 7.4 Examples 7 Range Trading applied, the number of trades is cut in half, but the profit factor improves from 2.01 to 2.91, while the Total Net Profit is reduced by just 21%. Table 7.2. TradeStation Performance Acme N Strategy COMPX-Daily (5/2/1994-3/1/2002) 147 These performance reports have problems, however, because they are based on indices that cannot directly be traded. The stock that closely tracks the Nasdaq Composite Index is the Nasdaq-100 Index Tracking Stock (QQQ:Amex). Although the QQQ did not start trading until 1999, its profit factor matches the performance of the indices, as shown in Table 7.4. Table 7.4. TradeStation Performance - Acme N Strategy QQQ-Daily (3/10/1999-3/1/2002) Total Net Profit $24,536.30 Open position P/L Gross Profit $49,854.55 Gross Loss Total # of trades 50 Percent profitable Number winning trades 27 Number losing trades $0.00 ($25,318.25) 54.00% 23 Largest winning trade $4,238.20 Largest losing trade ($2,500.00) Average winning trade $1,846.46 Average losing trade ($1,100.79) Ratio avg win/avg loss 1.68 Avg trade (win & loss) $490.73 Max consec. Winners 3 Max consec. losers 4 Avg # bars in winners 4 Avg # bars in losers 2 Max intraday drawdown Profit Factor ($6,162.50) 1.97 Max # contracts held 1,500 7.4.2 Securities Broker/Dealer Index The chart in Figure 7.8 displays some Acme N long signals for the Securities Broker/Dealer Index (XBD). As with other sector indices, the XBD does not have a direct proxy. One possibility is the Exchange Traded Fund, or ETF. The ETF is just a stock that is composed of a group of stocks in a specific sector. The problem with the ETFs is that most are not yet liquid enough for short-term trading, and the spreads are wide enough such that the Acme N system does not perform well on some of these stocks (see Chapter 8). Another alternative is a basket of stocks. Select three or four representative stocks, and buy or sell them when the Acme N signal fires on the sector index. The advantage of this approach is that the trader can select a few volatile stocks that are much more liquid than the ETF. The disadvantage is that one or two of the stocks may not trade in line with the index. The best approach is to select stocks that most closely track the sector those with t h e highest weightings in the index. 148 7 Range Trading 7.4 Examples 149 7.4.3 Analog Devices Figure 7.8. Securities Broker/Dealer Index The performance report in Table 7.5 shows the unfiltered performance for the Securities Broker/Dealer index for the past four years. Table 7.5. TradeStation Performance Acme N Strategy XBD.X-Daily (3/24/1998-3/1/2002) Here is an example of three Acme N entries, as shown in Figure 7.9. Examine the price patterns preceding the occurrence of the narrow range bar. For the first entry, the stock consolidated for at least three days before the signal. The second entry was an extended pullback, and the third entry was a three-bar retracement. Look for rectangles and tables preceding the narrow range bar because this type of entry has a better risk/reward ratio. The longer the Range Ratio is below the threshold, the more explosive the move. Study the contour of the RR curve when the Range Ratio dips below the threshold. Either the ratio spikes, or it forms a long, shallow bottom. While the Range Ratio is below the threshold, the stock is storing potential energy for a protracted move. The three entries in Figure 7.9 illustrate why profit targets are essential in today's trading environment. All three stocks hit their optimum profit after only two days. By waiting for the extreme of the previous bar to be exceeded, the trader may be giving up as much as one-third to one-half of the profit while having to hold the position another day. When deciding whether or not to use profit targets, the profit factor is not the only deciding factor. The profit factor should be divided by the average holding period to calculate the optimum time to exit the trade. 7 Range Trading 150 7.4 Examples 151 7.4.4 Taro Pharmaceutical 7.4.5 Multimedia Games Figure 7.10 is an example of three Acme N long entries over a period of one month. This system works best on strongly trending stocks with the following characteristics, some of them taken from Investors Business Daily (IBD): The chart in Figure 7.11 shows a losing trade. Your job is to count the number of problems with this trade entry before proceeding with this example. We find at least four problems with this trade entry: a The stock has gapped up. a The stock has already risen 10% over two days. a The stock is in the midst of a retracement. a The stock's trend is not clearly defined. - IBD Relative Price Strength Rating (RS) > 90 - IBD Earnings Per Share Rating (EPS) > 90 - New 52-Week High At the time, Taro Pharmaceutical (TARO:Nasdaq) had RS and EPS rankings of greater than 99. We are certain that a trader could make a decent living by trading just this strategy. Figure 7.10. Taro Pharmaceutical The number of retracement bars varies for each trade shown in Figure 7.10. The first trade pulled back two bars; the second trade two bars, including one inside day, and the third trade two bars with one inside day. A parameter to the Acme N System is RetraceBars-it is the minimum number of retracement bars required to trigger an N entry. If the trader chooses not to wait for a retracement and just wants to enter on a narrow range bar, then the RetraceBars parameter can be set to zero. When not using retracement bars, examine the range of the few bars preceding the NR bar. If the stock has appreciated dramatically in this period, then the trade is a pass. The advantage of using no retracement is t h a t the N system picks up consolidations that would normally be filtered out. This example illustrates why no automated trading system is foolproof. Yes, all of the problems could have been filtered out with the software, but automation is a tradeoff between eliminating good trading candidates and keeping bad ones. The use of retracement is a perfect example of how both good and bad trades can be eliminated. Setting the number of retracement bars to zero includes narrow range bars in consolidation patterns (good) but does not exclude stocks with strong moves in the past few days (bad). In contrast, setting the number of retracement bars to two excludes narrow range bars in consolidation patterns (bad) but also excludes stocks such as the one shown in this example (good). 8 Market Models Money itself isn't lost or made, it's simply transferred from one perception to another. Gordon Gekko Wall Street the Motion Picture The market can be handicapped, just as a horseplayer bets on thoroughbreds. One might be surprised at just how complicated the betting at the track is-the average bettor is probably not aware of the potent speed sires or Diazo's Center of Distribution [8]. These data provide the edge to differentiate the professional horseplayer from the amateur. As with any game, the player competes for a statistical edge, and this search leads the player to a deeper exploration of diverse subjects such as mathematics, physics, and even philosophy. Trading evolves as a Glass Bead Game1 as the trader attempts to build the ultimate market model. In this chapter, we construct two market models, one using data that are relatively hard to automate. First, we apply a set of the Acme trading systems to some market and sector indices. Because indices do not have a float, we omit the Acme F system. The Acme M, N, R, and V systems are combined to form the market model; each of the systems is applied without trade filters to eliminate many of the stock-specific requirements. This first market model is our Systems Model. Second, we develop a special version of the Acme M system using the market sentiment and breadth indices shown in Table 8.1. For each market index, we specify a rule based on an overbought or oversold reading; the rule interprets the reading based on the index's correlation with the market. For example, the VIX makes a new 20-day high. Because the VIX is negatively correlated with the market, the letter "V" is displayed above the current bar. As with the Acme M system, a signal is generated when a minimum number of pattern criteria in t h e same direction are met. This market model is our sentiment Model. 154 8.1 Systems Model 8 Market Models 155 Table 8.1. Breadth and Sentiment Indices Index Chart Symbol Volatility Index (VIX) V Put/Call Ratio P New Highs H New Lows L Arms Index (TRIN) T Bullish Consensus B Short Sales Ratio S 8.1 Systems Model A systems model can be defined by combining the following Acme systems. In this model, we are taking a bottoms-up approach. We simply combine all of the systems into one strategy and apply that strategy to market and sector indices such as the COMPX and BTK, as well as ETFs such as the QQQ and SPY. - Acme M System - Acme N System - Acme R System - Acme V System Figure 8.1 shows a chart of the Nasdaq-100 Series Trust (QQQ:Amex) with the Acme Systems Model. Each trading system has been applied unfiltered to the chart. As with any other stock, the QQQ exhibits the same characteristics with the Acme systems applied to the chart-multiple entries, profit targets, and stop losses. For market and sector indices, the rectangle is a rare occurrence, so the Acme R signal does not trigger often; however, when it does appear, prepare for some trading action over the following days. Table 8.2 summarizes the performance of the unfiltered Systems Model for the QQQi The profit factor is consistent with the overall Acme profit factor, so we then decided to compare the performance of the model for the sector indices versus their corresponding ETFs. Since we wanted to optimize for performance here, we applied the system filters. The results arc shown in Tables 8.3 and 8.4, sorted by profit factor. Table 8.2. QQQ Performance Report (06/10/1999 - 02/15/2002) Total Net Profit $24,318.00 Open position P/L Gross Profit $54,059.00 Gross Loss Total # of trades 58 Percent profitable Number winning trades 31 Number losing trades $0.00 ($29,741.00) 53.45% 27 Largest winning trade $5,424.00 Largest losing trade ($2,455.00) Average winning trade $1,743.84 Average losing trade ($1,101.52) Ratio avg win/avg loss 1.58 Avg trade (win & loss) $419.28 Max consec. Winners 6 Max consec. losers 5 Avg # bars in winners 3 Avg # bars in losers 2 Max intraday drawdown Profit Factor Account size required ($8,293.00) 1.82 $8,293.00 Max # contracts held Return on account 4,200 293.24% 8.1 Systems Model 8 Market Models 156 Table 8.3. Market Indices Sector Index # Trades % Profitable Win/Loss Ratio COMPX DJI 43 35 MID SPX 55 50 65% 57% 53% 48% 1.54 1.54 1.83 2.03 Profit Factor 2.88 2.05 2.04 1.87 Table 8.4. Market ETFs Sector Index QQQ SPY MDY DIA # Trades 34 47 50 39 Win/Loss Ratio Profit Factor 59% 43% 52% 44% 2.07 1.99 1.25 1.29 2.95 1.47 1.36 1.00 % Profitable Win/Loss Ratio Profit Factor % Profitable Table 8.5. Sector Indices Sector Index # Trades RMS 57 58 50 DOT XTC NWX YLS FOP XBD XAU DRG BKX 55 45 4 50 50 BTK UTY 47 45 55 53 60 51 52 SOX 33 CMR CYC 43 55 RLX OSX FPP 67% 67% 58% 64% 64% 50% 46% 48% 51% 49% 45% 45% 43% 49% 46% 39% 44% 33% 2.40 2.05 2.63 2.04 1.87 2.46 2.57 2.13 1.76 1.89 1.96 1.91 1.98 1.56 1.75 2.24 1.47 1.33 4.80 4.20 3.64 3.57 3.40 2.46 2.19 1.96 1.84 1.80 1.64 1.58 1.51 1.50 1.50 1.46 1.17 0.65 157 The performance results in Tables 8.3 and 8.4 illustrate the difference between performance derived from indices and their corresponding proxies. Except for the QQQ the performance for the ETFs is mediocre at best. The problem with the other ETFs is that the spreads are higher, and more importantly they are not as volatile as the QQQ. The bottom line is that a trader will not be able to trade an ETF effectively unless it exhibits a combination of tight spreads, high trading volume, and high volatility. The QQQ fits these criteria, so we will take it. Table 8.6. Sector ETFs Sector Index # Trades % Profitable Win/Loss Ratio Profit Factor BHH WMH BBH IAH BDH HHH RKH UTH SMH OIH RTH TTH PPH 52 62% 57% 59% 52% 48% 54% 44% 47% 58% 45% 38% 38% 31% 1.70 1.83 1.65 1.72 2.00 1.54 1.84 1.57 0.97 1.42 1.77 1.74 2.05 2.73 2.44 2.35 1.87 1.85 1.80 1.43 1.40 1.31 1.16 1.09 1.06 0.92 35 46 48 50 52 48 51 33 20 21 37 29 Tables 8.5 and 8.6 compare the performance of the sector indices with sector ETFs, sorted by profit factor. Again, we see how the performance of the ETFs is worse than the raw indices, except in those cases where the ETF is relatively liquid and relatively volatile. Currently, the only two ETFs that we consider "trade worthy" for holding periods of five days or less are the Biotechnology HOLDRS (BBH:Amex) and the Semiconductor HOLDRS (SMH:Amex). Notice the bottom four entries in Table 8.5; these are the four most cyclical sectors. - Morgan Stanley Cyclical index (CYC) - Morgan Stanley Consumer index (CMR) - PHLX Semiconductor Sector index (SOX) - PHLX Utility Sector index (UTY) 158 8 Market Models 8.2 Sentiment Model In 1986, Zweig developed a "Super Model", combining several monetary and momentum indicators to predict market direction [39]. Here, we review seven different market indicators and then incorporate them into the Pattern Trading System (Chapter 3). By encoding the behavior of each market indicator, we can construct the Sentiment Model to synthesize the bullish and bearish behavior of each indicator and generate signals to predict market direction, emulating the Acme M system. 8.2 Sentiment Model 159 Since we avoid absolute values of the VIX, we look for new highs or lows in the form of spikes over a reference period. Technically, a spike is a combination of a channel breakout with a large range bar. If the VIX spikes up, then a Buy signal will be generated. If the VIX spikes down, then a Sell signal will be generated. 8.2.1 Volatility Index (VIX) The Volatility Index (VIX) measures the implied volatility of index options. The VIX is inversely related to market direction; consequently, a high VIX reading is associated with sharp corrections, while a low relative VIX reading marks the end of an uptrend. Together on a chart, a broad-based market index and the VIX will appear as mirror images of each other (see Figures 8.2 and 8.3). Historically, high VIX readings can reach fifty and above, while low readings bottom in the twenties. The behavior of the VIX is asymmetrical because as the VIX spikes up during market corrections, it declines gradually during market advances. Figure 8.3. VIX Mirror Image With this technique, we can identify extreme readings in the VIX and see spikes on the chart in either direction. Although this technique is good for identification, the trading signals have not been clearly defined. First, as with any trading system, we do not want to enter a trade without confirmation. Second, we do not want to restrict signals to spikes alone. As soon as the VIX makes a new high or low over a given range of bars, we want to prepare for a confirmation. What do we mean by confirmation? In the case of the VIX, as the market goes down and the VIX spikes up, we want to see the VIX first tick down before going long the market. This down tick in the VIX is usually accompanied by an uptick in the market, since the two are inversely related. Clearly, we want to use this relationship as a general confirmation technique that can be applied to any indicator. The only question is whether an indicator is positively correlated with the market (indicator rises as the market rises) or negatively correlated with the market (indicator falls as the market rises, e.g., the V I X ) . There are two types of confirmation: high confirmation and low confirmation. If the previous price is the highest price of a given range, but the current price is less than the previous price, then a high confirmation occurs. If the previous 8 Market Models 160 price is the lowest price of a given range, but the current price is higher than the previous price, then a low confirmation occurs. The interpretation of a high or low confirmation depends on whether or not the indicator is positively or negatively correlated with the market. Table 8.7 shows the signal to take based on the indicator's confirmation and its market correlation: Table 8.7. Indicator Confirmation Confirmation Market Correlation Signal High High Low Low Negative Positive Negative Positive Buy Sell Short Sell Short Buy 8.2 Sentiment Model 161 8.2.2 Put/Call Ratio The Put/Call ratio is an index calculated by the Chicago Board Options Exchange (CBOE). The ratio compares the total put volume with the total call volume for stock options or index options. Investors buy more calls than puts, so the ratio never reaches one unless the market is declining sharply. The put/call ratio is negatively correlated with the market because people tend to buy puts at bottoms, and historically this behavior has proven to be wrong, as shown by the circled area in Figure 8.4. Many traders look at the value of the put/call ratio on a historical level. For example, a ratio greater than 0.8 is considered to be bullish, and a ratio less than 0.4 is considered bearish; however, we do not care about the absolute readings because we are using the confirmation technique. From this confirmation logic, we created a function called AcmeHighLowIndex to test for both high and low confirmations. The Acme Market System calls the AcmeHighLowIndex function separately for each indicator in the model. Each time, the function returns one of the following values to the Market System: a 0 = No Confirmation p 1 = High Confirmation a 2 = Low Confirmation The Market System then populates its long and short pattern strings based on the confirmation values. The EasyLanguage code for the AcmeHighLowIndex function is shown below in Example 8.1 Figure 8.5 shows a trough in the put/call ratio. Although spikes up are common, spikes down are rare because such a low reading means that everyone is bullish. This situation is akin to everyone running to one side of the Titanic. Essentially, the whole country was long in March 2000, and nobody was left to buy. The charts illustrate how the put/call ratio is not entirely symmetrical. The fear of losing money is much more powerful than the satisfaction in m a k i n g money, and the emotional trader usually makes the wrong decision at the wrong time. 162 8.2 Sentiment Model 8 Market Models 163 8.2.4 New Lows 8.2.3 New Highs Each day, the number of stocks making 52-week highs on the New York Stock Exchange is tracked as the "NYSE New Highs" number. The New Highs indicator is positively correlated with the market. As the market goes up, so does the number of new highs; however, the behavior of the New Highs data is slightly different than the behavior of its corresponding market index. When the market attains a new peak, the number of new highs spikes at the peak. As the market pulls back, the number of new highs drops close to zero. At the next peak, the new highs will spike once again. The key to interpreting new high data is to compare the new highs at two market peaks. If the market is higher at the second peak, but the number of new highs is lower at its second peak, then a divergence has been created, as shown in Figure 8.6. The divergence in this example occurred just before a 20% selloff in the S&P 500 in July 1998. Fosback created an indicator in 1979 called the High Low Logic Index in order to recognize these divergences [14]. The index calculates the minimum of two ratios: the ratio of new highs to the total number of issues, and the ratio of new lows to total issues. When the index is high, the market attains both a high number of new highs and new lows, a bearish indication because market breadth is narrowing. When the index is low, then e i t h e r the number of new highs or new lows is low, a bullish indication in both cases. The number of stocks making 52-week lows on the NYSE is tracked as the "NYSE New Lows" number. The New Lows indicator is negatively correlated with the market, meaning that spikes in the number of new lows is a bullish indication, as shown by the circled areas in Figure 8.7. 164 8 Market Models 8.2 Sentiment Model 165 8.2.5 Arms Index (TRIN) 8.2.6 Bullish Consensus Richard Arms created the Arms Index2 in 1967 to compare a ratio of advancers to decliners (Advance/Decline Ratio) with the ratio of advancing volume to declining volume (Upside/Downside Ratio). The TRIN's behavior is similar to the VIX; it is negatively correlated with the market, i.e., a high reading means the market is oversold and a low reading means the market is overbought. As shown in Figure 8.8, the TRIN plotted in the lower panel resembles the profile of an EKG. Spikes punctuate the chart; some technicians will smooth out the TRIN with a three-day or four-day moving average. The problem with smoothing any kind of price is that the average introduces lag, and because our trading signal would depend on a confirmation of the moving average, most of the move would already have occurred. The Bullish Consensus is a market sentiment indicator that was created in 1964 by Market Vane to track the buy and sell recommendations of market advisors and equity analysts. Based on their recommendations, Market Vane calculates the bullish percentage, e.g., 59% of the people are bullish, and so the remaining 41% are bearish. Along with the New Highs indicator, the Bullish Consensus is the only other model indicator that is positively correlated with the market. The chart in Figure 8.9 shows how closely the two track together, not coincidentally. When the market is up, people are bullish, and when the market is down, people are bearish. Clearly, when people are overly bullish, the market is ripe for a fall and vice versa. Figure 8.8. Arms Index, or TRIN Figure 8.9. Bullish Consensus The TRIN is the least predictable of the indicators in the Sentiment Model. All of the other indicators show some degree of persistency from day-to-day or week-to-week. In contrast, the TRIN is a one-bar phenomenon. Its value lies more in its oversold readings (i.e., spikes) than in its overbought readings. The TRIN is another indicator that illustrates the asymmetry between corrections and rallies. 8.2.7 Short Sales Ratio There are a variety of short sales ratios, such as the Odd Lot Short Sales to Odd Lot Total Sales. Here, we refer to the Public to Specialist Short Sales Ratio on the NYSE. The theory behind this ratio is that the public lends to sell short at the worst times (Figure 8.10), and the s t a t i s t i c s prove i t . The bottom line is t h a t the specialist down on t h e floor has a much better sense of the m a r k e t .
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.