1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>smtm - Display and update a configurable ticker of global stock quotes</title>
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsys">SYNOPSYS</a></li>
<li><a href="#options">OPTIONS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#examples">EXAMPLES</a></li>
<li><a href="#menus">MENUS</a></li>
<li><a href="#display">DISPLAY</a></li>
<li><a href="#chart_display__aka__gallery__mode_">CHART DISPLAY (AKA 'GALLERY' MODE)</a></li>
<li><a href="#bugs">BUGS</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
<li><a href="#acknowledgements">ACKNOWLEDGEMENTS</a></li>
<li><a href="#cpan">CPAN</a></li>
<li><a href="#script_categories">SCRIPT CATEGORIES</a></li>
<li><a href="#prerequisites">PREREQUISITES</a></li>
<li><a href="#corequisites">COREQUISITES</a></li>
<li><a href="#osnames">OSNAMES</a></li>
<li><a href="#readme">README</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>smtm - Display and update a configurable ticker of global stock quotes</p>
<p>
</p>
<hr />
<h1><a name="synopsys">SYNOPSYS</a></h1>
<pre>
smtm [options] [stock_symbol ...]</pre>
<p>
</p>
<hr />
<h1><a name="options">OPTIONS</a></h1>
<pre>
--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 b, w, 3, 6, 1, 2, 5 or m)
--timeout len timeout in seconds for libwww-perl UserAgent
--wide also display value changes and holdings
--percent show relative performance in percent instead of bps
--sort style sort display by specified style
(must be one r, a, p, v, n, v, V or h)
--columns set choose the columns to display (can be any combination
of s, n, l, a, r, v, p, V, R, h)
--nookbutton close other windows via left mouseclick, suppress button
--help print a short help message</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p><strong>smtm</strong>, which is a not overly clever acronym for <strong>Show Me The
Money</strong>, is a financial ticker and portfolio application for quotes
from exchanges around the world (provided they are carried on
Yahoo!). It creates and automatically updates a window with quotes
from Yahoo! Finance. It can also display the entire variety of charts
available at Yahoo! Finance. When called with one or several symbols,
it displays these selected stocks. When <strong>smtm</strong> is called without
arguments, it reads the symbols tickers from a file, by default
<em>~/.smtmrc</em>. This file can be created explicitly by calling the Save
option from the File menu. Beyond stocks, <strong>smtm</strong> can also display
currencies (from the Philadephia exchange), US mutual funds, options
on US stocks, several precious metals and quite possibly more; see the
Yahoo! Finance website for full information.</p>
<p><strong>smtm</strong> 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. To compute annualised returns, the purchase
date and purchase price can also be entered.</p>
<p><strong>smtm</strong> displays the full name of the company, the absolute price
change and the relative percentage change in basispoints (i.e.,
hundreds of a percent) or in percentages if the corresponding option
has been selected. Other information that can be displayed are the
traded volume, the profit/loss, the aggregate positon value, the
holding period length, the annualised return, the drawdown, the
earnings per share, the price/earnings ratio, the dividend yield, and
the market capitalization. Note that the return calculation ignores
such fine points as dividends, and foreign exchange appreciation or
depreciation for foreigns stocks. All display columns can be
selected, or deselected, individually.</p>
<p>Losers are flagged in red. <strong>smtm</strong> can be used for stocks from the
USA, Canada, various European exchanges, various Asian exchanges
(Singapore, Taiwan, HongKong, Kuala Lumpur, ...) Australia and New
Zealand. It should work for other markets supported by Yahoo. US
mutual funds are also available, but less relevant as their net asset
value is only computed after the market close. Some fields might be
empty if Yahoo! does not supply the full set of fields; the number of
supported fields varies even among US exchanges. The sorting order can
be chosen among eight different options.</p>
<p>The quotes and charts are delayed, typically 15 minutes for NASDAQ and
20 minutes otherwise, see <em><a href="http://finance.yahoo.com">http://finance.yahoo.com</a></em> for details. New
Zealand is rumoured to be somewhat slower with a delay of one
hour. However, it is worth pointing out that (at least some) US)
indices are updated in real time at Yahoo!, and therefore available in
real time to <strong>smtm</strong>. Intra-day and five-day charts are updated
during market hours by Yahoo!, other charts with longer timeframes are
updated only once a week by Yahoo!.</p>
<p><strong>smtm</strong> supports both simple proxy firewalls (via the <em>--proxy</em> option)
and full-blown firewalls with account and password authorization (via the
<em>--fwall</em> option). Firewall account name and password can be specified as
command line arguments after <em>--fwall</em>, or else in a pop-up window. This
setup has been in a few different environments.</p>
<p><strong>smtm</strong> 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, market capital information, number of shares held and
annualised return. However, not all of that information is available
at all exchanges. Clicking the right mouse button display a chart of
the corresponding stock; this only works for US and Canadian stocks.
The type of chart can be specified either on the command-line, or via
the Chart menu. Choices are intraday, five day, three months, six
months, one year, two years, five years or max years. The default chart
is a five day chart. The middle mouse button opens an edit window to
modify and augment the information stored per stock.</p>
<p>See <em><a href="http://help.yahoo.com/help/us/fin/chart/">http://help.yahoo.com/help/us/fin/chart/</a></em> for help on Yahoo!
Finance charts.</p>
<p><strong>smtm</strong> has been written and tested under Linux. It should run under
any standard Unix, success with Solaris, HP-UX and FreeBSD is
confirmed (but problems are reported under Solaris when a threaded
version of Perl is used). It also runs under that other OS from
Seattle using the <strong>ActivePerl</strong> implementation from
<em><a href="http://www.activestate.com">http://www.activestate.com</a></em>. In either case, it requires the
<em>Perl/Tk</em> module for windowing, and the <em>LWP</em> module (also known as
<em>libwww-perl</em>) for data retrieval over the web. The excellent
<em>Date::Manip</em> modules is also required for the date parsing and
calculations. With recent versions of ActivePerl, only Date::Manip
needs to be installed on top of the already provided modules.</p>
<p>
</p>
<hr />
<h1><a name="examples">EXAMPLES</a></h1>
<pre>
smtm CSCO NT</pre>
<p>creates a window following the Cisco and Nortel stocks.</p>
<pre>
smtm MSFT:Bill SUNW:Scott ORCL:Larry</pre>
<p>follows three other tech companies and uses the override feature for
the displayed name. [ Historical note: We once needed that for
European stocks as Yahoo! did not supply the company name way back in
1999 or so. This example just documents a now ancient feature. ]</p>
<pre>
smtm BT.A.L::10:GBPCAD T::10:USDCAD \
BCE.TO::10 13330.PA::10:EURCAD \
"555750.F:DT TELECOM:10:EURCAD"</pre>
<p>creates a window with prices for a handful of telecom companies on
stock exchanges in London, New York, Toronto, Paris and
Frankfurt. Note how a names is specified to override the verbose
default for the German telco. 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 argument
containing spaces. [ Historical note: The Deutsche Telecom stock can
now also be referenced as DTEGn.DE; similarly other stock previously
available only under their share number are now accessible using an
acronym reflecting their company name.]</p>
<p>
</p>
<hr />
<h1><a name="menus">MENUS</a></h1>
<p>Four menus are supported: <em>File</em>, <em>Edit</em>, <em>Chart</em> and <em>Help</em>. The
<em>File</em> menu offers to load or save to the default file, or to 'save
as' a new file. <em>Exit</em> is also available.</p>
<p>The <em>Edit</em> menu can launch windows to either add a new stock or
delete one or several from a list box. Submenus for column selection
based on various criteria are available. Similarly, the <em>Sort</em> menu
allows to select one of eight different sort options. Further, one
can modify the delay time between updates and choose between the
default title display or the wide display with changes in the position
and total position value.</p>
<p>The <em>Charts</em> menu allows to select the default chart among the eight
choices intraday, five day, three months, six months, one year, two
years, five years or 'max' years. Chart sizes can be selected among
three choices. Plot types can be selected among line chart, bar chart
and the so-called candlestick display. For both moving averages and
exponential moving averages, six choices are avilable (5, 10, 20, 50,
100 and 200 days, respectively) which can all be selected (or
deselected) individually. Similarly, any one of seven popular
technical analysis charts can be added. Logarithmic scale can be
turned on/off. Volume bar charts as also be selected or
deselected. Similarly, Bollinger bands and the parabolic SAR can be
selected. A selection box can be loaded to enter another symbol (or
several of these, separated by comma) for performance
comparison. Lastly, the gallery command can launch the display of a
chart for each and every stock symbol currenly loaded in the smtm
display. Note that intra-day and intra-week charts do not offer all
the various charting options longer-dated charts have available. Once
charts are shown, they are also updated regularly at the same interval
the main displayed is updated at.</p>
<p>Lastly, the <em>Help</em> menu can display either the text from the manual
page, or the copyright information in a new window.</p>
<p>
</p>
<hr />
<h1><a name="display">DISPLAY</a></h1>
<p>The main window is very straightforward. For each of the stocks, up to
eleven items can be displayed: its symbol, its name, its most recent
price, the change from the previous close in absolute terms, the
change in relative terms, the volume, the profit or loss, the total
position value, the holding period, the annualised return (bar F/X
effects or dividends) and the drawdown relative to the 52-week high.
The relative change is either expressed in basispoints (bps), which
are 1/100s of a percent, or in percent; this can be controlled via a
checkbutton as well as an command-line option. Further display
options are earnings per share, price/earnings ratio, dividend yield
and market capitalization. This display window is updated in regular
intervals; the update interval can be specified via a menu or a
command-line option.</p>
<p>The window title displays the relative portfolio profit or loss for
the current day in basispoints, i.e., hundreds of a percent, or in
percent if the corresponding option is chosen, as well as the date of
the most recent update. If the <em>--wide</em> options is used, the net
change and ney value of the portfolio (both in local currency) are
also displayed.</p>
<p>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 was initially available only
for North American stocks but now works across most if not all
markets, thanks to expanded support by Yahoo!. Clicking on the chart
window itself closes this window. Finally, the middle mouse button
opens an edit window.</p>
<p>
</p>
<hr />
<h1><a name="chart_display__aka__gallery__mode_">CHART DISPLAY (AKA 'GALLERY' MODE)</a></h1>
<p>In 'gallery' mode, chart windows are opened for all active securities.
These charts are automatically updated whenever the display is
updated. This mean that only the intra-daily and intra-weekly chart
timeframe selection are meaningful -- all others are updated at the
source, i.e. Yahoo!, daily or weekly, and there is no little point in
downloading the same chart over and over again.</p>
<p>However, for intra-daily and intra-weekly charts, this is a very
useful feature. It should be noted that not all chart size, chart
timeframe and chart option permutations actually lead to existing
charts. For example, logarithmic scale does seem to exist for
shorter-dated time frames. Neither does the 'small' chart size.</p>
<p>
</p>
<hr />
<h1><a name="bugs">BUGS</a></h1>
<p>Closing the stock addition or deletion windows have been reported to
cause random segmentation violation under Linux. This appears to be a
bug in Perl/Tk which will hopefully be solved, or circumvented, soon.
This bug does not bite under Solaris, FreeBSD or NT or other Linux
distributions. Update: This problem appears to have disappeared with
Perl 5.6.*.</p>
<p>Problems with undefined symbols have been reported under Solaris 2.6
when Perl has been compiled with thread support. Using an unthreaded
Perl binary under Solaris works. How this problem can be circumvented
is presently unclear.</p>
<p>It is not clear whether the market capitalization information is
comparable across exchange. Some differences could be attributable to
'total float' versus 'free float' calculations.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>Finance::YahooQuote.3pm</em>, <em>Finance::YahooChart.3pm</em>, <em>LWP.3pm</em>,
<em>lwpcook.1</em>, <em>Tk::UserGuide.3pm</em></p>
<p>See <em><a href="http://help.yahoo.com/help/us/fin/chart/">http://help.yahoo.com/help/us/fin/chart/</a></em> for help on Yahoo!
Finance charts.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>smtm is (c) 1999 - 2004 by Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>></p>
<p>Updates to this program might appear at
<em><a href="http://dirk.eddelbuettel.com/code/smtm.html">http://dirk.eddelbuettel.com/code/smtm.html</a></em>. If you enjoy this
program, you might also want to look at my beancounter program
<em><a href="http://dirk.eddelbuettel.com/code/beancounter.html">http://dirk.eddelbuettel.com/code/beancounter.html</a></em>, as well as the
Finance::YahooQuote module at
<em><a href="http://dirk.eddelbuettel.com/code/yahooquote.html">http://dirk.eddelbuettel.com/code/yahooquote.html</a></em> which was
originally written by Dj Padzensky, and that is used by both <strong>smtm</strong>
and <strong>beancounter</strong>.</p>
<p>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.</p>
<p>The information that you obtain with this program may be copyrighted
by Yahoo! Inc., and is governed by their usage license. See
<em><a href="http://www.yahoo.com/docs/info/gen_disclaimer.html">http://www.yahoo.com/docs/info/gen_disclaimer.html</a></em> for more
information.</p>
<p>
</p>
<hr />
<h1><a name="acknowledgements">ACKNOWLEDGEMENTS</a></h1>
<p>The Perl code by Dj Padzensky, in particular his
<strong>Finance::YahooQuote</strong> module (originally on the web at
<em><a href="http://www.padz.net/~djpadz/YahooQuote/">http://www.padz.net/~djpadz/YahooQuote/</a></em> and now maintained by me at
<em><a href="http://dirk.eddelbuettel.com/code/yahooquote.html/">http://dirk.eddelbuettel.com/code/yahooquote.html/</a></em>) and his
Finance::YahooChart module (on the web at
<em><a href="http://www.padz.net/~djpadz/YahooChart/">http://www.padz.net/~djpadz/YahooChart/</a></em>) were most helpful. They
provided the initial routines for downloading stock data and
determining the Yahoo! Chart url. Earlier version of <strong>smtm</strong> use a
somewhat rewrittem variant (which still reflected their heritage),
newer version rely directly on <strong>Finance::YahooQuote</strong> now that Yahoo!
uses a similar backend across the globe. Dj's code contribution is
most gratefully acknowledged.</p>
<p>
</p>
<hr />
<h1><a name="cpan">CPAN</a></h1>
<p>The remaining sections pertain to the CPAN registration of
<strong>smtm</strong>. The script category is a little mismatched but as there is no
Finance section, <em>Networking</em> was as good as the other choices.</p>
<p>
</p>
<hr />
<h1><a name="script_categories">SCRIPT CATEGORIES</a></h1>
<p>Networking</p>
<p>
</p>
<hr />
<h1><a name="prerequisites">PREREQUISITES</a></h1>
<p>On Windows, <em>smtm</em> can use the Perl distribution from
<em><a href="http://www.activestate.com">http://www.activestate.com</a></em>. On both Unix and Windows, <strong>smtm</strong>
requires the <code>Tk</code> module for windowing, the <code>LWP</code> module for data
retrieval over the web, and the excellent <code>Date::Manip</code> module for
the date parsing and calculations.</p>
<p>
</p>
<hr />
<h1><a name="corequisites">COREQUISITES</a></h1>
<p>None</p>
<p>
</p>
<hr />
<h1><a name="osnames">OSNAMES</a></h1>
<p><em>smtm</em> is not OS dependent. It is known to run under Linux, several
commercial Unix variants and Windows</p>
<p>
</p>
<hr />
<h1><a name="readme">README</a></h1>
<p><strong>smtm</strong>, which is a not overly clever acronym for <strong>Show Me The
Money</strong>, is a financial ticker and portfolio application for quotes
from exchanges around the world (provided they are carried on
Yahoo!). It creates and automatically updates a window with quotes
from Yahoo! Finance. It can also display the entire variety of charts
available at Yahoo! Finance. Fairly extensive documentation for
<strong>smtm</strong> is available at <em><a href="http://dirk.eddelbuettel.com/code/smtm.html">http://dirk.eddelbuettel.com/code/smtm.html</a></em>.</p>
</body>
</html>
|