SPECIFICATION OF ASCII FILE FORMAT-HISTORICAL DATA SM3.02 PAGE 1 OF 8 The data to be "imported" must be in ASCII (say "askee") format, because this is a universal format which can be understood by most communica- tions, spreadsheet and database programs. ASCII is a standard which describes the bit patterns used for computer storage of individual let- ters, digits, puncutation and other special characters. For example the capital letter "A" has the bit pattern 01000001. Most personal compu- ters can recognize ASCII. Textual information, such as what you are reading now, is usually stored in ASCII format. Numbers must be in a binary format before they can be used in calcula- tions by a computer. The Stock Charting System stores volume, prices, dates and other information in a binary format. Therefore, numbers in ASCII must be "translated" to binary before they are can be used in calculations. This program looks for and processes only those individual lines in the ASCII input file which contain valid data. Any lines which contain col- umn headings, explanatory information, advertising, communications pro- tocol and other things will be ignored. SPECIFICATION OF ASCII FILE FORMAT FOR HISTORICAL DATA PAGE 2 OF 8 WARNING: for the IMPORT function, you must have a SEPARATE file for EACH stock for which HISTORICAL price data is to be "imported". This differs from importing CURRENT data, where you use only one ASCII file. All data in the ASCII input file MUST pertain to the SAME stock. There is no provision to "import" historical information for many dates for many stocks all at once - historical data for only one stock can be im- ported at a time. To "import" data for many stocks for just the CURRENT date, invoke the (W) or (D) function from the Master Menu screen. The lines in the ASCII input file can be in any order. You can "import" into either a daily- or weekly-updated file. The process will not over- write existing data and will not fill in empty "gaps" where data is mis- sing. It will automatically add new dates to the file as required, and can be used to fill in a file that has just been initialized from the Stock Select screen. SPECIFICATION OF ASCII FILE FORMAT FOR HISTORICAL DATA PAGE 3 OF 8 The program scans each individual line from left to right and looks for valid data items. These include the date, volume and high, low and closing prices. If the required data items are found they are converted to binary format. The date must be present and must match a previously computed date on the price history file. Number values are checked for "reasonableness" and for proper relationship, for example high or ask >= closing price >= low or bid. (The >= symbol means "greater than or equal to".) Any error will cause that line to be discarded. Data items must be separated by blank spaces or other non-numeric charac- ters. Either fractional or decimal values are acceptable. Fractions must be separated from their corresponding whole numbers by one and only one blank space. The program will ignore characters such as * to indicate ex-dividend. It will also ignore any quote marks or commas that may be used to separ- ate data items. Thus, it will accept data in the CSV (comma-separated value) format used by some database programs. It is the responsibility of the user, in the process of using the external communications or other program, to make sure the required data items are available. SPECIFICATION OF ASCII FILE FORMAT FOR HISTORICAL DATA PAGE 4 OF 8 Here are some examples of acceptable data arranged by trading period date, high, low, close and volume: 01/29/88 *120 109 3/4 110 1/2 110375 (* ignored) "01/29/88",15.25,14,14.875,56259 (CSV format) 01-29-88 31.125 29 30.5 4075 (either - or / in date is OK) For the above data format, you would type MABCV to specify the order in which these data items appear. The program will ask you to specify the sequence in which data items appear in the file you are "importing" into the Stock Charting System. This sequence may vary, depending on what source the data comes from. The required data items must be in the same sequence on each line on which they appear. SPECIFICATION OF ASCII FILE FORMAT FOR HISTORICAL DATA PAGE 5 OF 8 Each required data item is identified by a letter of the alphabet, such as A for ask or high, B for bid or low, etc. The sequence in which data items appear in the input is specified by typing those letters in a cor- responding sequence, for example MABCV for date-high-low-close-volume. If you don't know the sequence, you can find out from the documentation for the program that created the file, or by visual inspection after displaying the file on the screen or printer. Usually a program that creates a file can also display it. Note there are several different allowable date formats. Use M for a date in mm/dd/yy or mm-dd-yy format (generally used in the USA). Use D for a date in dd/mm/yy or dd-mm-yy format; or use Y for a date in yy/mm/dd or yy-mm-dd format. The program will also accept dates without punctuation or with 4-digit years, for example 112588 or 19881125. Dates without punctuation must be exactly six or exactly eight digits long. SPECIFICATION OF ASCII FILE FORMAT FOR HISTORICAL DATA PAGE 6 OF 8 To skip over a data item you don't want to use, type the letter "R" if it is a stock price (ask/bid/last/open/etc.); otherwise type the letter "S". In general you can use "S" to skip any data item, UNLESS it may contain a number with a fractional value such as 2 11/16. "S" skips anything delimited by spaces or double quotes, so it won't work with fractions. That's why you have to use "R" to consistently skip over numeric values that may contain fractions. Either "R" or "S" will work with whole numbers and decimal values. For example, when receiving historical quotes from Dow Jones Information Services, the data items are in date-high-low-close-volume order. There- fore, if you want only the date and closing price, type the letters MRRC to specify the data item order. Note in this case you do not have to specify the volume if you don't want; the program will ignore it. Use S instead of R to skip a field such as the time of day or a date. Use V for volume in hundreds (the normal case). Otherwise use U. Which one to use can be determined by inspection of the data. U means volume in UNITS of 1. SPECIFICATION OF ASCII FILE FORMAT FOR HISTORICAL DATA PAGE 7 OF 8 Not all of the aforementioned data items must be present. The program can use the trading period date and the current volume, high, low and close. However the only items that absolutely must be available on each line are the date and either the current closing price (or net asset value) or the ask and bid prices. If the ask and bid prices are pres- ent, but not the closing price, the closing price is set to the bid price. If only the closing price is present, the high and low are set equal to the close. After the "translation" process is finished, you are automatically returned to the Data Entry screen. The file should be inspected to make sure the imported data got through. In addition you must manually enter holidays into daily-updated files, by selecting the appropriate dates and typing E and then Y. Any dates without data filled in and not marked as holidays will interrupt moving average calculations. The program does not indicate errors in the incoming data during the translation process; invalid data is simply ignored. Errors will become apparent as you inspect the data - where errors were found, the data will be missing from the price history file. SPECIFICATION OF ASCII FILE FORMAT FOR HISTORICAL DATA PAGE 8 OF 8 If you got most of the data but a few lines are missing, the problem could be "glitches" on the telephone line (when receiving data through a modem). This could cause some "garbage" to get into the incoming data, or perhaps a few individual characters could have gotten lost. You may be able to use a text editor or word processor to edit the ASCII file and correct the problem. Or, you could get the missing data from an old newspaper, or try to download the data again using your communications program. If you didn't get any data at all, or you got only one or two lines, the most likely cause is that the data items are not in the same order you specified. You should visually inspect both the incoming ASCII data and the resulting Stock Charting System data to make sure everything is reasonable and hopefully correct.