App-Chart
view release on metacpan or search on metacpan
doc/chart.texi view on Meta::CPAN
Once you've installed Chart (@pxref{Installing}), getting started is easy.
Run @command{chart}, and choose File/Open from the menu bar. Enter a symbol,
like @samp{GM} (for General Motors USA) and click ``New''. The download
dialog pops up and gets an initial 5 years data, then the chart is displayed.
@c SYMBOL: GM
The Watchlist is easy too (@pxref{Watchlist}). Choose Tools/Watchlist from
the menu bar, go to the Symbol box, enter a symbol like @samp{NAB.AX} (for
National Australia Bank) and press @key{Return}. The symbol is added to the
list and a latest quote downloaded. Click on ``Refresh'' to update.
@c SYMBOL: NAB.AX
Stock symbols broadly follow Yahoo Finance conventions, which is the exchange
symbol plus a suffix, like @samp{.L} for the London Stock Exchange
(@pxref{Yahoo Finance}). But Chart is not Yahoo specific, other data sources
have other suffixes.
@c ---------------------------------------------------------------------------
@node Copying, Installing, Introduction, Top
@chapter Copying Conditions
@cindex Copying
@cindex Conditions for copying
@cindex License
@cindex GNU General Public License
@cindex General Public License
@cindex GPL
@cindex @file{COPYING}
Chart is Free Software, published under the terms of the GNU General Public
License (version 3 or later). The file @file{COPYING} contains the full
license terms (view it under Help/About within the program).
@cindex Distribution
@cindex Redistribution
Chart is not in the public domain. It's copyrighted and there are
restrictions on its distribution and redistribution, but these restrictions
are designed to permit everything a cooperating person would want to do.
Essentially you can give or sell copies to anyone, with or without
modifications, but you must allow everyone else to do the same and you must
clearly identify any modifications.
@cindex Warranty
Be aware there is no warranty whatsoever for Chart. This is described in full
in the license terms. No warranty whatsoever includes no warranty against any
losses or any missed gains as a result of anything Chart does or doesn't do or
show.
@cindex Financial advice
@cindex Investment advice
Note that Chart is only a program for displaying data. The program and this
manual do not give financial advice.
@section Data Copying
@cindex Copying, data
@cindex Data copying
@cindex License, data
The data that Chart may download or display will be copyright to the creator
of that data and will be provided under terms decided by the creator. You
must check each data source used to see that you and your intended use are
within the terms (@pxref{Data Sources}). The minimum for a source in Chart is
that personal non-commercial use is permitted. Usually no re-distribution is
permitted.
The author believes that the manipulations Chart performs on downloaded data
are purely mechanical and do not cause the program's terms to be added to any
results. Derived forms like the database files, watchlist quotes, screenshots
of graphs, etc, will be subject only to the conditions of the data originators
(cumulatively if data from more than one source is shown).
@c ---------------------------------------------------------------------------
@node Installing, Invocation, Copying, Top
@chapter Installing
@cindex Installing
@noindent
@cindex Required software
The following programs and libraries are required, see their respective
documentation for installation instructions.
@itemize @bullet
@item
Perl 5.10 or higher
@* @uref{http://www.perl.org}
@item
Gtk 2 libraries, version 2.12 or higher.
@cindex Gtk
@* @uref{http://www.gtk.org}
@item
Gtk2-Perl, version 1.200 or higher.
@cindex Gtk2-Perl
@* @uref{http://gtk2-perl.sourceforge.net}
@item
The large number of Perl modules listed in @file{Makefile.PL}, all of which
are available from CPAN,
@* @uref{http://www.cpan.org}
@end itemize
Chart uses an @code{ExtUtils::MakeMaker} build system. A basic build and
install can be made as follows. This will install under @samp{/usr/local}.
@example
perl Makefile.PL
make
make install
@end example
@c @cindex Build options
The usual @code{ExtUtils::MakeMaker} options and build targets are available.
Here are some other notes,
@table @asis
@item Optional Software
Various optional features and their required Perl modules are set out in the
@code{optional_features} section of @file{META.yml}. Some of the smart Perl
doc/chart.texi view on Meta::CPAN
by one, then it can be shown that on average the distance travelled after K
steps is @m{\sqrt K, sqrt(K)}. So the formula compares observed distance in
average day's steps compared to the @m{\sqrt K, sqrt(K)} steps which would be
the expected move if it were random. Thus 1 is when movement is apparently
random, and higher or lower if some apparently non-random trend or lack of
trend (respectively) appears to be present.
@c ---------------------------------------------------------------------------
@node Stochastics, TD Range Expansion Index, Random Walk Index, Indicators
@section Stochastics
@cindex Stochastics
@cindex Lane, George
Stochastics are an oscillator and signal line described by George Lane based
on each day's close within the total trading range of past N days. This
should not be confused with stochastic processes etc in mathematics, the two
are unrelated.
@cindex %K stochastic
The %K line is the close position within the past N-days trading range
(highest high to lowest low) expressed as a percentage 0 to 100.
@tex
$$ \%K = 100 \times {{close - Nday\;low} \over Nday\;high - Nday\;low } $$
@end tex
@ifnottex
@example
close - Nday low
%K = 100 * --------------------
Nday high - Nday low
@end example
@end ifnottex
@cindex %D stochastic
An extreme of 0 is reached for a close at the day's low which is also a new
N-day low. Likewise 100 for a close at the day's high and a new N-day high.
A signal line %D is added by smoothing %K with a simple moving average
(@pxref{Simple Moving Average}).
@tex
$$ \%D = SMA[D] \; of \; \%K $$
@end tex
@ifnottex
@example
%D = SMA[D] of %K
@end example
@end ifnottex
The default periods in chart are 14 days for %K, and 3 days smoothing for %D.
The %K line is drawn in red and the %D line in green.
@cindex Fast stochastics
@cindex Slow stochastics
%K and %D just described are called the ``fast'' stochastics. Corresponding
``slow'' stochastics are formed by smoothing %K with a simple moving average,
and calculating %D from that smoothed series. The extra smoothing is the
``slow days'' parameter in Chart. The default is 0 for no slowing, a value of
3 is often used.
Incidentally, a value of 1 for the slowing is the same as no slowing, because
a 1-period SMA of course doesn't change the data.
@c ---------------------------------------------------------------------------
@node TD Range Expansion Index, Trend Intensity Index, Stochastics, Indicators
@section TD Range Expansion Index
@cindex TD range expansion index
@cindex Range expansion index
@cindex TDREI
@cindex DeMark, Tom
The range expansion index by Tom DeMark is designed to identify price
exhaustion which may be the end of a move up or down.
The calculation is somewhat similar to an RSI (@pxref{Relative Strength
Index}) but looks at 2-day changes in the daily high and daily low values and
smooths with a 5-day SMA (@pxref{Simple Moving Average}). Changes are ignored
if the current day in not either within or covering price action from 5 or 6
days ago. That test effectively holds the indicator around zero while prices
are making breakaway runs.
DeMark regarded values above @math{+45} or below @math{-45} as overbought or
oversold. Such a reading maintained for up to five days suggests a reversal,
except that if it remains there for 6 or more days then the signal may be
unreliable and trading should be avoided.
@c ---------------------------------------------------------------------------
@node Trend Intensity Index, Trendscore, TD Range Expansion Index, Indicators
@section Trend Intensity Index
@cindex Trend intensity index
@cindex TII
@cindex Pee, M. H.
The trend intensity index (TII) by M.@: H.@: Pee measures the strength of a
trend, by looking at what proportion of the past 30 days prices have been
above or below the level of today's 60-day simple moving average
(@pxref{Simple Moving Average}).
The 60-day average is as of today, not its past values at each of
those past 30 days. For each day the deviation @math{close-avg} is
taken. Positive amounts are up deviations, and negative amounts have
the sign discarded and are down deviations.
@tex
$$ up = \left\{
\matrix{ close - average & \mathop{\rm if} \; close > average \cr
0 & otherwise \hfill \cr
} \right. $$
$$ down = \left\{
\matrix{ average - close & \mathop{\rm if} \; average > close \cr
0 & otherwise \hfill \cr
} \right. $$
@end tex
@ifnottex
@example
up = / close - average if close > average
\ 0 otherwise
down = / average - close if average < close
doc/chart.texi view on Meta::CPAN
@c SYMBOL: AUDUSD.RBA
@item AUDCNY.RBA @tab Chinese renminbi
@c SYMBOL: AUDCNY.RBA
@item AUDJPY.RBA @tab Japanese yen
@c SYMBOL: AUDJPY.RBA
@item AUDEUR.RBA @tab Euro
@c SYMBOL: AUDEUR.RBA
@item AUDKRW.RBA @tab South Korean won
@c SYMBOL: AUDKRW.RBA
@item AUDSGD.RBA @tab Singapore dollar
@c SYMBOL: AUDSGD.RBA
@item AUDNZD.RBA @tab New Zealand dollar
@c SYMBOL: AUDNZD.RBA
@item AUDGBP.RBA @tab UK pound sterling
@c SYMBOL: AUDGBP.RBA
@item AUDMYR.RBA @tab Malaysian ringgit
@c SYMBOL: AUDMYR.RBA
@item AUDTHB.RBA @tab Thai baht
@c SYMBOL: AUDTHB.RBA
@item AUDIDR.RBA @tab Indonesian rupiah
@c SYMBOL: AUDIDR.RBA
@item AUDINR.RBA @tab Indian rupee
@c SYMBOL: AUDINR.RBA
@item AUDTWD.RBA @tab Taiwanese dollar
@c SYMBOL: AUDTWD.RBA
@item AUDVND.RBA @tab Vietnamese dong
@c SYMBOL: AUDVND.RBA
@item AUDPNK.RBA @tab Papua New Guinea kina
@c SYMBOL: AUDPNK.RBA
@item AUDCHF.RBA @tab Swiss franc
@c SYMBOL: AUDCHF.RBA
@item AUDAED.RBA @tab UAE dirham
@c SYMBOL: AUDAED.RBA
@item AUDCAD.RBA @tab Canadian dollar
@c SYMBOL: AUDCAD.RBA
@end multitable
@end quotation
@cindex Special Drawing Right
@cindex Trade Weighted Index
Plus the following for the RBA's Trade Weighted Index for the Australian
dollar, and the Australian dollar valued in the IMF's Special Drawing Right
basket of currencies.
@quotation
@multitable {@nicode{MMMMMM.RBA}} {MMMMMMMMMMMMMMMMMMMMMMM}
@headitem Symbol @tab Value
@item AUDTWI.RBA @tab Trade Weighted Index
@c SYMBOL: AUDTWI.RBA
@item AUDSDR.RBA @tab Special Drawing Right
@c SYMBOL: AUDSDR.RBA
@end multitable
@end quotation
The historical data page
@uref{http://www.rba.gov.au/statistics/historical-data.html} has XLS files
going back to 1983 (and monthly to 1969) but the code for that in Chart has
bit-rotted and the CSV is about half the size. The server offers compressed
downloads (@pxref{Installing}).
@c Incidentally, the historical data processing in Chart is very slow. The main
@c bottleneck is @code{Spreadsheet::ParseExcel} apparently due to lots of
@c formatted rows in the XLS files.
@c ---------------------------------------------------------------------------
@node Thrift Savings Plan, Yahoo Finance, Reserve Bank of Australia, Data Sources
@section Thrift Savings Plan
@cindex Thrift Savings Plan
@cindex TSP
@cindex Funds, TSP
@uref{http://www.tsp.gov}
The US government Thrift Savings Plan (TSP) provides
@itemize
@item
Past 5 years daily fund prices, with new prices around 8pm (New York time)
each day.
@end itemize
@cindex @code{.TSP}
In Chart symbols are the fund code and a @samp{.TSP} suffix, for example
@samp{C.TSP} for the common stock fund. The lifecycle funds are like
@samp{L2050.TSP}, and the lifecycle income fund is @samp{LINCOME.TSP}.
@cindex @code{Finance::Quote}
@cindex @code{Finance::Quote::TSP}
Chart uses @code{Finance::Quote::TSP} for the latest prices, so you must have
that module installed (it comes with the main @code{Finance::Quote}).
@c ---------------------------------------------------------------------------
@node Yahoo Finance, , Thrift Savings Plan, Data Sources
@section Yahoo Finance
@cindex Yahoo Finance
@cindex New York Stock Exchange
@cindex NYSE
@cindex AMEX
@cindex NASDAQ
@uref{http://finance.yahoo.com}
Yahoo provides the following for many stock exchanges around the world
(@pxref{Yahoo Exchanges}),
@itemize
@item
Quotes, delayed for some shares and real-time for indices.
@c @item
@c Intraday graphs.
@item
Historical daily data, dividends and splits.
(But not upcoming dividends and splits.)
@item
Company information (name, exchanges, decimal places).
@end itemize
Yahoo terms of service can be found at the following link.
At the time of writing believe they are personal use and no re-publication,
( run in 0.587 second using v1.01-cache-2.11-cpan-39bf76dae61 )