Support MarketTrak, Visit Our Advertisers

 Here is an overview of our forecast model



What is this page about
Our stock market forecast system consists of two major parts: a forecast model and a trading model. The forecast model is run first and its output is fed into the trading model. It is the trading model that tells us how to trade using the forecasts. The purpose of this document is to give a brief overview of the inner workings of our forecast model. A link to a discussion of trading model is given below. We will not say much more about it here.

http://www.markettrak.com/trading.html

Table of Contents:
  Introduction - the holy grail
  What do we forecast
  The forecast model and the ANO
  How is the UP probability computed
  Expected average daily yield
  Forecast the SP500 or the NASDAQ averages
  A final word
Advertisement

Introduction - the holy grail
Wouldn't it be great to have a model that would tell you with 100 percent certainty that the market will be going in a certain direction over some specified time period? If we had such a thing, we would use it to buy before the market goes up and sell before the market goes down. There would be virtually no risk in being in or out of the market. Profits would just keep rolling in. The quest to find such a model has been attempted by many but without success. The reasons lie in the inherent randomness of the market and something called market efficiency. What this all means is that the signal that foretells the market direction is buried deep in the noise of normal trading and the signal varies in intensity over time. For a model to be successful, two conditions must be met. First, you must resolve (find) this signal, and second, you must be able to analyze it. Resolution is achieved by accounting for the statistical fluctuations in the market variables that we measure. The analysis is possible because of the fidelity and complexity of the modeling technique. We have managed to develop a forecast model that is far from perfect but does reasonably good job meeting these two requirements. We use this model in conjunction with our trading model and have found the combination to be profitable.

Table of Contents

What do we forecast
We have developed a mathematical model that forecasts the direction, specifically the slope, of the Dow Jones Industrial Average (DJIA) over the next 15 trading days (usually three weeks). The slope is defined in terms of closing DJIA values. We include the latest known DJIA value in the slope calculation, so the forecast model actually predicts the slope of a line drawn through 16 DJIA values, 15 of which are values in the future. We will discuss this forecast in more detail below, but now let's show an example of what we mean by the slope. Consider the 16 DJIA closing data values shown in the graph below:

We have drawn a (blue) line through the 16 points such that the sum of the squares of the distance from each data point to the line is a minimum value. This process is called a least-squares analysis. From the resulting equation for the line, which is shown in the figure, we quickly determine that the slope of this line is a positive 13.765. A positive value of the slope means that the line is pointed upward in time. A negative value of the slope means that the line is pointed downward.

When the slope is positive, the market will generally trend upward. Likewise, when the slope is negative, the market will generally trend downward. It is noteworthy that the market can dip, as it does between days 3 and 8 in the chart above, and still have the positive forward slope measured at day zero. The model cannot resolve cycles less than about 10 days.

We express the slope in fractional form by dividing the actual slope by the closing DJIA value on the day the forecast was made (day zero in the graph above). What is actually being forecasted by our model is this fractional slope. The value of the fractional slope is approximately equal to the expected average daily fractional change in the DJIA over the next 15 trading days. For the line in the figure above, the fractional slope would be equal to 13.765 divided by 9275, or 0.001484.

You can use the value of the fractional forward slope to estimate the expected change in the DJIA. Let's consider two examples. Suppose the fractional slope has a value of positive 0.001. If the DJIA has a value of say 10000, then the expected average daily change in the DJIA is equal to 10000 times 0.001, or 10 points. This means that over the next fifteen trading days the DJIA should increase by about 150 points. If the fractional slope were equal to minus 0.002, then the expected average daily change would be minus 20 points and the DJIA should decrease in value by about 300 points over the next 15 trading days.

Table of Contents

The forecast model and the ANO
We use a neural network model in combination with a genetic algorithm to calculate a DJIA forecast. The calculations are somewhat complex but can be summarized by the following three procedural steps. Step one: the genetic algorithm is used to find the optimum neural network structures and inputs. This calculation basically determines how the networks will be wired. Step two: using the information from the first step, a set of networks is initialized and then trained on about 75 percent of the market data (in-sample) in our database, which currently consists of about 5500 days of data. We use an evolutionary program to train the networks (i.e. to determine the neural network weights). You should think of training as the process of teaching the networks to predict the fractional forward slope of the DJIA. Step three: after training, the networks are rigorously tested on the remaining 25 percent of market data (out-of-sample). Networks that fail the test are discarded. Networks that pass the test are included in the library that we use to calculate our forecast. The number of neural networks currently in our library varies from day to day, but normally contains more than 400.

Input to the networks are technical and fundamental market data. The table below shows the data types that are currently used by the model:

DJIA closing value DJIA theoretical high value
DJIA theoretical low value DJTA closing value
DJUA closing value NYSE total volume
NYSE advancing issues number NYSE declining issues number
NYSE new highs number NYSE new lows number
NYSE advancing volume NYSE declining volume
SP500 closing value SP500 trailing earnings
Yen-dollar exchange rate TBILL discount rate

The above data are filtered and normalized and certain functions of the data are computed. We currently compute 40 separate input variables. The output of the networks is a prediction of the forward (fractional) slope of the DJIA.

In the training process, we try to make the network output value match the actual forward fractional DJIA slope. Once the networks are trained, we can then apply the latest market data to each of the networks in our library and compute the network outputs for today. We compute an average of these outputs and their standard deviation. This average network output (ANO) and standard deviation are then used to determine the forecast that we show on our forecast page.

Table of Contents

How the UP probability is computed
In the figure below, we show the actual fractional forward slope plotted against the computed ANO. The actual slope was computed in the manner discussed above for closing DJIA values starting at the point in time the ANO was computed. Ideally, the ANO should equal the actual fractional forward slope. The difference between the two represents forecast error.

 

The plot shows that for large positive values of the ANO the actual slopes were mostly positive. Also, for large negative ANO values the actual slopes were mostly negative. Our model did very good at the extremes. For values of ANO near zero, our model was not so decisive. The blue line in this figure was determined from a least-squares analysis of this data. The correlation coefficient was found to be 0.71 .

Given the ANO value and the standard deviation of the ANO, we can compute the probably that the actual forward slope will be positive. To do that, we go to the figure above and move one standard deviation above and one standard deviation below this computed ANO point and count the number of positive actual slopes and the number of negative actual slopes that lie between these two limits. The probability that the slope will be positive is then equal to the number of positive slopes divided by the sum of these two quantities, times 100. If this probability is greater than 50 percent, we would expect the market to trend higher and we would then forecast UP. If this probability is less than 50 percent, we forecast DOWN.

The figure below illustrates this calculation. Suppose the ANO is equal to 0.003 and the standard deviation is equal to 0.0005.

The two green lines in the figure above are positioned as described. We then count the number of positive actual slopes (points above the red line) and the number of negative actual slopes (points below the red line). Suppose these numbers are 500 and 100, respectively. The UP probability then becomes

UP probability = 100.0 * 500 / (500 + 100) = 83.33 percent

We would then show on our forecast web page an UP forecast with a probability of 83 percent. The down probability would be 17 percent. We would classify a forecast as being STRONG when the dominant probability is above 85 percent.

If you are using our trading model, you will note that the trading position rules are based on the ANO value and not this UP probability. This is because the ANO is more sensitive to small changes in market conditions.

Table of Contents

Expected average daily yield
We can also compute the expected average daily yield by summing the positive and negative slopes between the two limits and then dividing this sum by the number of slopes found. The result is multiplied by 100 to make it a percent. We also compute the standard deviation of the expected yield. We show these two values on our forecast page. Because of the way we define the slope, the yield is the expected average percent change of the DJIA per trading day.

Forecast the SP500 or the NASDAQ averages
The DJIA is a good estimator of many of the other indices. It mimics the SP500 very well and the NASDAQ index reasonability well. The chart below illustrates their relationships.

Table of Contents

A final word
We add market data to our database daily. We also make improvements to our model. Through this development, we often see that forecast errors made in the past are corrected in the learning process. As a consequence, we see a continuous improvement in our forecast accuracy and in the correlation between the actual forward slope and the ANO. Our forecasts will never be 100 percent accurate and this fact needs to be factored into your investment strategies. Nevertheless, the quest for the holy grail continues, even though we know that it will never be found.

Click here to learn about our trading model.

Contact us should you have any questions, suggestions, or comments.

Go to our home web page.




 

Copyright © 1996-2008 MarketTrak LLC.  All Rights Reserved.