|         
|
Home
|
General
|
What it does
|
| Instructions
|
Tour
|
NEW:Try it online
|
Registration as freeware
|
Verification
|
Downloads
|
| Embed Reuters on your site
|
NEW: Auto-train feature
|
Contact |
|
|
|
loading requested page...

|
Fast download - about 30 seconds on a modem (1.98 MB)
|
Requires Windows 98/ME/XP/2000 |
|
| | GoldenGem® Neural network calculator ~ Stock market data source
|
|
|
|
| |
Beginner's Intro
|
| | General Information about Neural Networks
Background Information (from Wikipedia):
Since the early 90's when the first practically usable types emerged,
artificial neural networks (ANNs) have rapidly grown in popularity.
They are artificial intelligence adaptive software systems that have
been inspired by how biological neural networks work. Their use comes
in because they can learn to detect complex patterns in data. In
mathematical terms, they are universal non-linear function
approximators meaning that given the right data and configured
correctly, they can capture and model any input-output relationships.
This not only removes the need for human interpretation of charts or
the series of rules for generating entry/exit signals but also provides
a bridge to fundamental analysis as that type of data can be used as
input.
In addition, as ANNs are essentially non-linear statistical models,
their accuracy and prediction capabilities can be both mathematically
and empirically tested. In various studies neural networks used for
generating trading signals have significantly outperformed buy-hold
strategies as well as traditional linear technical analysis methods.
While the advanced mathematical nature of such adaptive systems have
kept neural networks for financial analysis mostly within academic
research circles, in recent years more user friendly neural network
software has made the technology more accessible to traders
(read full article). [also
follow the same link to the more important section on fundamental analysis] Wikipedia, September 2006
| |
Theory of Neural Networks (J. Moody)
Summary of operation:
- The trader, wishing to quantify the relationship among a group of stock or share prices, and/or indices,
enters the tickers in capital letters, separated by commas.
- The needed historical and real time share price quotes and volumes are looked up and compared automatically.
- The neural network searches for a nonlinear mathematical
relationship (pattern) relating the prices and volumes to the ticker of
interest, while the user participates by controlling a sensitivity
(also called 'momentum') adjustment
- When sensitivity is then set to zero, graphs show two years of correct and rigorous backtesting.
through which the user may visually assess whether the relationship is valid throughout historical time.
- The relationship is extended into the future to make a forecast,
by the number of days the user has set on the slider during training.
- There is no buy/sell indicator: the reliability of the forecast depends on the user's visual verification
of the match between the two graphs
obtained during backtesting, and the his estimation of the likelihood that the mathematical relationship
which has been found will continue to hold in the future.
Now that you have read an outline summary of the operation of a neural network, try clicking
on the 'Instructions' link on the left, and have a go memorizing the actual instructions. The technical operation of the program should be no more difficult than using a CD player, for example.
(If things go well,
you'll have an opportunity to try them out on a mock-up practise tour, and if that goes well,
you might even end up going online to try the real thing.)
User instructions
1. Think of a list of tickers that are likely to be mathematically
related, over time. This is the hardest step -- mathematically related does not mean that they behave similarly. (see the Wikipedia
article GoldenGem - Wikipedia).
2. Locate the label which says 'Related Group of Tickers.' Beneath
this, delete the sample list of tickers which may be there, and enter
the names of the tickers you are interested in analyzing, in capital
letters, and separated by commas.
3. Choose a data source from the File: button at the top of the program. The simplest
possibility is 'Load from Internet.'
The (included) StockDownloader
will appear. This program knows how to search the standard list of
public domain websites including Google, Yahoo and MSN and place a plain text
file called Internet.txt in the GoldenGem folder, which will have
columns for Date, Ticker, Open, High, Low, Close, and Volume, with
entries separated by commas. The default settings in StockDownloader
are set to load the same list of stocks
which you entered in GoldenGem, up to the most recent close price.
If you are happy with this selection, press the 'Load' button on
StockDownloader. (The StockDownloader is just a beginners' tool; it is expected that you will later graduate from technical analysis to
fundamental analysis finding your own data from other websites;
click here to find out how to do this.
4. Use the up and down arrows on your keyboard to choose which of the the various graphs you wish to see (or you can use the
drop-down menu button, near the letters TK to the right of the screen).
| | Click to continue
5. You will see three coloured traces on each graph. The red
trace is the graph of the selected share price throughout two years of
historical time. The green graph shows the
neural net's use of artificial intelligence to predict the red graph,
throughout historical time, simultaneously combining all loaded volume
and price information of all the shares. There is also
a blue graph, which shows where the green graph would go if it were
predicting perfectly.
6. Increase the sensitivity and
wait until the green graph matches the blue graph, then decrease the
sensitivity to zero (the bottom of the slider). This is best done in
stages, over many iterations, as you are removing the training input.
If the green and blue graphs match well when sensitivity is zero, this
means the green curve has learned how to predict the advance copy of
the red curve throughout historical time, by looking only at effects as
many days in the past as you have selected on the Days slider. The
green curve does not therefore need to finish at the 'Loaded Until'
date, but can continue the calculation for an equal number of days yet
to come.
You see this in the first screenshot as the part of the green curve
that extends three weeks past the verticical blue line.
7. The numerical prediction for the future increase or
decrease will also be shown at the upper right of the display. A text
display will say, for instance: Predicted change over the next 15
business days: +2.35. | |
Once you have memorized the instructions, then you are ready for the tour. Click
the link on the left which says 'tour.'
For more detailed instructions go to the FAQ page (click here)
For technical specifications to click here
|   | | Other data sources: Besides using StockDownloader, there
are other options for obtaining data. For three beginning examples, you can
| | | *choose 'Load from File,'
to load data
which you may have downloaded previously, such as the standard and poor
500 file sp500hst.txt
which uses the same standard file conventions as GoldenGem, and can be
obtained as a file called full_set.zip from
biz.swcp.com/stocks/ | | or
| | | *download a collection of .csv files (some of stock market data and some of Forex data)
from for example
www.forexrate.co.uk/forexhistoricaldata.php.
The csv data export on that site works by scrolling with the up and down arrow keys. Select 500 data points, 1 day,
and split by comma. Change the vol number in GoldenGem to column 4, enter the ticker names you wish into GoldenGem, and choose Import from a folder. Then browse to whatever folder contains the .csv files. | | or
| |   | *paste or type in a text file of
your own using Wordpad, as explained in the link below | | or
| | | *download a file of 2 years or so of daily data from the Bank of England Statistical database http://www.bankofengland.co.uk/statistics/index.htm Choose columnular (with titles if you wish). This
creates a file called results.csv. Set the file position numbers tick, date close to 2,1,3 and leave the vol window blank. Type in the subset of ticker names you want to start with. Choose 'Browse for a new file' from GoldenGem's
File button. Choose 'comma separated (csv) files' at the bottom
of the file selecting box and select 'results.csv,' the file you've just downloaded from Bank of England.
|
(Click here for even further methods of importing and loading data from other applications)
Availability:
Try it online!
If you have a Windows XP operating system, with Internet Explorer or Mozilla you may find it is not necessary to install the program at all; you're invited to
click here to try it online. For Internet Explorer choose 'run' instead of 'save'. For Mozilla choose 'save' then 'open.' The link above is a small 504 K file called GoldenGem Viewer.
Choose to 'load tickers from the internet' from the File: menu, then use the menu to the right of the screen to change between graphs.
If it is the first time you've trained a neural network, think of it as a sort of video game, where the goal is to make
both indicator lights remain green.
Full installation: Local download Link
The full installation is also at the very safe download site Download.com
The program can also be found at PCMag.com (PC Magazine), by including the words PCMag and GoldenGem in a Google search. The
installation file setup.exe is digitally signed by the original
software author John A. Moody, a research mathematician who remains the
registered
owner of the domain www.goldengem.co.uk.
The signature is recognized by a Microsoft Root Trusted Certificate,
which verifies that the
installation file has not
been altered. If you use Internet Explorer, you have the capability to
verify the certificate and the digital signature, and verify the
following:
| File Name: setup.exe | File Size: 1.96 MB | Signed by: John A. Moody |
Date Signed: April 7 2008
| | Counter-signature: Comodo | Certificate: UTN | Expiration date: 08/04/2008
| Time signed: 10:17:01 GMT |
The Download.com site, which delivers
the same file, verifies that software which they offer is free of adware, free of spyware,
free of viruses, and that it correctly installs and completely uninstalls. It does not matter whether you download
from the local link or from Download.com. The program works with Windows 98, 2000, NT, XP.
(Prefer to install it manually? Because the program does not
read
or write to the registry, as
another alternative to the above, you may just install it manually, by
creating a new folder of your own and placing only the one program
file, goldengem.exe, in that folder. Then further files can be obtained
from other sites, as you may or may not wish as follows: the sample
data file sp500hst.txt, if you want to have it, can be
obtained from biz.swcp.com/stocks/..... [read more])
Registration as freeware:
Thanks to the generosity of previous users it is not necessary
to request payment for development; google advertising revenue supports
the website and delivery of the program.
Each time you start the program
it will ask for a registration number.
You may just close the registration window, or leave it blank and the fully-enabled program will
appear.
After 30 days you'll
be asked to return to this website for a registration number.
Write to the email address on your console or to
goldengemnetwork@gmail.com and your registration key will
be sent to you from England for free.
If users have time, they will visit the
Google ads below for competing products. Also when users write to request
the free registration key, they
should include advice for
improving the program.
Here is an outside review of the program, really intelligently written
Download from an external mirror site with (sort of) independent review
Ads about competing Neural Networks, predicting the stock market, Math,
Technical Analysis, Bonds, Exchange rates etc:
Recreational/educational from GoldenGem.co.uk
Portfolio analysis(free)
Visualize the output of a single neuron w/o bias (freeware)
Visualize a neural network with 2 inputs, 2 hidden neurons (freeware)
Terminal for writing in Tex (math) notation (freeware)
Terminal for kids, says letter and word sounds (shareware)
Which extra-solar planets could you reach -- special relativity (freeware)
Word unscrambler using fundamental thm of arithmetic (freeware)
Complex plane --educational, requires Mozilla (freeware)
Reuters news Ticker (freeware)
Verification that it works
This section contains verification that the neural network is capable
of predicting abstract mathematical functions. This verifies that the programming
was done correctly. The file here proof.html consists of tickers named x, y, z,w
containing 10 sin(i/10), 10 cos(i/10),
10 cos2(i/10)sin(i/10)+10 cos(i/10), and
10 sin 2(i/10)-10 cos(i/10)-10. This data is
included for each ticker for i=1 to 400. You can verify some of the numbers with a calculator if
you wish. To download the same numbers in a plain text file called "proof2.txt" right click HERE and
choose 'save target.' You can point
GoldenGem's file browser to it, from the File: menu, or just copy it into your GoldenGem folder. With the
ticker names x,y,z,w and file position numbers 1 and 2 as in the screenshot below, (we've left the volume and date fields blank),
choose 'Browse for new file' and locate the file proof2.txt which you have just downloaded.
Here I decided to try having the slider set to 9 weeks, which really means
45 values of i (because there are just 5 business days in a week -- GoldenGem knows that). We
have intentionally used not a whole multiple of a period, so that the value it is calculating is
based on a value from a totally different part of each graph. In the case of the first two graphs,
this could be accomplished by linear regression using the angle addition formulas. However, for the
last two graphs, there is no simple linear formula to calculate the future values in terms of past values
of the four, and the neural network has to work non-linearly.
Here are the predictions, these were obtained by a long run with low sensitivity, and you may
download the file proof.txt and run your own copy of GoldenGem on the same data, as explained just above.
Since recent improvements in the program, even a short run now will give these same results.
Moreover, you
can use any other mathematical data you wish to test GoldenGem and your ability to train it.
Scroll down to see the results
![Neural network's prediction
of the first ticker is perfect Chart prediction matches perfectly]() ![Neural network's prediction of the second ticker is perfect Second chart prediction of
stock data]() ![Third prediction is perfect...and striking Graph of neural network's third prediction]()
Main observations: * The fact that the functions
are periodic (that they repeat) is only for the benefit of the viewer, GoldenGem does not use this fact.
* The third graph correctly predicts that the function is just about to flatten sharply, and
you can see that it is predicting based on a part of the graph where a naive viewer would believe it is
going to continue downards.
* The same graph correctly
predicts the fine wiggling which you see in the graphs, which come from the fact that the
function is not a linear combination of any of the inputs, and requires correct nonlinear behaviour.
The auto-train feature
A version of the program called AutoTrain is available, which rapidly trains automatically.
In this version the speed button is replaced by an 'autotrain' button. To download
a trial version of AutoTrain go to http://www.goldengem.co.uk/setupauto.exe
If you enjoy the auto-train feature and wish to register it after one month of use, this will cost 75 us dollars, and requires a paypal account to order this; at the end of one month of use a registration key for AutoTrain can be obtained from the contact us section of the site
or by going to Pay pal here
|
The theory of neural networks
Mathematically, the theory of neural networks is fairly
trivial. That said, it is also true that the development of
the theory would have proceeded more quickly if basic mathematical understanding had been applied at the beginning.
We assume one knows that a linear map
Rn → Rm
is given by a matrix with n columns and m rows, whose
entries are real numbers. A composite of such linear maps
is again a linear map, and the matrix representing the
composite is the product of the matrices representing the
separate factors. Therefore, the set of functions which can
be represented as a composite of linear maps is no larger
than the set of functions which can be represented by a single
matrix.
Just to make things concrete, if we attempt to find
a function which determines the price of a share of IBM,
in terms of the prices and volumes of five stocks, using
a linear function, we are choosing one function out of
a ten dimensional space of functions; or, we are choosing
the ten entries of a matrix with a single row and ten columns.
One notion of what those entries should be is the one which
gives the least error, in the sense of least squares. Provided
the share prices are normalized to have mean zero and standard
deviation one, these ten numbers are what are called the linear
regression coefficients.
The new ingredient in neural networks is that after applying
a matrix to a vector, we then apply a transition function to
each entry of the new vector. If repeat what we have just done,
the result will not be much different. Some of the differences
are that it is not guaranteed that there is a sequence
of ten coefficients that gives the best fit, two sequences of
ten might give an equally good fit. Also, it will be impossible
to fit values which exceed the range of our transition function.
These seem like disadvantages.
| |
But there are tremendous compensating advantages. Namely,
a composite of functions of this type (applying a matrix,
then applying a transition function to each entry of the answer)
is not the same as a single function of this type. For example,
the composite of
linear maps goes (if five shares are loaded) and there are ten neurons in the middle layer
R11 → R10 → R10 → R5
To make a fair comparison, reagarding the calculation of one
output, we are only looking at one of the factors in R5.
So the number of matrix entries used for the same calculation is
11 × 10 + 10 × 10 + 10 × 1=220
So instead of a ten dimensional space of functions,
we are looking at 220 dimensional space of functions.
Next, in order to simplify things, let us write
all the various matrix entries as a sequence of variables
y1, y2, ..., ym
where m is a number which may range up to, as we have seen,
220. And, let us write the input variables as x_1,...,x_n
where in our example of five shares, n is just ten. In fact,
n is eleven because we use a bias variable which is the constant
input one.
Now, our neural network, or, the part of it which calculates
a single output variable, is just a function
f(x1,...,xn; y1,...,ym).
|
|
|
|
We would like this function to match the actual share price
of the share we are analyzing at a fixed number of days into the
future, and we shall call the correct answer, when it is known,
g(x_1,...,x_n). So our error, of course, is the difference
e= g(x1,...,xn)-f(x1,...,xn
; y1,..,ym).
The second term, if we were to write it down, would look
complicated, it would involve composites of the transition
function and matrix multiplications, and, if we include
the normalization of variables it would look even more compli-
cated. We shall now imagine a particular point in the training
of the neural network. So x1,...,xn are fixed, they are par-
ticular numbers. This means the first term g(x1,...,xn) is
a number, and the second term is a rather complicated looking
function involving all the thousands of variables y1,...,ym.
But we may still ask, what is the best direction to change
the yi to improve the error the fastest. This is merely
the value of e times the gradient of f viewed as a function
of the yi.
The entries of the gradient of f are just the partial deri-
vatives of f with respect to the yi. Because f is a composite
of separate functions Ri to Rj for various values of i and j,
the chain rule can be used, which says that the gradient of f is
the product of the Jacobian matrices of these separate functions.
Each function is in fact a matrix composed with a function that acts
separately on each coordinate by the transition function. The
Jacobian matrix of a matrix is the matrix itself, and the Jacobian
matrix of the transition function acting on each coordiante separately
is a diagonal matrix, with the derivative of the transition
function in each diagonal entry. Some care must be taken to
evaluate the derivative of the transition function at the
appropriate value, but this is standared in multivariable calculus.
| |
Let us now make this explicit. We have a composite
g1 g2 g3
R11 → R10 → R10 → R
and
f=g3 o g2 o g1
a composite of three functions. For i=1,2,3 the function g_i
is a composite Mi o hi where Mi is a linear map,
given by a matrix, and
h1: R10 → R10
h_2: R10 → R10
h_3: R→ R
Note that hi acts on the target of gi.
The functions h merely apply the transition function
to each variable.
Now, the derivatives of the hi just apply the derivative
of the transition function to each variable. Let us call these hi'.
We have
f=h3 o M3 o h2 o M2 o h1 o M1
so the chain rule says that the derivative of f evaluated at
our fixed vector (x1,...,xn) is
h3'( M3 o h2 o M2 o h1 o M1(x1,...,xn)
o M3(h2 o M2 o h1 o M1(x1,...,xn)
o h2'(M2 o h1 o M1 (x1,...,xn)
o M2(h1(M1(x1,...,xn)
o h1'(M1(x1,...,xn)
o M1(x1,..,xn)
|
|
|
|
Here we can view the hi' once they are evaluated at the
long expressions in parentheses, as square matrices with only
the diagonal entries nonzero.
Now, I actually want to differentiate f(x1,...,xn) with respect
to the variables y1,...,ym which are the entries of the matrices
M1,M2, M3 keeping the xi as fixed numbers.
The calculation is less familiar but actually easier.
To differentiat with respect to the (i,j) entry of M1 replace
the last term in the expression above with a column vector with xi
in position j. If I want to differentiate with respect to the (i,j)
entry of M2 then the last two terms will be removed,
and the third from last term will be replaced by the
i'th entry of h1(M1(x1,...,xn)) in position j and so-on.
This is just an application of the chain rule
viewing the matrix entries as variables. The same calculation is also
the same as the the 'backpropogation' calculation
for artificial neural networks. To finish we must apply some multiple
of the error -- actually GoldenGem uses also a sensitivity
multiplier based on a logarithmic scale here. The particular
transition function which we use is the inverse tangent function
arctan. This is chosen because the other possible choice of a bipolar
transition function is hyperbolic tangent. The hyperbolic tangent
takes values between -1 and 1, and is almost always nearly equal to one
of those values. It is often chosen if a neural network is meant to model
digital data. Arctan varies more evenly, and is the better choice
of bipolar transition function for analogue data. Why the neural network configuration --- this particular space
of functions --- is chosen is easy to see. If the matrix entries
in early stages are chosen small, it matches a linear function well,
so it is in this sense at least as good as linear regression.
| |
On the
other pointer, it is possible to model a binary function very well, even
with three levels. To see this, think of the output which ranges
from -π /2 to π /2 as a digital output, thinking that an answer
near pi/2 means 'yes' and one near the negative of that means 'no.'
Now we can very easily choose matrix entries to arrange any truth
table we wish. If I want an answer of 'yes' just if the first seven
inputs are 'yes,' I can weight the matrix entries directly looking at
the first seven inputs so that the sum of the contributions from these
entries (plus a constant from a bias neuron) is positive if and only if all seven inputs say 'yes,' and
in any case a very large positive or negative number. And so that the
contributions from other inputs do not matter, I set other coefficients
to zero. After applying the transition function to the sum, we see that
one neuron in the middle level has an answer of π/2 if all seven are
'yes' and -π/2 otherwise. In this way, one sees, in the first stage
I can model an 'and' of any subset of entries, or their negatives.
Now, it is an easy fact of logic that any truth table can
be expressed in two stages of negation and and. The more familiar
fact is that any truth table can be expressed as an OR of
a set of ANDS of the input variables and their negations. But then
one can use the tautology that
OR = NOT AND NOT.
This shows that a three level neural network can model
both linear and logical phenomena. A more precise fact is any
continuous function whose domain is a
bounded subset of Rn can be approximated uniformly
by a sequence of functions f1,f2,... where fi
is realized by a three level perceptron with i neurons in the hidden (middle)
layer. This was first discovered by Funahashi (in the Journal Neural Networks, vol 2)
and independently by Hornik et al in the same journal. Hornik et al applied the
phrase `universal nonlinear function approximator' to this three level
configuration, and this is the default configuration
in GoldenGem.
|
|
|
|
In conclusion, the chain rule is an element of under-
graduate mathematics, it was not applied in neural network theory
for many years. When it was applied, it was called `backpropogation,'
because the chain rule takes account of all the values
and derivatives of the separate functions we have composed to
create f.
Another concluding remark: in data mining, some people run
several neural networks in parallel. This is very much the same
as running a single neural net with a very large middle layer, but it
may be better, because there is a concern about overtraining
and poor generalization if a single three layer perceptron is used
with a large middle layer. For that reason the number of neurons
in the middle layer of GoldenGem by default is no more than the
square root of the product of the number in levels 1 and 3, and
this means it may be useful to run many copies of the program
simultaneously, or run the program many times. With this in view
we have added a 'speed' button which allows rapid training,
and quick indicator lights which can be used to assess statistical
significance of the training set, and an adjustment in the stock
downloader which allows one to choose a validation data set.
It is my view
that the challenge now is not better software, but better
use of the existing algorithms. I hope I have successfully
brought the GoldenGem
console into the 21'st century, and it will remain a reliable
slide rule of neural calculation in the field.
| |
|
Advantages:
- Benchmark predictions of abstract mathematical functions, such as shown on this site, have been extensively verified.
- The technical specifications are those agreed to be most effective in stock market prediction.
- The algorithm has been widely used for many years in finance,
trading and investment, portfolio management. It is established as a
reliable and valuable calculation.
- The algorithm is the only reliable way in which it is possible to
simultaneously consider the combined effects of a number prices and
volumes.
Contact Us
Postal Address: GoldenGem Neural Networks, 12 Armorial Road, Coventry CV3 6GJ, England
Telephone (if dialled from USA): 01144-2476-523490
Software author (if dialled from USA): 01144-2476-417946
Support: GoldenGemNetwork@gmail.com
|