### Target normalization: ‘RUT next day direction only’ forecast

In this post we define the task of ANN as a classification task. In contrast to the general function approximation task. The **training data contains only the direction** of the move. The target is -1 if the next day was a down day and +1 if it was an up day. (zero, at no movement, but that is rarely possible). The target is therefore

`nnTarget = sign(nextDay%gain); `

However, as we proved in the previous post for a mathematical case, the performance of the ANN depends very much on that the target is scaled into a proper range or not. We experiment with it. Our target is therefore:

`nnTarget = sign(nextDay%gain)*Multiplier; `

where the multiplier is from 0.0001 to 10,000. See the image for details.

As usual, we emphasize that the ANN is non deterministic. Therefore we perform 4 separate experiments per Multiplier.

Parameters:

`nNeurons = 2;`

nEnsembleMembers = 10;

nEpoch = 4;

lookbackWindowSize = 200;

We doesn’t decimate outliers, because the %gains are replaced by only the sign.

However, in theory, there would be a strong point for outliers removal. We had a theory that when the market swings more than 4% in a day, there is something serious going on that cannot be explained by our model. Our model is that the %gain depends on only the day of the week. In these environment, we shouldn’t use the data for training.

In hindsight, we should remove outliers. But we have already made the experiments, and it took 2 nights to run, so we will not repeat them.

Let’s see the performance measurements:

We are pleased with the result. This is what we expected. The prediction power of the ANN is best if the multiplier is +1, that is the range of the target is between -1 and +1.

Note that even if Matlab in theory automatically scales our target to -1..+1 by its mapminmax, we should scale it ourselves and we shouldn’t rely on the automatic Matlab mechanism that is buggy. (see our previous 2 posts.)

Conclusion: **In our previous studies, we used the target as the %gain of the next day.** For example **the +1% gain was represented as 0.01.** So, if we consider 4% outlier removal, our effective range was -0.04.. +0.04. According to the experiment of this post, **it is not optimal.** We should apply a multiplier of about x25 to the %gain target to **scale them up into the -1..+1 range.** We will do this experiment in the next post.

Filed under: Uncategorized | Leave a Comment

## No Responses Yet to “Target normalization: ‘RUT next day direction only’ forecast”