Long-Term Financial Predictions and other Things to do with the GGP Demo Version 1.2

Last update of this page: 10/5/2000

Run the default problem
Run your own problem (example: NASDAQ Predictions)

Run the default problem

The default problem is finding a solution of sin(3.1416x)/(3.1416x). When you start GGP, the program computes and displays this function. In the graphic window, you can watch the function and two intervals, the Extrapolation range and the Approximation range. GGP uses the data in the Approximation range for creating a basis that approximates the given data as precisely as possible. The Extrapolation range is used to check the quality of the extrapolation.

GGP creates a pool of basis functions that will be used for analyzing the given function. This takes some time. While creating the pool, some output is written on the Search info dialog.

Start the GGP search

Press the third button (two triangles) of the Actions dialog to start the GGP search.

GGP displays the approximation error, the extrapolation error, and the fitness value of the current solution and it displays the corresponding curve in the graphics window if it is better than all previous ones. First, all solutions are quite stupid and inaccurate, but after a while, GGP will find better solutions. 

Clear the window and redraw the function

You may clear the graphic window by pressing the first button (blue window) in the Actions dialog and redraw the given function by pressing the second button (pencil) in the Actions dialog without stopping the GGP search.

Stop the GGP search algorithm

You can stop the GGP search by pressing the 4th button (stop) on the Actions dialog whenever you want. However, when GGP is creating a new pool when you press this button, the number of basis functions in the pool is reduced, which might not be desired. To avoid a reduction of the pool size, don't press the stop button when GGP indicates (observe the Search info dialog) that it is updating the pool.

Resume the GGP search

Press the third button (two triangles) of the Actions dialog to resume the GGP search after you have stopped it.

Display best solution

Press the 5th button (winner) of the Actions dialog to display the best solution that has been found after you have stopped the GGP search.Before you press this button, it might be reasonable to clear the window and redraw the given function by pressing the first two buttons of the Actions dialog.

Display best solutions

During the search process, GGP saves the best 20 solutions and pools in files. Press the 6th button (hitlist) of the Actions dialog to display the best solutions that had been found and were stored in these files. Before you press this button, it might be reasonable to clear the window and redraw the given function by pressing the first two buttons of the Actions dialog. 

Note that some of the "best solutions" may be quite messy when you did not run the search for a sufficiently long time.

Exit GGP and inspect data files

Select Exit from the File menu to exit GGP. Note that GGP has created basis and pool files (GGPxxx.BAS and GGPxxx.POO, where xxx is a number). You can inspect these files with any text editor to obtain some information on the solutions that were found. GGPxxx.BAS with the highest number xxx contains the best solution that has been found.

Restart GGP

When you restart GGP by double clicking its icon, the GGP search might be much quicker because GGP takes advantage of the information contained in the basis and pool files. To avoid this, you can manually delete these files before you restart GGP. Instead of this, you can change the working directory (select properties of the GGP icon when you have created a shortcut).

Run your own problem

It is quite easy to define and solve your own problem with GGP. Unlike the full version, the Demo Version 1.2 of GGP has only one feature to import data defining a function to be analyzed. It can read Windows bitmap files. 

Save a bitmap found on the internet

For example, you might surf to BigCharts.com to obtain a chart of the NASDAQ ($COMPX) index. This might look as follows:

Right click the chart. A menu pops up. Select "Save picture as..." in this menu. The Save menu picture will pop up. Select "Bitmap (*.BMP)" in the "Save as type:" box and specify the desired file name and directory. Click the "Save" button.

Load a bitmap file into GGP

Now, start GGP and select "Open bitmap..." from the File menu as soon as GGP has initialized its pool. Navigate to the bitmap file you have saved and select it. Now, the GGP graphic window should display the chart. Note that the function to be analyzed is drawn with a single color, but there are other areas in the chart drawn with the same color that do not belong to the function. Fortunately, the corresponding pixels are outside the rectangular area that contains the function. Therefore, no manual editing of the bitmap is required.

Convert the bitmap data for the GGP analysis

GGP can analyze a function f(t) of a single variable t, provided that the function is known numerically in a finite set of points. If the function is given graphically by a bitmap, GGP can scan the bitmap and convert the bitmap data into a function f(t) to be analyzed. For doing that, GGP must know the color of the pixels that describe f(t) and a rectangular area that contains the function. 

To define the pixel color, move the mouse cursor exactly on a pixel with the desired color, i.e., on a pixel that belongs to the function. Click the first mouse button without moving the mouse.

To set the rectangular area and to start the bitmap conversion procedure, move the mouse cursor to the lower left corner of the rectangular area and press the first mouse button down. Don't release it before you have moved the mouse - otherwise GGP would register the current pixel color as the new color for the function scan. While keeping the button pressed, move the mouse cursor to the upper right corner of the rectangular scan area and release the mouse button. The scan procedure will start immediately. It might take some seconds, especially when the bitmap is big.

For checking the extrapolation capability of GGP, you can select a rectangular area that does not contain the entire function f(t). As a consequence, GGP will 'know' only a part of the data of the bitmap.

Note that the pixel information is not very precise, i.e., GGP 'knows' f(t) not very accurately. For good and reliable extrapolations, accuracy is very important. Because of the reduced accuracy, it makes not much sense to analyze all details of f(t). GGP therefore applies some smoothing and data reduction procedure.

Visualize the function to be analyzed

To visualize the function f(t) that can be analyzed by GGP, press the second button of the Actions menu. With standard color palette, GGP will draw a black curve that represents f(t).

When the black curve is far from what you expected, this can have the following reasons: 1) You have specified a wrong color number because you did not position the cursor exactly on the curve when clicking the first mouse button or because you clicked the first mouse button casually. In this case, you must set the color and the rectangular area once more. 2) You did not specify the rectangular area properly, for example, because you released the mouse button before the cursor was at the upper right corner. In this case, you must specify the rectangular area again. 3) There are pixels in the rectangular area that do not belong to the curve, i.e., f(t). In this case, you must manually remove the undesired pixels with a graphic program such as PaintBrush, Paint, PaintShop, etc. before you reload the bitmap file. 4) The curve to be analyzed is not drawn with a unique color in the bitmap file. In this case, you must manually process the bitmap file with a graphic program such as PaintBrush, Paint, PaintShop, etc. before you reload it.

Start the GGP search...

Press the third button (two triangles) of the Actions dialog to start the GGP search and proceed exactly as for the default problem.

Interpretation of the GGP results

GGP finds more and better solutions the longer you run it. The first solutions that are displayed are obviously useless and you should ignore them. For each solution you can see how well it matches the given data. The following picture shows what GGP found when the NASDAQ bitmap was analyzed.

Beside an obviously useless function, it found a bunch of functions that match the given data quite well. You can see mainly two types of such functions: 1) Functions that continue smoothly outside the rectangular search area. These functions have a value of approximately 4000 at the end of the search area, while the NASDAQ is considerably bigger (approximately 5000), i.e., you can expect a correction of the NASDAQ toward 4000 or even less (people usually exaggerate). 2) Functions that match the given data near the end of the search area much better. These functions crash down completely after a short time. This indicates that the NASDAQ went up much to quickly end of 1999 and begin of 2000. Of course, a complete crash is not realistic, but also these functions indicate that a strong correction is to be expected.

The following picture shows the GGP analysis some weeks later:

As you can see, the NASDAQ fell down to almost 3000. Now, all GGP extrapolations are within a relatively broad band and some of them oscillate. This indicates that there is some uncertainty in the prediction, but it seems that the correction that took place was too strong and that the NASDAQ will climb up to 5000 again within one year.

End of August 2000, the result of the GGP analysis of NASDAQ was the following:

Obviously, the NASDAQ is already back near 4000. Only one of the GGP predictions shows a down trend, some curves predict an almost constant value that would go up later, whereas most of the predictions are optimistic for the rest of the year 2000. At begin of October, NASDAQ was again below 3500, i.e., the optimistic predictions were wrong, whereas the pessimistic one was almost correct. Now, the GGP analysis shows a different picture:

As one can see, all predictions are now again in a rather narrow band and exhibit a weak down trend that ends in November or December.

Note that a logarithmic scale was used for the NASDAQ analysis. With a linear scale, most of the data would have a relatively small value. As a consequence, the inaccuracy of the bitmap conversion would be relatively high for these values and the GGP analysis would probably turn out to be much less reliable. Logarithmic scale is appropriate for most long-term predictions of curves that have some exponential growth.

You can also use GGP to analyze stock values rather than indices. Be careful with the interpretation! First of all, the shorter the period of time of your data, the higher the noise on them. For new companies, you usually don't have enough data. You should have at least a 5 year chart. Secondly, the charts of smaller companies exhibit more noise than those of big companies and even the biggest companies exhibit more noise than big indices such as the NASDAQ. Noise always reduces the reliability of predictions in a very drastic way. The full GGP version contains a feature for noise estimation, but up to now, I have not enough experience to estimate how much noise can be tolerated.

Back to Christian Hafner's home page