Backpropagation Neural Networks

with the User Interface. Design, Teach and Use Neural Networks. Tutorial with examples (stock market trading).

Backpropagation Neural Networks


Visibility is very important for this site. If you like it please link to this URL or use our online form to add your reciprocal link. Learn more about reciprocal links

Cortex ver.5.0 Tutorial.

A Backpropagation Neural Networks Application.

What is "Cortex"?

Feedforward Backpropagation Neural Networks, with an easy to use interface and large number of additional features, like charting, for example.
A built-in scripting language, that allows you to perform routine tasks automatically. Loading and converting data, optimizations, creating charts, as well as web pages containing these charts, and much more can be created by scripts, with no interference from the user.

Let's outline the steps that we need to take, to use the Neural Network as the data analysing tool (I assume that you are already familiar with the Neural Networks theory). The "Cortex" will help you to do these steps faster and with less frustration, something you may want to keep in mind while reading.

1. First of all, we need data, anything from the stock quotes to the sound patterns for a speech recognition software. The only criteria is - the data must be sequential (a table with numbers in it's cells is a good example).

2. The data need to be fed to the neural network one row in a time. Let's say, we want to do a stock trading. One row of data is simply not enough! You need a HISTORY, not just a current OHLC information. Can you predict the tomorrow's stock price based on today's price? Not unless you have the "historical price" information for at least couple of prior days.
Therefore, to use a "one row in a time" approach, we need to make sure that this row contains all the historical data we need, for example, it can contain the today's data in the column one, the yesterday's data in a column two, and so on. This kind of file is called (at least in this tutorial) a lag-file, it can be automatically generated by the "Cortex" program. As a mater of fact, it can be either generated by the Cortex, OR by its scripting language, if you need to have more flexibility (for example, having Close, you may want to calculate moving average of Close, as well as couple of indicators that are used in stock trading, and only then create lags of this - advanced - input.

3. We need to choose a Neural Network configuration - number of neurons, activation type and so on. The "Cortex" presents a simple visual interface, that allows to do just that. (Again, you can use scripting language to do it in automated way. When you only need one neural network, it does not make a lot of sense, but sometimes, you need to try many different combinations of input data, with different networks - automating this task is a real time saver).

4. We need to teach the Neural Network. To do it, we run it against part of the data in the "backpropagation" mode, using another part of the data to test the performance of the net. The first part of the data will be (again - in this tutorial) called a learning data set, the second part is called a "testing" data set.
As the "Cortex" is fine-tuning the Neural Network, it is displaying the values and charts for the learning and testing errors.

5. After the Neural Network training is completed, we can use it on the "real" data. For example, we may teach it on the stock qoutes for the last year, and then we expect it to predict the tomorrow's price, based on the price for today, and couple of days of history.

To do it we need (again) to generate a lag file, and to run the data rows we want to analyze through the Neural Network. The resulting file will have the following columns:

Columns for the input. What we present to the Neural Network.
Columns for the output - what we were trying to predict.
And the prediction: the column(s), generated by the Neural Net.

Here is an example:

Inputs Output Predicted
No Close-1 Close-2 Close-3 Close-4 Close NN: Close
0 5.150000 5.180000 5.120000 5.100000 5.200000 5.070705
1 5.180000 5.120000 5.100000 4.950000 5.150000 5.094328
...

As was already mentioned, the Cortex Neural Network Application does just that - and much more.

6. Finally, after the Neural Network is created, we need to somehow call it from the rtading software of our choice: TradeStation, MetaStocks, MetaTrader... In this example you will find a working system that is created, step by step, and then moved from Cortex to the trading platform, capable to place real trades with the real brocker.

Installation.

Download the Cortex archive.

Some programs that you can download from this site can work together. If you want (strongly recommended) this kind of functionality to be available, you should create a common folder, called (recommended) S_PROJECTS, and to unzip all software in this folder. The sub-folders will be created for you automatically.

When specifying options in your Winzip software, make sure that all subdirectories (subfolders) are restored. Usually it is the default setting for the WinZip. Installation is complete.

On 20-May-2003, the S.Projects changed the passwords for all the software. If you have purchased the software before this date, we strongly advice you to make a backup copy of the entire folder, prior to re-downloading.

Uninstallation.

Delete the folder containing the Cortex files.

Registration

If you choose to register the Cortex software, you will need to enter the password (provided in the e.mail that you will receive after the registration) into the registration prompt.

Please keep in mind, that the Cortex comes with few independent parts, that need to be registered separately.

Getting started.

The following chapters will walk you through a simple example of using the "Cortex" Neural Networks software - we are going to build the stock price predicting net.

Note: This example is to teach you how to work with Cortex, not how to trade!

We also have a tutorial on the Scripting language, that can make your life (for example, finding the best NN ctructure) much easier.

Run the Cortex.exe. From the main menu select File - New NN File.

The program comes with three sample data file groups - genz.*, msft.* and eurusd.*. First two contain data for Genzyme and Microsoft stocks, the third one contains FOREX (Foreign exchange) quotes for conversion between US dollar and EURO.

From the NN point of view, there is no difference between stock market and FOREX, whatever you learn for one area, usually applies to the other.

Click the "..." button to open the data/stocks/genz.txt file.

Note that you can specify what are the start and end line patterns, and how many lines should we skip before and after the start line pattern. Use it if the data are in the middle of the text file (for example, the file has a header and a footer). For this example, leave the first field blank.

If you look inside the GENZ.TXT file, that you have received with the Cortex archive, you will notice that the last line has nothing to do with the stocks - it is some kind of a commercial. This is exactly the way it looked when I got this file from the Yahoo quote server. To deal with the problem (we do not want to feed THESE data to the program!), copy this last line, or at least its beginning, and paste it to the "End line" field of the Input dialog. Now the program will stop extracting the data, when it finds the string you provided.

Important note: the stock quote file that I have downloaded from the Internet contains newest data FIRST. The NN (as many other data analyzing packages) expects the newest data LAST. So we need to click the "Reverse" checkbox to make sure data arrays are reversed before we do the processing.

Also note that no mater if the "Reverse" is checked or not, the resulting file that the program will produce, will have records in the same order as the original file had. This way if you have some other program that can work with stock price file having new data at the beginning, it will also be able to work with whatever output we produce with Cortex. Also it is much less confusing, especially when you work with the sequence of files.

What that means? Lets say you have a GENZ.TXT file. You checked the "Reverse" box, and then (see below for details) you clicked "Generate LAG file". The resulting lag file will still be reversed. But if you select Date and Close, and click Chart, the program will load the data, and then reverse them.

Still, if you want, you can use the scripting language instead, it will give you the full control over the data.

Click the "Select fields...". The first (after we found the start pattern and skipped extra lines) line will be broken into the column names and presented in the list box for inputs and outputs.

Select "Adj. Close*" both for the input and output. We are going to use past values of the stock closing price, to predict future values.

By the way, "adj" means "adjusted, the file I have is adjusted for stock splits. Some data sources do not have this nice feature - what shall we do then?

One of the possible solutions is to use the Built-in scripting language to pre-process the file.

As we are trying to create a network to PREDICT the future values for the line (represented by data in genz.txt), we need to provide the input in the form of HISTORICAL PATTERNS - not only today's data, but yesterdays, and so on.

The reason we need it is simple. Can we predict the future value of the stock price by the current value ONLY? No. We need to know what the price was yesterday, and the day before yesterday - we need to know what is going on with this price.

The "Adj. Close*" is now selected in the list boxes. We are about to generate what is called a lag file. The idea of the lag file is to represent today's data in the same table, side by side with the data for yesterday and so on. Press the "lag file" button. You will have the file with .lgg extention containing something like:

No Close Close-1 Close-2 ...
10 5.200000 5.150000 5.180000 ...
11 5.150000 5.180000 5.120000 ...
12 5.180000 5.120000 5.100000 ...

As you can see, the first value in Close-1 column was removed, and the entire column moved up. For the Close-2, TWO first values were removed and so on. Therefore, each line of this new file contains data for the current day AND data for nine previous days.

Let's select the new inputs. Click on the "Select fields" again, and select "Adj. Close*-1", "Adj. Close*-2"... "Adj. Close*-9" as inputs and "Adj. Close*" as output. This way we will be using nine PREVIOUS days to predict the coming price.

Click on the "Network" tab.

As you can see, you can specify the number of layers, number of neurons in hidden layers (see Introduction to Neural Networks for details on what the elements of a Neural Net are), one of two activation functions (standard for almost any NN package), and stop criteria, if you want the learning process to stop automatically.

For this particular task let's select 7 neurons in the hidden layer.

Click on the "Processing" tab.

Here you can specify one of two ways of breaking the data to the "learning" and "testing" parts (see Introduction to Neural Networks for details). You can use first N records (patterns) as a "learning" material and the rest - as a "testing" data. Or you can randomly select N % of the data.

The random selection does not work with the prediction - it is called cheating ;) But it works well when you are trying to do a line fitting. So for this example we will choose the "First N records" option.

How do we know how many records we have in our .lgg file? We can open the file in a text editor and find out. Or we can click the button on the right from the data entry field. I got 1228 records, and I have decided to use 1000 of them for "learning", and the rest - for the "testing".

The "adjust range" combo box is important if there is a chance for our "test" data to get out from the range where the "learning" data are. To compensate, we can extend the range. Let's leave it at 1.0 as in our case the last 228 records are not out of range of the first 1000.

Click the "Learning" tab, select all check boxes and press Run. The Neural Network will begin the learning process. The number of epochs (how many times the entire data set was presented to the network), and the best (smallest) learning and testing errors will be displayed.

As the learning continues, the error (representing the difference between the actual output of the network and the desired output) is decreasing. When we decide that it is small enough (and we can always go back and continue the training) we click "Stop" and go to the "Apply" tab.

The "Apply" tab is an exact copy of a "Input" tab except for the "Chart" and "Apply" buttons. The functionality is different, however.

Click the "..." and open the .LGG file. Select same fields you used as the inputs and outputs.

When you press the "Apply" button, the file with the .apl extention is generated. It contains all data that the input contained, plus extra fields for the output, generated by the Neural Network.

Finally, switch to the "Output" tab, click the "..." and open the .APL file.

Select the No (record number) as the input and Close and NN:Close as outputs - we are going to plot the Close and Predicted Close together on the same chart, to be able to compare them visually.

Use the "Chart" button, to plot the desired output (Close) vs. the output, produced by the Neural Net.

The following image is produced by the undertrained Neural Net. The approximation is not very poor (for a one-day prediction). If you continue training, you will get better results.


To get fully enabled version of the Cortex, you need to register.

And do not forget about the navigation bar at the bottom of the page - it will take you to other pages, some of them using neural networks, and all of them facinating ;)


Free intros:

State of Power Tutorial

Hypnosis Tutorial

NLP Tutorial

Working with the Future Tutorial

Hypnotic Inductions

Working with Money

Working with Habits

Manipulation Tutorial


Karate online tutorial

Chi Gun online tutorial

Tai Chi 24 forms online tutorial

Tai Chi 40 forms online tutorial

Tai Chi 108 forms online tutorial

Tai Chi Chi Gun 18 forms online tutorial

Chi Gun (Dao In) Heart and Blood Vessels 8 forms online 
tutorial

Chi Gun (Dao In) Kidneys 8 forms online tutorial

Joints Gymnastics, Chi Gun warm-up online tutorial

Chi Gun tao of Dr. Shi online tutorial


Sore back treatment

Headache Relief Pressure Points Tutorial


Stock trading - technical analysis

Making a small profitable web site

Neural Networks

Flow Charts and decision trees for web sites and 
presentations

Another powerfull Flow Charts Designer

Site Downloader

Thumbnails Generator

Calendar Creator

Touch Typing


Photo gallery


Jewelry: Pearl. How to choose, price estimation,
					take care, history, legends, classification Pearl. How to choose, price estimation, take care, history, 
legends, classification Artifficial Pearl. Links to: How to choose pearl, estimate price, 
take care, history, legends, classification Buying Pearl. Links to: How to choose, estimate price, take care, 
history, legends, classification Jewelry: Pearl. Taking care. Links to: How to choose, estimate 
price, history, legends, classification Jewelry: Classification of Pearl. Links to: How to choose, 
estimate price, take care, history, legends Jewelry: Cultivated Pearl. Links to: How to choose, estimate 
price, take care, history, legends, classification Jewelry: Pearl. History and legends. Links to: How to choose, 
estimate price, take care, classification Jewelry: Pearl. Price estimation. Links to: How to choose, take 
care, history, legends, classification Jewelry: Pearl. What is it? Links to: How to choose, estimate 
price, take care, history, legends, classification


NLP, Hypnosis, Power, Manipulation Tai Chi, Chi Gun Neural Networks
Joints Gymnastics Photo album generator
Habit Management Karate tutorial Flow charts for Presentations and Web

Sore back treatment Calendar Creator
Building a small profitable site
Another powerfull Flow Charts Designer
Profitable web site in 9 days Web programming : Perl, XML Site Downloader
Web positioning Shareware Directory


Touch Typing
Stock and FOREX Trading Stock Photo Gallery

Links Home


Neural Networks
Neural networks are modelled after the brain (not necessarily a human brain) and provide the learning algorythm that does not require any knowkedges of the formulas for the process being researched, instead, it is based on the familiarity and pattern recognition.

data mining
The neural networks have unique ability to extract the relevant information from the noisy and incomplete data. In terms of machine learning, it is a valuable feature.

machine learning
The machine learning using the neural networks consists of two stages (repeated many times). First, we present the system with the input data and obtain the output. Second, we adjust the system, to make output closer to what it should be.
The first stage is refered as feedforward, the second - as a backpropagation.

neural net methodology
On this site you will find free tutorial, covering basics of the Feedforward Backpropagation neural networks.

knowledge discovery
Knowledge based algorythms are often considered as something opposite to the data based algorythms. However, the Neural Networks are both - they store the information, as a internal structure of a network, making possible to recognize the patterns, including those, that the system never seen before.

speech recognition neural networks
The recognition of speech is an example of the problem that neural networks can solve. The patterns are noisy, they are different from time to time and from person to person, and they are not presented in a form that can be used by algorythm based programs.

Stock market neurals network
There are endless discussions on stock market prediction using neural networks, and the argument are pretty much the same as in discussions about the technical analysis in general.
Neural networks can be used to predict the stock price, to a reasonable extent, they are valuab;e part of modern automated trading systems.

neural networks extrapolation
Neural Networks can work with the data they never seen before, and therefore, can be used for extrapolation. The problem appears when the data go outside the range for which the network was trained. There are tips, described in neural networks introduction to handle this problem.

neural networks stock prediction
The Cortex neural networks software that you can download from this site comes with the network trained to predict the price of a stock.
Usually, this kind of networks are working well only for limited time range, and have to re re-trained to handle new data.

neural networks download
Download the Cortex neural networks software from this site.

free neural networks software
The Cortex neural networks software is feature limited, however you can use even a free version to solve many practical tasks.

neural networks introduction
A free introduction to neural networks is available on this site. It explains the algorythm of the so called Feedforward Backpropagation networks, the most commonly used and probably the most powerfull.

tutorial on neural networks
On this site you will find both the tutorial on the neural nets and the user guide for the Cortex program, the easy to use and powerfull neural networks software.

neural networks book
Check out our list of recommended books of Neural Networks and related subjects of data mining.

neural network course
The Introduction to Neural Networks, available from this site, is a good (and free) start, if you want to learn the algorythms of Feedforward Backpropagation neural networks.

Feedforward
The word Feedforward stands for the first stage of the Neural Network learning process, when the system is presented with the input data.

Backpropagation
The word Backpropagation stands for the second stage of the Neural Network learning process, when the system is adjusted, to make its output closer to what it should be.

network neural type
There are few types of Neural Networks and many variations of the types. On this site you will find the information and software on Feedforward Backpropagation Neural Networks.

neural network free software
Download and try the Cortex program, the easy to use and powerfull neural networks software.

invest network neural
The neural networks are used in the investment analysis, particularly in the stock prediction. The Neural Networks tutorial, available from this site, has an example of such a network.


fuzzy network neural
Fuzzy logic deals with the rules taht are flexible or not constant. That is exactly how the Neural Network works, by recognizing "fuzzy", noisy or incomplete data.

stock market neural network
The Cortex neural networks software works with stock data as with any other data. The Trader stock trading simulator can use these neural networks to generate trading signals.

feed forward network neural
The Feedforward stage of Neural Network algorythm takes the input data and presents it to the first layer of the neurons. The output of the first layer is presented to the second layer, and so on.

trend data mining
Knowing the current trend provides us with some ability to predict the future price change. It is possible to use Neural Networks for this task. Alternatively, check out the Trader stock trading simulator.

basics data mining
Using some kind of tools to extract data, satisfying to some criteria, from the large amount of raw data.

stock data mining
Using the Neural Networks you can detect tendencies in a stock price, even if they are small or hidden. It requires some work on the side of data preparation.

data knowledge mining
The Neural Networks can be used to filter the data, in order to extract the relevant data.

advantage data mining
See the list of recommended books

neural network book
See the list of recommended books for a list of the most relevant books on Neural Networks and related totics.

neural network tool box
The Cortex neural networks software provides you with the easy to use interface, allowing to create, teach and use the Neural Networks with your data.

neural network financial
The algorythm can be used in any area, where the data can be presented in a tabular form.

data mining article
See the list of recommended books

data mining neural network
As the computer systems become faster, the value of the NN as the data mining tool will only increase.

future neural network
The ability ot the Neural Networks to predict the future is limeted, as one can expect, to the common sence. For example, if the way the market is treating the stock changes, the old network may become useless, and a new one will have to be trained, using new data.

data mining case study
See the list of recommended books for the data mining tutorials and case studies.

algorithm backpropagation
During the Backpropagation stage of the neural network training, the output layer of neurons is adjusted, to make the output closer to what it need to be. Then the layer before is adjusted, based on the adjusted last layer and so on.

application data mining
The Cortex neural networks software can be used to create the neural networks, that can become part of the custom data mining tools.

data mining example
See the list of recommended books for the data mining tutorials and examples.

neural network artificial intelligence
Neural Networks are considered important step in our understanding of the way human brain works.

data mining papers
As large amounts of data are usually processed during the data mining, the neural networks applications may become the bottle neck. The hardware is available to make it fast, as a mater of fact, hardware based NN are fast enough for almost any task.

network neural programming
The software that you find on this site allows seamless neural network programming, it includes both creating neural networks and teaching them using the feedforward backpropagation algorythm.

stock neural network
One of the most demanded areas of the neural networks prediction is predicting stock prices, as this task is one of the most difficult to formalize, and neural networks do not require the formal task description.

fuzzy network neural
To some extent, neural networks DO implement fuzzy logic, as they can produce results, that are close to correct ones, based on samples, that are close to familiar ones.

boosting data mining
Data mining can be boosted, in some cases, by applying neural network algorythms. It may involve predicting optimal ways to a place, where the information is located, rather than brutal search, however, this approach shouls be used with caution, as with neural networks, there is always a risk of finding a local minimum solution, instead of a global one.

neural network free software
On this site, you will find a feature-limited free trial version of the software.

stock market neural network
Stock market predictions are not as easy, as people usually think. One of the most important reasons for this to be true is the way data are organized. Generally, we need to know exactly what we use as an input and what we are expecting as an output, rather than feeding the network the raw data, hoping to get meaningfull results.

invest network neural
Before investing your time in the solution, based on neural networks, do a homework to figure out, what the exact nature of a task is. The nn can do anything, but WHAT to do - this is a human's decision.

data decision mining tree
As in any decision making process, there may be a way to speed up the data decision tree crawling, by applying the neural network algorythms.

bots data mining
As for the data mining bots, the use of neural networks is limited, if any. There is, of course, always a chance of adopting a new technology in a new way.

data mining benefit
The main benefit of data mining approach is in reducing the dimension of a task, making it more manageable, and less complex. Often, most important moving forces are hidden behind the scene, and neural networks are very good in finding them.

data mining resume
What is he data mining? Looking up for the relevant information in a large multidimentional data continuum, with little, if any, advance knowlege of the dependencies the data have.

neural network financial
Financial area is one where neural computations are used heavily. There are many areas where they provide signifficant help, and some areas, where they are the only solution.

neural network book
There are many books on the general neural networks theory available at Amazon, as well as few articles on this site, both general-purpose basic introductions, and specialized ones.

data mining article
There are many data mining articles and books, available in the Internet.

data mining neural network
The importance of neural networks in data mining is in their ability to find non-evident dependencies, thereby reducing dimension and increasing the quality of an answer.

data mining storage
As data mining storage, the object databases of hypercubes are often used.

data mining job
Neural networks can be used as a part of a data mining software. Their job in this tast may differ from identifiying binary or stored in tables data patterns, to suggesting the most promicing approach to a search.

data data mining mining
As a data mining algorythm per se, neural computations are just a tool. Using it depends on the person, specifying the mining algorythms.

data mining case study
To get a better idea of possible scenarios of data mining usage, we suggest performing the search in the Internet.

data mining warehouse
Data mining warehouses often use their own software, optimized, depending of the task it performs. For example, in face recognition, neural networks can be used, as a low level algorythm, while the generic database is used to store and maintain records.

algorithm backpropagation
Backpropagation algorythm is one of the most promicing. It uses the data pattern (so called supervised learning) to compute the signal (during the feedforward part of the learning), and then uses the error, to adjust the weights of the neurons (during the backpropagation part).

data mining concept
The overall concept of the data mining is based on the assumption, that the multi dimensional data continuum can be cross-cut by the (again - multi dimensional) surface, and that the intersection will contain a result we are after.

neural stock
As a demonstration of the complexity of the stock trading using neural networks, we provided, on this site, a simple article, that is attempting to do a small case study, examining the pitfalls of the task, as they arrive.

application data mining
"Cortex", the neural networks package, may, to some extent, be considered as a data mining tool.

data mining definition
Data mining requires the search (mining) algorythm to be provided, without such definition, it will not be usefull. Here, you will find a small article about stock price prediction. We start with a simple (and incorrect) task, and arrive to a more or less correct one.

data mining example
In that example (see the previous paragraph), it is interesting to mention, that in order to solve the problem, we had to re-state it. Indeed, we do not care about the stock price, we need trading signals instead!

neural network artificial intelligence
Some most promicing solutions in the area of artifficial intelligence use neural networks. This is not surprising, as the very idea of neural networks is copied from the structure of brain.

data mining papers, data mining sas
Data mining information is available online, both as whitepapers, articles and reviews.

fuzzy neural system
Neural networks do implement some kind of the fuzzy logic, though it is not the fuzzy logic as it is formally defined.

classification data mining
Classification is another area, where neural networks shine. It is possible to write both supervised classification software, for example, using feedforward backpropagation algorythms, and not-superwised automatic classification, where the network will break the data into the cetegories.

neural network for pattern recognition
Pattern recognition is one of the most important areas of neural networks application. The pattern may be provided as a text or binary (sound, image) sequence, and similarity between it and previously seen patterns used for classification.

data mining tutorial
This site is not intended as the data mining tutorial, except for a small subset, related to neural networks. You can find all the necessary information in the Internet.

neural network tutorial
On this site, you will find few tutorials, covering different aspects of the neural computations. First, these are introductions, and second, in-depth stock and FOREX trading.

data mining training
The most important - and the most confusing - part of the data mining using neural networks, is not in thaining itself, but in defining the algorythms, inputs and outputs, as well as finding the inner logic in data.

introduction to neural network
The articles on this site may be used as a good basic introduction to neural network computations.

data mining multimedia
When data mining is performed on a database, using the criteria that are not part of the index, neural networks can be used to do a recognition task. It is particularly true with analog, multimedia records.

introduction data mining
For an introductory data mining information, the best source is probably the Amazon book collection.

data mining on the web
To perform data mining on the web, we can use so called bots. Collected information can then be treated as any database, and data mining applies, as always. Also, the neural networks may be used to figure out ways of accelerating the web crawling.

neural network computer
To perform neural network computation faster, high degree of parallelism is required, ideally, every neuron should have its own thread. To implement it, special hardware exists, called neuristors.

data mining internet
The Internet is a very promicing media for data mining. As the mater of fact, the very nature of the Internet, created by people, and therefore, structured according to some intelligent logic, allows us to look for hidden important dependencies in it. For example, Google uses this approach to find "true meaning" of words and even phrases.

data mining conference
There are many, happening online and offline.

data mining course
There are many, happening online and offline.

neural network hardware
As was mentioned above, some very fast chips are available for neural computations.

matlab neural network
Matlab is one of the general purpose applications, that inclused neural networks block.

data mining data warehouse
Data warehouse software (used for data mining against large data arrays) is available off-the-shelf (do an online research).

business intelligence data mining
The term "business intelligence" is not strict enough. The data mininng can be performed to improve business, and yes, neural networks can be part of it.