An essay by Bob Pelletier
Reprinted from the May, 2002 CSI Technical Journal (Updated 5/05)
Investing today is tricky business, which is why most smart investors use trading tools to help them make informed decisions. "Trading Tools" is the rather broad term we use to describe the unique studies developed by CSI programmers for the exclusive use of our customers - studies we believe can help you become a more successful trader. We seem to be better at designing studies than at promoting them, so probably 99% of our subscribers have never opened Unfair Advantage's "Trading Tools" menu to explore what's inside. With this Technical Journal, we invite you to get to know the Emerging Market Study that is part of our MarketScanner module - found on the Trading Tools menu. We hope that this introduction will lead to a variety of uses that will enrich your trading experience and enhance your enjoyment of Unfair Advantage (UA).
Before we begin, it should be understood that MarketScanner's basic function is to scan massive quantities of data to find stocks, funds or futures that meet user-specified criteria. It simplifies the task of highlighting trading opportunities without the detailed perusal of thousands of markets. MarketScanner facilitates the investigation of pertinent market movement by sorting and ranking those criteria that you have deemed to be important. Although MarketScanner can be used to narrow down the list of markets for review based on raw data, such as issues within a given price range, or above or below a target P/E ratio, it can also be used to run technical analysis and report markets with favorable results. This is how the Emerging Market study uses MarketScanner.
What Does the Emerging Markets Study Do?
With this study, one can quickly review the history of many thousands of stocks and identify every stock that meets the condition of 1) flat market behavior, followed by 2) accelerating upward or downward market movement.
Once your UA data download session is complete, click the "Trading Tools" menu at the top of your screen, and then click "Market Scanner" from the menu. The MarketScanner spreadsheet screen displays.
Click "Preferences" at the top of the MarketScanner screen to view the "Scan Settings."
MarketScanner settings: For the Emerging Markets study, set the "Days to include" at 25; exclude all series with fewer days, and pick the exchange of your choice. Check "Automatic Update" if you plan to use MarketScanner every day.
In most cases, the "Scan Settings" screen will display, as shown above. If it doesn't, then the necessary entries will be presented as prompts. The first entry or prompt allows you to identify the number of days to be included in the scan for all markets (to be identified below). For the Emerging Market study, we recommend 25 trading days. Adjusting for splits and capital gains (the second entry) can be useful, but slows the process considerably. We recommend you do not select this option, but visually rule out affected stocks when they are presented. Do use the option of skipping issues with fewer days, and skip the boxes that apply only to commodities. Check "Automatically Update" if you plan to use MarketScanner every day.
The "Series to Show" section in the middle of the screen lets you select from all stocks, stocks from your custom lists, or stocks selected by exchange, sector or industry. If you choose any of the last three, you'll be able to fine-tune your selection with additional choices that display. For the Emerging Market study, I usually pick "All in Exchange" and then select NYSE (for New York Stock Exchange) or OTC (for Over-the-Counter - NASDAQ).
Click [Save and Rebuild] when these preferences have been identified.
A progress bar will display that monitors the gathering of market data for examination. This may take several minutes. When 25 days of all your selected stocks have been captured into a single file, the MarketScanner screen re-displays with a current list of your choices. The spreadsheet columns include the CSI number, symbol, name and industry for each. They are initially sorted by CSI number.
Next you should retrieve the programming code required to process the stocks you identified. Begin by clicking the "Analysis" heading at the top of the MarketScanner screen. (This is used to identify the task that will fill one or more spreadsheet columns.) Click "Insert Indicator Using Code Editor" (not "Standard Indicator") from the Analysis menu. The "Code Editor" screen will display.
The Emerging Market study is only available in the Perl® programming language, so we need to make sure that this is the selected language. Click "File" at the top of the Code Editor window and go to "Change Language Mode." If "Perl Fast Mode" is selected, simply click anywhere away from the menu to keep that option. If it is not selected, highlight it on the menu and click your mouse.
Back at the Code Editor Screen - There will be either one or two windows on this screen, and they may include text or not. Now click "Indicator From List" above the window. A menu of sample studies and helper programs displays. "Emerging Markets Study" is listed on the menu. Depending upon your screen configuration, you may need to scroll down to see the full list of choices by clicking the arrow at the bottom of the menu. Click on this choice, and "EmergMkt(20,3)" will be inserted in the Code Editor window. This prompt instructs MarketScanner to find the Emerging Market program and prepare to run it.
The Emerging Market study is just one of many sample and helper programs included in MarketScanner.
The EmergMkt(20,3) prompt includes two parameters (20 and 3), or it may have no values between the parentheses. The parameters must be entered or may be modified as follows: The first parameter is the length in trading days of the required "Flat" period, which we suggest at 20 days. (It must be less than the included days introduced in the Scan Settings.). The second parameter is the "How-Flat" measure, which is an integer from 1 to half of the "flat-period" integer. The larger the "How-Flat" variable, the larger the allowable range of prices for the "flat" period, and the larger the pool of markets that fit the bill. We suggest the How-Flat indicator range from 1 to 3 for the most meaningful results. A value of 1 will report about one percent of the markets from your total scan. Using a How-Flat measure of 2 should report about 15 percent. This pair of inputs (the Flat period and the How-Flat indicator) defines the linear form of the prerequisite market to be screened for further study.
You may view the programming code for this and all other Perl language programs by clicking the [More] button at the bottom of the screen.
Click the [Run] button at the bottom of your screen to begin analysis. A black screen will display while Perl performs the computations.
When finished, the MarketScanner spreadsheet will display, as shown in the chart below. You'll note that three additional columns of information have been added for each stock, all under the heading "EmergMkt." They are "DaB4Cl" (day before close), "ToDaCl" (today's close), and "Zscore" (Z-Score). These give a quick review of the last two days' pricing and the all-important Z-Score, which is the result of our analysis.
A list of promising stocks sorted by Z-Scores (NYSE stocks as of April 15, 2005)
Slowly click the Zscore title twice to sort and display the list by decreasing Z-Scores. You may click on any column heading to sort by the selected headings.
The Z-Score is derived from statistical analysis and relates to the statistical significance of a jump or drop in price. It reflects the degree in which the current price has gone beyond what would be expected if the price trend over the base (flat) period were to continue in the same directional path. A high Z-Score with a value greater than 2.00 would suggest that a news development had surprised the trading public, possibly creating an exceptional market-entry opportunity.
The higher the positive Z-Score, the greater the relative jump in price from yesterday to today (the last day on file). Markets with high Z-Scores may represent a good buying opportunity tomorrow morning. The reverse, while may well be true, has not been observed to the same degree. A sudden drop indicated by a high negative Z-Score might represent an exceptional selling opportunity, but it may indicate an over-reactive weakness, from which a rebound could quickly follow.
Depending upon your settings, MarketScanner might skim as few as one or two dozen emerging market opportunities each day. Performers with Z-Score values above four represent less than one-half of one percent of all markets. Our example was produced on April 15, 2005, just before this article underwent an updated revision. Why not type the symbols into UA to see for yourself how these high Z-Score stocks performed in the days that followed?
Before reviewing results, you'll want to first discard the rows that have insignificant Z-Scores: After clicking the Zscore heading to sort in descending order, click on the first stock in the list. Using the scroll bar at the right, move to the last stock whose value is over 2.0000. Hold down the shift key and click that stock. This should highlight all the stocks with Z-Scores over 2.0000. Click "Rows" at the top of the MarketScanner screen, and then click "Delete all but selected rows." You'll be left with only the most promising market opportunities.
You can view charts of the series listed in MarketScanner in the main charting window of your MarketScanner screen. The first market in your list of stocks with high Z-Scores will display in a 25-day chart as shown above. Scroll to the next chart by clicking the right "Portfolio" arrow below the chart.
The circled bar represents the last price available on the day the stock was uncovered by the Emerging Market study.
You will notice that the stocks with very high Z-Scores produce L-shaped results, where a long, flat base precedes a sharp jump in price, indicating an emerging market. Often, a breakout such as this precedes additional sessions of up-ticks in price. High volume is considered a corroborating piece of evidence that the market may be poised for further positive price action.
It may be helpful to compare the results of the Emerging Market study with the directional movement of the principal stock index for the given stock. For example, if the NASDAQ 100 goes up two percent and an OTC (NASDAQ) stock also goes up two percent, then the stock's movement is probably not significant.
The type of market movement this study reveals can be short lived, so prompt, decisive action is needed to capitalize on the information. Keep in mind that the given market being presented today may have broken out from its flat base one or more days before and may be continuing to move in the same direction. In this case, you might be too late to jump into the action! A graphic review of the Emerging Market results is crucial to avoid a late market entry. Always look to see when the breakout initially occurred. Also, check with your broker to make sure that the "breakout" is not actually a rare CSI error. Most important, be prepared to take your profits and get out quickly when this brief opportunity has run its course.
Click the [>>] (right arrow) button below the chart to view the next chart in the portfolio. Repeat as necessary to view all charts, making notes of those that look like possible trading opportunities for you. Be aware that these are not definitive trading signals. Instead, this list is a starting point for investigation into issues that may be good investments. Follow your own best judgment in applying additional studies, analyzing fundamentals, consulting your broker or doing whatever is prudent to further screen investments.
You may want to run this study multiple times, experimenting with different parameters. Consider the wisdom of perhaps setting your "How-Flat" parameter choice small (as low as 1) to reduce the chance that you will uncover markets that have previously emerged. You can also perform multiple sorts on the spreadsheet to further automate the screening process. For example, you could sort by closing prices and then eliminate high priced stocks from the pool before sorting by Z-Scores.
The Emerging Market study barely scratches the surface of the full capability of UA's MarketScanner tool. You can see the programming code of the Emerging Market study and others from the "Code Editor" screen by clicking the [More] button. Experienced programmers might incorporate a requirement that volume be high or net change meet a certain percentage, etc, etc. You are limited only by your imagination and programming skill. Although the Perl programming software provided with MarketScanner requires exacting syntax, it can help you find unlimited opportunities. We wish you good luck with this tool and encourage you to investigate the additional "trading tools" provided with Unfair Advantage.
Exporting to a Portfolio:
When you place this list into a UA portfolio, it will be easy to review all the charts and to follow their progress over the next few days. To do this, click "Export Table" at the top of the MarketScanner screen, and then click "Save to UA Portfolio." It may seem as if nothing has happened because the MarketScanner window might still fill your screen. If this is the case for you, exit MarketScanner by clicking the X-box at the upper right corner.
Now the Unfair Advantage "Choose Portfolio Format" window displays. Click the [New] button under "Portfolio" (at right) and then type "Zscores" in the "Name" box as prompted. Click [OK] to proceed. When the "Choose Portfolio Format" box re-displays, un-check any selected formats on the left and then click [OK]. UA will add the stocks to the selected portfolio.
For more discussion on this study, see the December, 2000 CSI Technical Journal, which is available on the CSI website at www.csidata.com