smtm - Display and update a ticker of global stock quotes
smtm [options] [stock_symbol ...]
--time min minutes to wait before update --file smtmrc to store/retrieve stocks selected --proxy pr network address and port of firewall proxy --fwall [id:pw] account and password for firewall --chart len select length of data interval shown in chart (must be one of 1, w, 3, 1 or 5) --wide also display value changes and holdings --retsort sort display by daily return, not name --help print a short help message
smtm, which is a not overly clever acronym for Show Me The Money, is a simple stock ticker application for quotes from exchanges around the world (as long as they are carried on Yahoo!, that is). It creates and automatically updates a window with stock quotes from Yahoo! Finance. When called with one or several stock symbols, it displays these selected stocks, and also record the symbols for later use. When smtm is called without arguments, it reads the symbols tickers from a file. This file can be created explicitly by calling the Save option from the File menu, or implicitly whenever smtm is called with one or more symbols.
smtm can also aggregate the change in value for both individual positions and the the entire portfolio. For this, the number of shares is needed, as well as the cross-currency expression pair. The standard ISO notation is used. As an example, GBPUSD translates from Pounds into US Dollars.
smtm display the full name of the company, the price change and the percentage change. Losers are flagged in red. smtm can be used for North American equities, as well as European ones. It should work for other markets supported by Yahoo. Due to the limited amount of information provided by Yahoo! for the non-North American quotes, only the symbol (but not the company name) is shown. However, a name can also be given by the user (see below).
The quotes are delayed, typically 15 minutes for NASDAQ and 20 minutes otherwise, see http://finance.yahoo.com for details.
smtm supports both simple proxy firewalls (via the --proxy option) and full-blown firewalls with account and password authorization (via the --fwall option). Firewall account name and password can be specified as command line arguments after --fwall, or else in a pop-up window. This setup has been in a few different environments.
smtm can display two more views of a share position. Clicking mouse button 1 launches a detailed view with price, date, change, volume, bid, ask, high, low, year range, price/earnings, dividend, dividend yield and market capital information. However, not all of that information is available at all North American exchange, and Yahoo! UK only provides a subset. Clicking the right mouse button display a chart of the corresponding stock. The type of chart can be specified either on the command-line, or via the Chart menu. Choices are intraday, five day, three months, one year, two year or five year. The default chart is five day chart.
smtm has been written and tested under Linux. It also runs under that other OS from the Seattle company using the perl implementation from http://www.activestate.com. In either case, it requires the Tk module for windowing, and the LWP module (also known as libwww-perl) for data retrieval over the web.
smtm --file ~/.telcos "BT.A.L:BR TELECOM:10:GBPCAD" \ T::10:USDCAD \ BCE.TO::10 \ "13330.PA:FR TELECOM:10:EURCAD" \ "555700.F:DT TELECOM:10:EURCAD"
creates a window with prices for a handful of telecom companies on stock exchanges in London, New York, Toronto, Paris and Frankfurt. The selection will also be stored in a file ~/.telcos. Note how names are specified for the European stocks (to overcome the fact that Yahoo! UK does not return a name). Also determined are the number of shares, here 10 for each of the companies. Lastly, this example assumes a Canadian perspective: returns are converted from British pounds, US dollars and Euros into Canadian dollars. Quotation marks have to be used to prevent the shell from splitting the arguments containing spaces.
Five menus are supported: File, Edit, Charts, Update and Help. The File menu offers to load or save to the default file, as well as the values of the currently chosen options. The Edit menu can launch windows to either add new stocks (one or several if separated by semicolons) or delete them from a list box (one or several at a time). It also allows to modify the delay time between updates, to choose between the default share display or the wide display with changes in the position and total position value and to select a display sorted by percentage return instead of company name. The Charts menu allows to select the default chart among the choices intraday, five day, three months, one year, two year or five year. Selecting the Update menu immediately updates the display. Lastly, the Help menu can display either the text from the manual page, or the copyright information in a new window.
The main window is very straightforward. For each of the stocks, four items are displayed: its name, its most recent price, the change from the previous close in absolute terms and in relative terms. The relative change is expressed in basispoints (bps), which are 1/100s of a percent. This display window is updated in regular intervals. If the --wide options is used, value changes and holdings value are displayed in the chosen cross-currency.
The window title displays the total portfolio profit or loss for the current day, as well as the date of the most recent update. If the --wide options is used, the net dollar value of the portfolio is also displayed.
Clicking on any of the stocks with the left mouse button opens a new window with all available details for a stock. Unfortunately, the amount of available information varies. Non-North American stocks only have a limited subset of information made available via the csv interface of Yahoo!. For North American stocks, not all fields all provided by all exchanges. Clicking on the details display window itself closes this window.
Clicking on any of the stocks with the right mouse button opens a new window with a chart of the given stock in the default chart format. This option is only available for North American stocks. Clicking on the chart window itself closes this window.
smtm does not recover from bad selection in charts. If, say, a five-year chart is requested for a company with only a two-year history, the program currently hangs.
Finance::YahooQuote.3pm, Finance::YahooChart.3pm, LWP.3pm, lwpcook.1, Tk::UserGuide.3pm
smtm is (c) 1999 by Dirk Eddelbuettel <edd@debian.org>
Updates to this program might appear at http://rosebud.sps.queensu.ca/~edd/code/smtm.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. There is NO warranty whatsoever.
The information that you obtain with this program may be copyrighted by Yahoo! Inc., and is governed by their usage license. See http://www.yahoo.com/docs/info/gen_disclaimer.html for more information.
The Finance::YahooQuote module by Dj Padzensky (on the web at http://www.padz.net/~djpadz/YahooQuote/) served as the backbone for data retrieval, and a guideline for the extension to the non-North American quotes. The Finance::YahooChart module by Dj Padzensky (on the web at http://www.padz.net/~djpadz/YahooChart/) provided the routine for determining the Yahoo! Chart url.