Monthly Article
Topics for July
PAGE 1

This Issue
July 2000
 

Various Topics
Page 1

Tech Talk
Page 2

Market Statistics 
Update &  IPO's
Page 3 


Notice:
  The views and information expressed in this document reflect the opinions and experience of the author Robert C. Pelletier.  Neither CSI nor the author undertake or intend to provide tax advice or trading advice in any market or endorse any outside individual or firm.  All recommendations are provided for their informational value only.  Readers should consult competent financial advisors or outside counsel before making any software purchase or investment decision.  CSI does not stand behind or endorse the products of any outside firms.


Copyright (c) 2000 Commodity Systems Inc. (CSI).  All rights are reserved.



 

Topics discussed in this month's journal.
 
Holiday Schedule
CSI Users Perform Custom Studies with UA's Stock ScannerT
Sample Programs In Perl
Government Survey Seeks Input on COT Data
 


Holiday Schedule

    CSI will be closed for voice communication on Tuesday, July 4th for the Independence Day holiday. U.S. exchanges will be closed, but data from other exchanges will be available at the usual time.
 



CSI Users Perform Custom Studies with UA's Stock ScannerT
 
    The results below were created in Stock Scanner's spreadsheet environment. We assembled a group of stocks and 1) ran a study named "Close" that offers the last closing price, 2) ran a study based upon Welles Wilder's RSI that shows the market's tendency to move one way or the other (values close to 100 mean hold long, values close to 0 mean hold short), and 3) ran a study named "BreakOut for channel of 6" which offers three results, namely "stop", "%Retrn," and #Trades." The "stop" column tells the price at which one should reverse (negative values mean sell stop), the "%Retrn" column shows the % return on investment earned over a 200-day period, and the "#Trades" column shows the number of reversals seen in the 200-day interval.

      Prospects are bright for market technicians. Ideas abound for trading approaches that just might prove profitable in the markets. Once an idea is formed, all that remains is to test it as a trading system and, hopefully, dodge the tax collector all the way to the bank. For some, coming up with great ideas is easy; the major hurdles lie somewhere between having the idea and banking the profits. Until now, it was difficult for non-programmers to justify the cost of hiring someone to write a study that might or might not prove profitable, and affordable pre-packaged trading systems that will accommodate custom studies were -- until now -- nowhere to be found.

    CSI has reached a significant milestone in the development of user-defined trading tools with the release of our updated Stock Scanner found within Unfair AdvantageŽ (UA). Now, instead of purchasing outrageously priced software from our competitors (that comes with "free" data of less than dubious value), CSI subscribers paying our modest data and licensing fees will receive both quality data and quality software that lets you write your own trading systems.

    As we illustrated in the February 2000 CSI Technical Journal, market screening through UA's Stock Scanner lets you review perhaps 28,000 stocks, funds and indices on a daily basis, helping you to filter out unsuitable picks and focus on more promising investments. The latest enhancement of the Stock Scanner lets you add your own custom algorithms to sort and filter stocks in the UA database. Very soon computed futures contracts will also be included in the inventory of available markets. You can act on your analysis results directly, or build a historical database for analysis with UA or third party software.

    Before printing the Stock Scanner table, we clicked on the "% Retrn" column title to force the best results to appear first. In this demonstration, GenStar Therapeutics appears to track well with a six-day breakout system, showing an overall profit of 1,615% (before commissions) in 15 trades. This study took about ten seconds to run through several thousand stocks for a period of about one year. Omega's Radar ScreenŽ took 15 minutes to look up symbols and load the data, and even more time to do the computations with a non-mainstream language. Speed, functionality and clean data make CSI's Stock Scanner a formidable choice. This powerful tool can view thousands of stocks in a very brief interval.

    There are many ways to add studies to the Stock Scanner. For simple expressions, you can just add a column, type the formula and/or expression and have it evaluated for a select universe of stocks. For complex studies, you save your study in the Stock Scanner library. You can create a simple bare-bones study where the expression is the title, or for advanced users, you can control the display of the indicator values, titles and formats used. It took us just a few seconds to implement the spread sheet matrix.

    When writing your own study, you'll need to select from among three modes of the Perl programming language and/or the Visual Basic language to concisely and quickly express your analytical trading method. Perl is an acronym known jokingly as a "Pathologically Eclectic Rubbish Lister," but whose true meaning is "Practical Extraction Report Language." In my brief exposure to the language, I have found it to be very explicit, very powerful, and reasonably easy to use.

    Perl was created by Larry Wall and is made available at no extra charge. Microsoft provides everything needed for programming with Basic, but you may need to install various components through executable files. The UA on-line manual available through the CSI website includes complete instructions for accessing all necessary programs, for receiving upgrades through the Web, and for inserting studies into the Stock Scanner spreadsheet environment.

    Users who already have programming experience will enjoy the quick speed of Perl - Fast Mode along with the intuitive reserved words like Open[0] and Close[0]. Unfortunately, debugging of your indicators must be done in a DOS-box. Beginning users will be much more comfortable using either Visual Basic Script or Perl - Debug Mode, as debugging can be done within the Stock Scanner. The Perl - Fast Mode generally runs about 5 times as fast as the other two which have very similar performance. You may want to begin in Perl - Debug Mode and then convert to Perl - Fast Mode, but the UA specific interfaces are not identical. I started with the Perl - Fast mode and had little trouble defining my simple study.

    The library of sample Perl programs provided with UA holds all of the code necessary to conduct several studies, including the breakout system and RSI used in the [above] demonstration. Each study evaluates a simple expression that will address all the stocks you have selected through the Stock Scanner module. At any time, you may expand upon the library by introducing another "sub" command. If you have identified the syntax properly within the Perl code, the study becomes viable and can be processed quickly for each time series (stock) given via your predefined list of stocks or markets. 

    Please refer to the online version of this Journal on the CSI website for an extensive sampling of analysis programs included in the Stock Scanner library. The RSI example is [included]. All of the sample programs were prepared to simply illustrate the power and capability of Perl. They should not be used as trading tools without sufficient testing and verification. We recommend you ultimately use UA's TSPE module for a complete pre-risk system certification evaluation.

    Customers willing to share their favorite trading tool with fellow CSI users may submit their math, algorithm or code for inclusion consideration in CSI's Edit Library that is delivered with the UA software. If you participate, please suggest an 8-character name and provide a brief description. Include a statement such as, "I hereby release any and all rights to the following material," and sign your name. Do not submit works for which a copyright is held by an individual or corporation.

    Many thanks to our customers who tried to use the Radar Screen program, which, when modified by Omega, could no longer read CSI data. These customers' insistence on finding a way to use CSI data for stock screening led to the production of this enhanced program. Kudos to CSI systems engineer Steven Davis who wrote the UA program, including the enhanced Stock Scanner code, and contributed to this article. To all our users, we hope your ideas will continue to be plentiful and, with the help of UA's new Stock Scanner, profitable as well.

Bob Pelletier
 

Current CSI subscribers will be able to upgrade to the new Stock Scanner (part of UA version 2.2.0) from the SUPPORT area of the CSI website at www.csidata.com.

There is no charge for downloading from the Web, but a minor disk and mailing fee will apply if a new CD is requested. Fully licensed users of UA do not pay maintenance fees. We are delighted to have you as a regular data user at rates beginning as low as $12 per month.



Sample Programs In Perl

    In order to maintain a high level of support for the CSI database and our software programs, the CSI staff is unavailable to assist with custom programming questions and problems. For specific guidelines and rules for programming in Perl, we recommend the following publications:

Elements of Programming With Perl by Andrew L. Johnson; Manning Publications Company; 32 Lafayette Place, Greenwich, CT 06830

Learning Perl by Randall Schwartz and Tom Christiansen; O'Reilly & Associates, Inc.; 101 Morris St., Sebastopol, CA 95472

All of the sample programs were prepared to illustrate the power and capability of Perl. They should not be used as trading tools without sufficient testing and verification. 
 

sub RSI {
  my($size)=@_;         #The @_ string transfers(14) into $size variable.
  my($au, $ad, $d, $i); #Identify the variables
  if($size<=0) {          #Look at period and set it to 14 if set improperly
         $size = 14 }
  $au = $ad = 0;           #initialize up and down days accumulators
  for($i=1;$i<=$size;$i++){ #Loop thru $size dys & add up/ dwn price differentials
    $d = $Close[$i-1]-$Close[$i];   #cmpte diff between  closes
    if($d<0)  {             #When a negative $d is a down day is observed,
      $ad = $ad -$d;      #accumulate the down differential ($d) into $ad
     }    else                  #When a positive or zero ($d) is observed,
     {    $au = $au +$d; }  #accumulate the up differential ($d) in2 $au.
  }                          # end of 'for' stmt.`$ad & $au rdy 4 prcsng RSI result:
    if($ad < 1e-6)   {     #when ad is less than 10**-6 (effectively 0)
    if($au < 1e-6)  {      #when both ad and au are  zero return indx of 50
      return 50;
        } else {
      return 100;                 #Come here when ad=0 & au non-zero
                     }
                     }
   return(100-100/(1+($au/$ad))); #Come here when au,ad  both positive.
}
 

For more information on Welles Wilder's RSI study, please see his book, "New Concepts in Technical Trading Systems." Greensboro, NC: Trend Research, 1978.
 



Government Survey Seeks Input on COT Data

Reprinted with permission from:
Bullish Review, Issue No. 279, Date: 05/22/00 

   The CFTC is considering a major change in [Commitment of Traders] reporting frequency and invites your comment.   It is likely the CFTC will move to weekly reporting, because, once they announce the possibility, the demand likely will be overwhelming. Since this will result in the loss of one of the two reports, we do not want to lose the "Futures Only" edition, which is the most reliable and longest data base available-back to 1983 in most cases. The "Futures + Options" edition has shown no added value since its inauguration in 1995 and the data, in our opinion, has been less reliable. We would prefer to keep the Friday release in order to give us more time to analyze the data for our Monday report. This will be especially true if we are forced to a weekly publication schedule, as seems likely. It is important that all subscribers make your wishes known to the CFTC. 


PAGE 1