|Computer programs and methods for analyzing stocks meeting user specified criteria are discussed in this paper. A new computer program was written in Perl and its use discussed. Some ideas to automate process of screening stocks are presented. Although this paper discusses computer programs, it is presented in a way that benefits both traders as well as computer experts who trade stocks. Although most methods are presented for Technical Analysis, some ideas are presented at the end for researching stocks using Fundamental Analysis.|
Traders and Investors research stock market data frequently to identify stocks meeting a set of criteria. The stocks so identified are potential investments. Some users make use of technical indicators (Technical Analysis) while others look at company fundamentals such as Book Value (Fundamental Analysis). Some users use both Fundamental and Technical Analysis methods. Lets not talk about those users who buy stocks without doing any research.
Some of the most commonly used Technical Analysis tools are: TC2007, MetaStock, TradeStation [1-3]. Some Fundamental Analysis is possible using TC2007 but most users refer to company information or tools such as MetaMarket Plus for Fundamental Analysis  or use online services at web sites such as ValueLine and ValueInvestorsClub [5,6].
This document assumes that:
Lets say, you worked hard to develop trading systems that best fit your style and back tested them with MetaStock Enhanced System Tester or some another method. Then most likely, you want to run explorations corresponding to your favorite trading systems periodically in the MetaStock Explorer tool. After your exploring the stock market is complete, you can look at the results report of each exploration you ran.
Some stocks meet more than one of your trading systems. That is, you will find some stocks in more than one exploration report. Wouldn't it be nice to find out which stocks met more than one of the selected trading systems and what those systems are?
Lets say, you select 10 explorations in MetaStock Explorer tool and run those explorations every time you want to research the stock market. It is not practical to print out reports of all ten explorations and manually track how many exploration reports does a particular stock shows up in.
If we can somehow automate the process of findng out which stocks show up in which exploration reports, it will save a lot of time and manual effort. Equis International, the company that makes MetaStock software program, also sells Developer Kit for software developers who can write add-on programs to automate as described above . I would like to show a simpler method using a Macro Recorder program instead of Developer Kit.
A macro recorder is an external program that records user's keyboard and mouse movement actions during a period set by user. In a layman's language, its like VCR that records sound and motion on Video Casette and then it can be replayed any number of times.
I recommend use of a Macro Recorder to record frequent tasks such as running MetaStock Downloader (to convert TC2007 EOD data to MetaStock EOD data), running Explorer tool in MetaStock or even to save/print selected exploration reports after running Explorer tool. Once a task is recorded, user can simply run that particular action (called macro) and leave the computer alone. The Macro Recorder will then replay it, i.e., trigger the keyboard and mouse events exactly as you typed but without your help.
There are a lot of Macro Recorder programs available on the Internet. However, most of them are just not upto the job. Some do not record certain keyboard events such Control key or SHIFT key and others dont record highlight or copy actions. Some record well but cannot replay at the recorded speed. Remember, it is important to replay very slowly or better yet, at the recorded speed. Otherwise, replay will be too fast for the computer to respond.
Automate and EZ Macros proved to be working flawlessly in the case of automating MetaStock related tasks [9-10]. Automate is unnecessarily bulky with a lot of features ordinary traders dont use. I recommend EZ Macros for automating MetaStock or TC2007 tasks. One feature about EZ Macros that I like is that you can make a self-executable program out of a single recorded macro. American Systems, creator of EZ Macros, also makes a free scheduler program called EZ Scheduler . This free program can be used to schedule various macros and run them at designated times automatically.
Launch MetaStock and then EZ Macros. Create a macro for, say, running MetaStock Explorer tool with a few explorations. After that, everytime you want to run Explorer tool:
Here are some tips for recording good macros:
There was a time when MetaStock macros were available for its DOS version, although those macros were for simple tasks such as switching between charts. I do not think there is a MetaStock macro feature with our Windows versions today that eliminates the need for an external Macro Recorder program such EZ Macros. Integrated portfolio management and macro features, if and when introduced in the future, definitely make MetaStock more powerful.
Now that we know the power of EZ Macros macro recorder, lets put it to use. First we have to install it. Then create a macro for something useful. We can create macros for running Explorer tool. We can also create another macro for saving reports of all explorations run in the Explorer tool. If we create a macro for saving exploration reports into text files, we can then save them for archiving or print them for reviewing. Or, we can somehow combine all the individual text files (created by saving the exploration results to different text files) into a single text file. To do that, we need a computer program. When we have such a computer program, we can obtain a single report file containing reports of all explorations run in the Explorer tool. We can process that single report file to find out, say, which stock shows up in which exploration reports.
Assume that we ran MetaStock explorer tool and saved all the exploration reports into various text files. Then my program, Murty's Scanner, can be used to combine all those text files into a single text file. Further, that single text file can be analyzed to generate an output file showing stocks and explorations seperately. Another output file with just stocks or stocks that repeated can be created. This text file can be directly fed to TC2007 for further analysis.
More detailed instructions on how to use my mscanner program are available on its release page at http://www.murty.net/mscanner/ . I will only list here sample uses of outputs generated by mscanner.
The mscanner program also creates a single text file called exp.txt containing reports of all selected explorations. This file can be printed and analyzed as well.
Investors and traders most likely use some sort of online stock screener at least once in a while. Stock screeners are screening programs that generate a list of stocks meeting the screening conditions. Some examples of online stock screeners are: Yahoo Finance Stock Screener, Multexinvestor stock screener, Smartmoney stock screener etc. [12-14]. In addition to stock screener, Yahoo Finance has a lot of features most investors find useful . Most of the online brokers also provide an online screener integrated into their trading website for their customers.
iOpus Internet Macros or other macro recorders for Internet Explorer can be used to automate the task of screening stocks using an online stock screener such as Yahoo Finance stock screener . If you are looking for offline stock screeners, one of the best ways is to use scanning feature in TC2007 program. TC2007 and MetaStock both have their own formula language to create various custom explorations (in the case of MetaStock, also known as trading systems) and Personal Criteria Formulas (in the case of TC2007, commonly known as PCF). There are several resources on the Internet documenting MetaStock explorations and TC2007 PCFs including some contributed by traders publicly. Two such resources, both very useful, are TradeOn (for TC2007) and K.A.L.O.S.Z Research (for MetaStock) [17,18]. If you are a computer expert, you can also make use of various Perl finance modules from Perl CPAN archive and create programs to automatically obtain stock screener results periodically .
Most screening conditions that can be set in online stock screeners such as Yahoo Finance stock screener are for Fundamental Analysis. If you are an experienced programmer, you can easily create a program to interface with Yahoo Finance stock screener and generate screener output automatically with a single click. But if you are not, macro recorder for Internet Explorer such iOpus is a good option. Although EZ Macros can be used for Internet Explorer based macros, I recommend a macro recorder specifically created for Internet macros, such as iOpus Internet Macros.
Here are some example tasks for Fundamental Analysis that can be automated and used periodically:
|Share Price||$1 Min||$10 Max|
|Average Volume||10k/day Min||Any Max|
|Market Capital||250 mil Min||Any Max|
|Dividend Yield||Any Min||Any Max|
|1 yr Performance||Any|
|Beta (Volatility)||0 Min||Any Max|
|SALES AND PROFITABILITY|
|Sales Revenue||1 bil Min||Any Max|
|Profit Margin||0% Min||Any Max|
|Price/Earnings (P/E)||0 Min||30 Max|
|Price/Book (P/B)||0 Min||5 Max|
|Price/Sales (P/S)||0 Min||5 Max|
|PEG||0 Min||1.0 Max|
|Est 1 yr EPS Growth||Any|
|Est 5 yr EPSGrowth||Any|
|RESULTS DISPLAY SETTING|
|Display info for||Actively Screened Data|
Use of Perl with CGI and other perl modules, including Yahoo Finance related perl modules from CPAN archive, is recommended for quickly developing a utility to automate complicated tasks. UNIX/Linux operating system is a good choice for quickly developing scripts to achieve above tasks, for example, by using lynx, bash scripting and mySQL database software for storing historical values [20,21,22].
Both Technical Analysis and Fundamental Analysis can be automated with the help of simple perl scripts and in most cases, macro recorder programs or internet macro recorder programs. Murty's Scanner can be used to better analyze multiple reports of explorations run in MetaStock Explorer tool. Online stock screeners such as Yahoo Finance stock screener can be automated using Internet macro recorders such as iOpus Internet Macros. External Perl programs can be written to search for stocks meeting various fundamental analysis criteria.
|1||MetaStock software made by Equis International. Official web site: http://www.metastock.com/|
|2||TC2007 software made by Worden Brothers. Official web site: http://www.worden.com/|
|3||Tradestation software made by Tradestation Securities. Official web site: http://www.tradestation.com/|
|4||MetaMarket Plus software made by Paritech. Product web site: http://www.paritech.com/us/products/software/metamarket.asp|
|5||ValueLine Investment Survey and other products from ValueLine, Inc. Official website: http://www.valueline.com/|
|6||Value Investors Club is located at http://www.valueinvestorsclub.com/|
|7||Investopedia is a finance education portal located at http://www.investopedia.com/|
|8||MetaStock Developer's Kit by Equis International, Inc. Product location: http://www.equis.com/Partners/Developers.aspx|
|9||Automate software made by Unisyn software. Official web site: http://www.unisyn.com/|
|10||EZ Macros software made by American Systems. Official web site: http://www.ezmacros.com/. EZ Scheduler, a free scheduling program by American Systems, is also available on the same web site.|
|11||Murty's Scanner developed by Murty Rompalli. Official web site: http://www.murty.net/mscanner/|
|12||Yahoo Finance Stock Screener is located at http://screen.yahoo.com/stocks.html|
|13||Multex Investor is a finance portal by Multex. Web site location: http://www.multexinvestor.com/|
|14||Smartmoney Stock Screener is part of premium service by SmartMoney. Official web site: http://www.smartmoneyselect.com/|
|15||Yahoo Finance is a Finance portal by Yahoo. Web site location: http://finance.yahoo.com/|
|16||iOpus Internet Macros software made by iOpus, Inc. Web site location: http://www.iopus.com/iim.htm|
|17||TC2007 PCFs and other useful information for TC2007 users by TradeOn. Official web site: http://www.tradeon.com/|
|18||MetaStock formulas and other useful information for MetaStock users by K.A.L.O.S.Z Research. Official web site: http://trader.online.pl/.|
|19||CPAN is Comprehensive Perl Archive Network. Official web iste: http://www.cpan.org/. Search for keyword "finance" from the list of all modules on CPAN web site.|
|20||Lynx is a text based web browser for UNIX and Linux operating systems. Official web site: http://lynx.browser.org/|
|21||mySQL database software made by MySQL AB. Official web site: http://www.mysql.com/|
|22||Several public domain utilities contributed by users around the world are available for UNIX/Linux operating system at Freshmeat web site maintained by Open Source Development Network. Go to official web site at http://www.freshmeat.net/ and search projects with keywords: stocks, finance, yahoo|
Securities investments carry significant risks. Please contact your broker or financial advisor for more information.
|© Murty Rompalli (My GPG Keys)||All Rights Reserved|