Understanding the Perl language

advertisement
December 2001 CSI Technical Journal
Volume XIX, Number 12
Holiday Schedule
CSI will be closed for voice communication on Tuesday, December 25 and Tuesday, January 1
for the Christmas and New Year’s holidays, respectively. The CSI host computer will be
accessible throughout both holidays and data will be available for any market that remains open
on these days. All of us at CSI extend our best wishes for the season and the coming new year.
###
Thirty Months of CSI Technical Journals
We say goodbye to 2001 with a look back at the last 30 months through the CSI Technical
Journal. This index reminds us of where we have been and what we have learned in the recent
past. It inspires us to begin a new year with ever-advancing technology and progress, always
aimed at enhancing the CSI experience of our customers. This is just a brief history, as we have
published the CSI Technical Journal monthly since 1978. To find the full text for most of these
journals, go to the csidata.com website.
June 1999
Reviewing Market Opportunities with Perpetual Contract® Data
In June we were about to mark the 30th anniversary of CSI's most enduring and successful
product, Perpetual Contract data (a protected registered trademark of CSI). This article reviews
the flexible Perpetual Contract data formulation and looks at the debate over blending away the
gap between old and new contracts.
Tech Talk Topics: Using Unfair Advantage data with third-party analysis programs; back-filling
a second database after installation; compatibility with MetaStock; explanation of the caret (^)
figure in price fields; upgrading UA and a "Tip of the Month."
July 1999
The MultiMarket Analyzer:™ Stretching, Unstretching and Leading the Way!
This article describes and explains Unfair Advantage's® MultiMarket Analyzer (MMA). This
module features three distinct indicators, the Davis Stretch Index, which "stretches" data in
search of misalignment, the Davis Unstretched Indicator, which shows expected price levels and
the Davis Market Leadership Index, which tells which markets tend to provide directional
leadership for the others.
Tech Talk Topics: Clarifying the roll-forward date in computed contracts; raising negative
values in back-adjusted series; upgrading Unfair Advantage from the CSI website; restoring a
previous (non-test) version of Unfair Advantage and backing up your UA portfolio. Tech Talk
includes a notice that the API demonstration package has been enhanced, and can be downloaded
from the website.
August 1999
Capturing Intermarket Trading Opportunities
The first paragraph of this article states that the underlying purpose of the CSI Technical Journal
is to alert customers to the many salient features of CSI's market data services in ways that might
help the user make more effective trading decisions. The remainder of the newsletter fulfills that
purpose by defending Perpetual Contract data and then moving on to ways that the MultiMarket
analyzer can help investors.
Tech Talk Topics: Charting cash prices with Unfair Advantage; handling the change of the tick
size of some 10-Yr. Treasury Notes; restoring full precision following a UA upgrade and
incompatible modems.
September 1999
The Impact and Influence of the Federal Reserve System on the U.S. Economy - 1999
This is an updated version of an essay that appeared in the August 1996 issue.
Tech Talk Topics: Using UA’s "artificial high/low" option for data presentation; CSI's policies
regarding trading advice; explanation of what goes in the monthly "Error Report" and
overwriting the "update.adm" file.
October 1999
Why Clean Data is a Mandatory Pre-Analysis Step
This article revels in Futures Magazine’s September ’99 issue, which featured a cover story
about the accuracy of end-of-day data providers for investors. CSI finished on top! The many
factors that contributed to CSI’s impressive performance are discussed here.
Tech Talk Topics: Error in Alerts Calendar and plans for enhanced UA charting.
November 1999
Revisiting CSI’s Trading System Performance EvaluatorTM
This is a review of TSPE's objective, methodology and technique. It explores issues such as
developer bias, trade independence, appropriate sample size and TSPE applications. Multiple
graphics are included. A second article details how to use CSI data with RadarScreen™ and a
third explains preparations for 6% T. Bonds and Notes. No Tech Talk.
December 1999
Beyond 2000i and Trading System Certification
This article discusses the non-competitive relationship between CSI and Omega Research, as
Omega's private label database provided free with their software is not in the same league as the
CSI database. The article compares and contrasts many CSI services with those of Omega.
Tech Talk Topics: Preparation for the year 2000; using QuickTrieve® v. 4.07F after Y2K and
using software with a two-digit date format after December 31st.
January 2000
Studying the Anatomy and the Dangers of TradeStation®
Here is an attempt to unravel the mysteries of TradeStation with particular attention to the
"Strategy Performance" report. The final assessment advises caution and wariness: "Buyer
beware. There is no free lunch." A second article, called "Unfair Advantage® for the 21st
Century" outlines the software's current capabilities.
Tech Talk Topics: Maintaining compatibility with third-party analysis programs when upgrading
Unfair Advantage; changing the size of UA's charting window; using CSI data with an
alternative database format; CSI's seamless transition into Y2K and how to get current marketing
information.
February2000
Screening Equities with Unfair Advantage's® Stock Scanner™
The lead article explains the steps necessary to screen perhaps 25,000 stocks. Another article
discusses Trading System Performance Evaluator's goal selection and chart interpretation. The
Journal finishes with a review of Delta Society software and a Y2K compliance status report.
Tech Talk Topics: Using QuickTrieve with third-party software that is notY2K compliant; using
TraDe$k past the new year; adding options to UA; understanding the CSI Data Retrieval
Agreement ("personal and private" explained).
March 2000
Advice for Business Partners
This Journal begins with a tongue-in-cheek poem called "Advice For Business Partners," and
goes on to discuss how certain competitors have teamed up with partners, only to launch a
business that directly competes with the partner. The article explains that CSI, as an independent
data vendor, has no alliances that may cause conflicts of interest that may not be in the best
interest of our customers. A summary of CSI's data services is included, as is a review of
Formula Research.
Tech Tip Topic: Steps to speed data distribution with Unfair Advantage.
April 2000
Breaking Out of the Mold for Better Trading
This month's discussion focuses on a tried and true model for market analysis - the breakout
system, and the necessity of accurate data to feed it. Sheldon Knight's "How Clean Is Your Data"
article in the September '99 Futures Magazine is extensively referenced. The newsletter also
passes along a customer's comments about a competitor's "Unfair Burdens," and provides notice
of a price change for the UA World Futures Database. Additional articles explain charting
thousands of stocks with UA's Stock Scanner and invite users to subscribe to our e-billing
service.
Tech Talk Topics: Use of the monthly Error Report; finding features from UA's former "View"
menu; CSI's record for data accuracy and using CSI data with TradeStation. An update on
supported formats is also provided.
May 2000
The Quick Route to UA Charting (A Navigational Guide)
This article introduces the newest version of Unfair Advantage, which has a somewhat different
look and feel from earlier versions. The extensive tutorial guides users through the process of
creating a portfolio and charting data using UA's new interface. This newsletter also mentions
CSI's position as #1 on the google.com search result list for "commodity data," and announces
the addition of Commitments of Traders (COT) data to the CSI database. QuickTrieve users are
advised through an additional article that the "File Adjust" feature is no longer needed.
Tech Talk Topics: Possible solutions to problems with writing data files; discerning between
current-day and lag-day cash prices; correcting Windows NT® "crashes;" maintaining separate
databases with UA data and mutual fund adjustments. A notice informs users of the information
requested when reporting possible software errors.
June 2000
Low Margins and Improved Tools Fuel Futures Speculation
Here we touch on some of the most important issues involving data and futures market analysis.
These include the pitfalls of examining a market with skimpy data reserves; the pros and cons of
various computed contracts; the value of volume and open interest; the use of detrending; and the
important step of system evaluation and certification with Trading System Performance
Evaluator (TSPE). This newsletter also introduces the idea of becoming a CSI business associate
and earning referral fees, and includes a review of VantagePoint analysis software.
Tech Talk Topics: Viewing Commitments of Traders data with UA; selecting the roll-forward
date for nearest future contracts and the UA v. 2.12 upgrade, which appends proportionally
adjusted stock files instead of rebuilding them.
July 2000
CSI Users Perform Custom Studies with UA's Stock Scanner™
This is a description of the process of using UA's Stock Scanner to apply custom studies to
thousands of stocks using VisualBasic or Perl.™ Sample Perl language programming code is
provided. A recommended reading list is also included, as is a government survey seeking input
on COT data (reprinted from the Bullish Review).
Tech Talk Topics: UA's new currency converter; download instructions for UA version 2.1.3;
minimizing redundant data formats to speed distribution; data access times and speed of
transmission; correcting a problem with COT data and a correction to last month's Q&A about
COT Index data.
August 2000
Optimization, Verification, Certification and other Perils
This article provides the CSI customer with information to help with the planning and execution
of a careful trading plan. It discusses the importance of the trader's algorithm and the
development of custom studies. Certification and verification of results with TSPE are
recommended. This newsletter includes a message from UA developer Steven Davis advising
customers of the need to upgrade to UA v 1.74 before August 23rd, as this version supports a
new data type that is necessary to provide an increasingly comprehensive list of services. Also
included is a reminder about the CFTC's COT survey.
Tech Talk Topics: Upgrading the UA online manual to receive the table of contents; displaying
non-truncated values for markets that are typically truncated; separating data into folders sorted
by format using multiple portfolios; launching a third-party analysis program automatically;
selecting markets from a list; dismissing the "Tips" list; keeping trading records with CSI's
upcoming Trader's Accountant™ and selecting computed contracts.
September 2000
In Search of a Sure Thing
Here we question the existence of a "sure thing" in the financial markets, and discusses ways that
UA's Trading System Performance Evaluator helps weed out trading systems that are likely to
result in failure.
Tech Talk Topics: Decimalization of the US stock markets and its effect on CSI data files;
finding the Alerts Calendar in the current UA; explanation of the new Moving Average
Convergence/Divergence (MAC/D) study; speeding the Stock Scanner process and UA's
"Display in Currency" feature.
October 2000
Defining The Trading Day on U.S. Security Exchanges
This is a review of exchange policies that have led to inconsistencies and delays in posting
market data. It also reports the good news that the NYSE has introduced a new rule that will
eliminate these problems. Small-lot, after-hours trades will no longer distort prices.
Tech Talk Topics: The CFTC's survey about Commitments of Traders (COT) data; adding
indices to a UA portfolio and creating the largest possible charts with UA.
November 2000
TSPE Tutorial
This article is a walk-through example of how to use TSPE to obtain a comprehensive analysis of
your favorite trading system. It includes information on entering the required data, selecting the
contract multiplier, choosing commission, adjusting for sample size and parameter count,
choosing a goal, understanding probabilities and interpreting results.
Tech Talk Topics: The upcoming change in Stock Scanner to accommodate commodities; using
UA to explore stocks by industries and sectors and UA's "update.adm" file, which addresses
changes and adjustments.
December 2000
Detecting Emerging Market Opportunities in Stocks and Futures With MarketScanner™
Reintroducing UA's Stock Scanner as "MarketScanner," a powerful, versatile screening and
scanning tool that is no longer limited to just stocks and indices. The article includes an example
of a new study called Emerging Markets (EmergMkt) that has been developed for experimental
purposes in Unfair Advantage v. 2.2.2.
Tech Talk Topics: Expanding MarketScanner's sample library; the CSI website's Current Posting
Status screen; the negative prospects for running UA on an old, underpowered computer and
incompatibility with WebTV.®
January 2001
Adding the Perl™ Language to Your Set of Programming Tools
Explore the pros and cons of using Perl for market analysis within Unfair Advantage's
MarketScanner. It includes a basic description of Perl's symbol operators and use of variables, as
well as a brief tutorial and "Perl Tips."
Tech Talk Topics: News headlines; download speed; holidays in ASCII files; and diagnosing
and correcting gaps in the UA database
February 2001
Engaging Unfair Advantage’s MarketScanner to Find Solid Trading Opportunities
This article describes the experience of using MarketScanner in developing an emerging market
study and contrasts it to similar attempts with Omega’s Radar Screen™ and TC-2000.™ It
finishes with a list of additional "Perl Tips" for programmers.
Tech Talk Topics: Decimalization of U.S. stocks and help with the interpretation of CSI’s
commodity data.
March 2001
A User’s Guide to Unfair Advantage v. 2.3
Here we unveil the vast array of enhancements and new features in the latest upgrade of Unfair
Advantage. The most significant changes are in the portfolio manager that supports multiple
portfolios, and in the charting module, which offers enhanced scaling options and the ability to
chart custom studies. This journal has no Tech Talk, but includes a summary of UA's economic
database.
April 2001
A Comparison: Futures vs. Stocks in a Volatile Market
This article addresses the stock market's inherent tendency to punish all or nearly all investors in
a down market. It explores the use of the futures markets for viable investment alternatives in
uncertain times.
Tech Talk Topics: Missing days in overseas price series; correcting an error in UA v 2.3.1; new
symbols for preferred stocks; decimalization of U.S. stock markets; developing a trading record
for CSI's Trading System Performance Evaluator; identifying raw contracts to chart with UA and
data presentation alternatives on UA charts.
May 2001
Stock Futures: Investing with a 21st Century Twist
The concept of "single stock futures," which will soon be available at U.S. markets and which
will be supported by UA is introduced. This Journal includes an announcement that CSI has
engaged several new sources of exchange data, adding additional redundancy to further enhance
data accuracy and expediency.
Tech Talk Topics: Using UA's "History Refresh" to correct a "range check error;" the
QuickTrieve format enhancement that allows for higher values through ".DT2" files; data
precision for penny stocks quoted in decimals; the relationship between Perpetual Contract data
prices and actual futures prices (relating to an unexpected jump in platinum prices); rollover
dates for nearest-future contracts; the UA\UAPI directory with sample programming code for
Perl, C++, Visual C, Delphi and Builder3; decimalization of the U.S. stock markets and
improved data release times.
June 2001
Unfair Advantage Outpaces the Rest
Here is an overview of the many enhancements to Unfair Advantage in the preceding 18 months.
Areas of improvement discussed include charting, analytical studies, multiple portfolios,
database enhancements and enhanced customer support through the CSI website and information
systems within the software. The newsletter includes an important notice that UA v 2.1. and
earlier version will no longer be compatible with future upgrades, and will be replaced by CSI.
Tech Talk Topics: The addition of new Dow Jones IndexesSM to the database; viewing those
indexes through UA; possible benefits of the Dow Jones Indexes; price discrepancies with
newspaper prices and changes in analysis results after upgrading (London Potatoes and NYMEX
Natural Gas). Delta Graphics users are encouraged to upgrade to UA v. 2.3.5 for important new
features.
The Dow Jones IndexesSM are compiled, calculated and distributed by Dow Jones & Company,
Inc. and have been licensed for use. All content of the Dow Jones IndexesSM © Dow Jones &
Company, Inc.
July 2001
Computed Contracts Get Real
This article ponders the question of how market data should be treated to best replicate and
simulate the "real" trading environment. Computed contracts are discussed, as are the effects of
liquidity and volatility.
Tech Talk Topics: Setting colors for charting indicators; troubleshooting with the online manual
and multitasking while UA is downloading data from CSI.
August 2001
CSI’s Formula For Data Perfection
This Technical Journal provides a historical overview of the CSI database, from its humble
beginnings to its emergence as a world leader in providing complete, accurate market data to
individual investors and corporate customers. General information on data sources and internal
data processing are provided. Additional articles comment on CSI's right to claim a copyright for
the data we provide and about the SGX-DT (Singapore) exchange's request for exchange fees.
Tech Talk Topics: Correcting the "Program Not Found" error after changing browsers; UA's
new "Scale By Visible Data Only" option; arranging for automatic data downloads through
Windows' Task Scheduler and CSI's handling of exchange fees.
September 2001
Using Options to Take the Sting Out of a Down Market
This article presents examples of option strategies that might be used to help preserve and
enhance investment capital. It includes a disclaimer notice about the risks involved in trading
options.
Tech Talk Topics: Printing the UA factsheets from the CSI website; adding a grid to charts;
using UA to view daily data, even when custom programs focus on weekly series; and viewing
and printing CSI's Alerts Calendar from outside of UA.
October 2001
Pearl Harbor Revisited
Inspired by the terrorist attacks on September 11th, this article reflects upon December 7, 1941,
"another dark day for Americans," and the financial climate that followed. It includes charts of
the Dow Jones Industrial Average from the 1930s through the 1960s. Additional articles include
condolences to those affected by the 9/11 tragedy and a compatible software profile: Elliottician
(Makers of Elliott Wave Analyzer).
Tech Talk Topics: Database corruption caused by content-altering software such as "Cybersitter"
or IE's "Content Advisor;" volume and open interest postings; custom programming assistance
and information on "CD required" upgrades.
November 2001
Examining Seasonal Tendencies To Uncover Clues in Historical Data Reserves
This article explores trading seasonal commodities as a viable alternative to the everybody-winsor-everybody-loses stock market during these uncertain times. It demonstrates how CSI's
Seasonal Index can help and includes a disclaimer about the risks associated with trading
commodities.
Tech Talk Topics: The elimination of ActiveState screens when installing UA; the effects of the
9/11 tragedy on data files; handling of the data gap for markets closed 9/11 - 9/14; charting of
out-of-range settlements and the CME's settlement policy (relating to the Columbus Day
holiday).
###
Tech Talk
Each month in this column, the Technical Support Staff addresses topics of interest to many CSI
subscribers. This month they discuss using Unfair Advantage with Windows XP, UA's
consumption of disk space and the lengthy downloads caused by the transmission of earnings
data.
Q. Does Unfair Advantage run on Windows XP®?
A. We have tested it here at our office and have had no problems. It looks like they are fully
compatible. The startup routine is a little different for the XP version as described here:
To launch UA with Windows XP, click the "Start" button, and then click "All Programs." Scroll
through the list to "CSI Unfair Advantage." Move to the "Launch UA" entry and click. The
program will start normally. After several UA uses, "CSI Unfair Advantage" will be added to the
list of favorite programs that displays immediately when you click the "Start" button.
Q. My hard drive ran out of space. Did UA cause this?
A. UA was, no doubt, a contributing factor, but could not have been the sole cause. The massive
UA database takes a fair amount of room, but not enough to fill a hard drive. The full stock
database consumes 300MB, the commodity database consumes 80MB and the software itself
takes up about 50MB. This degree of hard drive consumption is not normally a problem on well
equipped computer systems, with storage space typically measured in multiple gigabytes.
It is possible that redundant copies of UA could be taking up unnecessary space on your drive. If
you make a backup copy of UA before upgrading (as recommended), you might want to delete
the backup once you know the upgrade is functional. There is no benefit in keeping older
generations of the software or in keeping outdated copies of the database, so they should also be
deleted.
Storing old copies of UA (and other programs) in your "Recycle Bin" can also waste disk space.
To find out what's in your Recycle Bin, right-click the "Start" button and then click "Explore."
Scroll down to "Recycle Bin" (usually near the bottom of the list) and double-click it. Navigate
through the entries in search of "UA" folders. If you find any, you can either delete them
individually or click "Empty Recycle Bin" on the File menu to remove everything in the
directory.
One customer suggested that UA was the cause of his computer's lack of operational response,
forcing him to take his computer to a repair shop. The technician determined that the hard drive
was nearly full, so he deleted the "restore" directory, including the backup copy of the operating
system held there. Doing so freed up several gigabytes of disk space, a quantity that dwarfed the
space used by UA (far less than one gigabyte). Several manufacturers include the "System
Restore" option in their computers and in all cases, the resulting "restore" (or equivalent)
directory can consume a very significant portion of the hard drive. Deleting the "restore"
directory has the drawback of disabling the recovery feature.
Q. UA ordinarily updates my data in a few minutes each day, but there were a couple of days
last month when the download was really slow. Why is that?
A. On two consecutive days in October, CSI launched a new capability for stock traders that
enabled traders to focus upon the price/earnings ratio for about 9,000 stocks. On those two days,
company earnings were transmitted to the database held on each customer's computer. This,
regrettably, was a lengthy process that significantly slowed the overall daily distribution time for
most customers. We regret this one-time inconvenience, but it was necessary to provide our
customers with price/earnings ratios for selected stocks on a daily basis. Daily updates to these
data files will be handled more quickly as reported earnings fluctuate for various financial
entities.
Find the new Price/Earnings information on UA's "Factsheet about Markets" screen (formerly
called the "Factsheets"). This feature is part of versions 2.4.3 and higher. If you don't already
have version 2.4.3, you can order it by e-mail or by calling customer support. See page 10 for
pricing information on this CD-only upgrade.
###
E-mail billing, complete with an electronic version of the CSI Technical Journal is available
upon request. Sign up by sending an e-mail note to bookkeeping@csidata.com.
###
Download