Neural
Networks
by Howard Arrington
In May of 1999, my good friend Larry Pesavento sent me
his new book, 'Profitable Patterns for Stock Trading'.
While the entire book is informative, it was the chapter on
'The Non Random Nature of Chaos Theory' that caught my
attention. In this chapter, Larry gives a brief history of
his introduction to neural networks in 1992, and his
subsequent consuming research with neural networks. The
neural network forecasts that Larry has shared with me over
the past few years have been impressive, even down right
profound.
Neural networks have been used as an expert system in
stock market forecasting with astonishingly accurate
results. We all want to have tomorrow's Wall Street Journal
delivered today, and perhaps neural networks are the closest
thing yet to having a crystal ball so we can see tomorrow
today. A Neural Network is a mathematical system loosely
modeled on the human brain. A neural network attempts to
simulate market behavior using sophisticated software which
has multiple layers of simple processing elements called
neurons. Each neuron or node is linked to other neurons
with varying coefficients of connectivity that represent the
strengths of these connections. Learning (training the
network) is accomplished by adjusting these strengths to
cause the overall network to output useful results.
Since neural networks have a strong similarity to the
human brain a great deal of the terminology is borrowed from
neuroscience. Artificial neurons are the basic unit of
neural networks. Although biological neurons are more
complex than the artificial neurons, the artificial neurons
simulate the four basic functions of natural neurons of
accepting input, analysis, feedback, and generating output
for other neurons. The basics of an artificial neuron are
shown in this figure.
In the network each neuron receives various inputs, each
multiplied by a connection weight. In the simplest case,
these products are summed and processed through a transfer
function to generate an output. The neurons are
interconnected and processing may pass through multiple
layers of neurons before arriving at the final output. The
minimal network structure would have an input layer, a
hidden center layer, and an output layer.
Neural networks can be designed in many ways, but all are
constructed from the basic building blocks. You should
start with a commercial software package for creating neural
networks because the mathematics involved are very complex.
Then your challenge as a researcher will be to go through a
period of trial and error in the design decisions before
coming up with useful results. The design issues are
complex and useful results may elude anything but a serious
effort and commitment.
These design issues must be given thoughtful
consideration when creating a neural network:
- Selecting the number of hidden layers and arranging
neurons in the various layers.
- Deciding the type of connections among the neurons.
- Determining the strength of the connections within
the network.
- Selecting what data to use as input and what will be
the output.
Issues 1) and 2) are configuration parameters that are
set in the neural net software program. Issue 3) is
accomplished by allowing the network to learn the
appropriate connection weight values by using a training
data set. The majority of the work involved in working with
neural nets will be in the preparation and maintenance of
training data sets. The biggest challenge is issue 4), the
selection of inputs and outputs for the neural network.
Obviously some inputs will be more worthwhile than other
inputs. What is not obvious is knowing what those inputs
should be.
The process of designing a neural network is an iterative
process. Just like the brain which learns from experience,
neural networks learn by changing its connection weights
until it learns the solution to a problem. The weight-value
for every neuron to neuron connection is stored or memorized
so the network can process a new set of inputs to generate a
predictive output. The system needs to be retrained on a
frequent basis so that connection weights can be adjusted to
incorporate new knowledge.
Neural nets have the ability to generalize. The training
data sets teach the neural net to recognize more than just
what has been seen in the past. A neural net can discover
characteristics about the training data sets that may elude
our perception. While market movement may at first glance
appear to be random, neural nets demonstrate that markets
are not totally random. There are waves, vibrations and
patterns that repeat. The value of the neural net is its
ability to digest massive amounts of data and perform
hundreds of thousands of calculations to discover the
market's intrinsic characteristics, and generate useful
predictions.
Do I have the 'crystal ball' yet? No. I feel I am like
Galileo who put two glass pieces on the ends of a tube and
discovered with his crude telescope he could now see
something he could not discern before. Was Galileo's first
telescope the 'crystal ball'? No. Through
time and effort, telescopes evolved into better instruments
with greater power, with an occasional radical new design.
Neural nets are a work in progress as new inputs are
considered and more research is performed. The end
objective is greater accuracy and correlation between
tomorrow's forecast and reality. Some days the forecasts
are very accurate and give the advantage of knowing in
advance where and when the markets will turn. On other
days, however, the forecasts are not worth the paper they
are printed on. The goal of every neural net researcher is
improved accuracy and a reduction in the frequency of
occurrence of worthless or misleading forecasts.
I won't tell you the specifics of where I am at in my
personal evolution with neural nets. I will pass on a few
tips to help you get started if you are inclined to
seriously investigate neural nets.
- Plan on spending a couple thousand dollars to buy a
commercial neural set software package. You must
realize that the neural net software is just a tool, it
is not the end solution. You still have to design the
neural network and then train it.
- Use a very fast computer with a big hard disk. Some
of the neural net models may number crunch for hours.
- Either program yourself or hire a good programmer to
design tools that aid in the preparation of training
data sets. Most neural net program accept ASCII files
or Excel files for the input, and generate the same
files as the output. As stated before, the majority of
the work will be in the preparation and maintenance of
training data sets. Make the data preparation program
flexible because you will want to evolve and test new
ideas.
- Plan on an initial phase of excitement and
enthusiasm, followed by several years of dedicated
research as you search for a 'holier grail'.
- Data that might be considered as Input in
your neural net design include (but not limited to):
- Astronomical relationships, periods of rotation and
orbit
- Time of day, day of week, season, days to expiration
- Patterns and Cycles
- Numerology, including Gann and Fibonacci numbers and
ratios
- Daily statistics such as Open, High, Low, Close, Net,
Volume and Open-Interest
- Up ticks, Down ticks, and tick volumes
- Time and Price data points: intra-day data would be a
candidate for intra-day forecasts, and daily data for
daily forecasts.
- Various Studies (I have personally discounted these
because they are a 2nd generation digestion of the
original Time and Price data).
The chart Overlay feature in Ensign Windows can be used to
display a neural net forecast with a host chart. The
forecast is an Ensign data file created from the output of a
neural net. The forecast extends into the future when
plotted on the host chart. The host chart updates in
real-time and plots in proper synchronization with the
forecast so both are seen simultaneously as shown in these
examples. The first chart shows a forecast for daily Live
Cattle prices for last December. The forecast was made at
the end of November for the entire month of December.
The next chart shows an intra-day forecast
for January 22nd, 2002. The forecast was made in advance
for the entire day.
Appreciation is expressed to Dr. John
Arrington for permission to publish the two chart examples
which are the result of his research over several years with
neural networks. His research is focused on the live cattle
markets for his personal trading. He does not have anything
to discuss, share, or sell. So please respect his privacy.
Study Tip:
Fibonacci Dividers
Fibonacci dividers are two rods joined with a pivot like
a pair of scissors and pointed on both ends. The pivot
point is located at 61.8% of the length of the rods. A pair
of Fibonacci dividers can be made from a 10 inch dinner size
plastic plate and 2 map pins.
- Cut two strips from the plate, 7 inches long, and
3/4 inches wide.
- Trim the 4 ends to have V shaped points. Both
strips are to be identical in length, width and shape.
- Measure a strip's length, and mark the pivot point
at 0.618 times the length.
- Use a map pin as the pivot point axle. Insert the
pin at the pivot point to pin both strips together.
- Snip off the pin point after it has been inserted at
the point point. Leave 1/8th inch length.
- Cover the exposed end of the snipped pin axle with
the ball removed from another map pin. You will have a
ball on each end of the pin axle.
Use the Fibonacci dividers to measure 61.8%
relationships:
- Measure the distance on a chart with the Wide end.
- Turn the dividers over without changing the opening
angle of the divider legs.
- Use the Narrow end to measure the 61.8% distance.
Use the Fibonacci divider to measure 161.8%
relationships:
- Measure the distance on a chart with the Narrow end.
- Turn the dividers over without changing the opening
angle of the divider legs.
- Use the Wide end to measure the 161.8% distance.
Fibonacci dividers are a convenient tool for measuring
and projecting Fibonacci relationships. The dividers can be
used in the vertical direction on a chart to measure price
relationships, or in the horizontal direction to measure
time relationships. |