# selecting test data for neural networks

I have been working on a neural network based on certain technical indicators. As people familiar with neural networks would know after developing a hypothesis, the developer is also supposed to provide a set of data to learn from. Now if were a case of developing neural networks for spam fitering I would provided it with sets of spam and non spam data. But in my case how do I select the buy/sell point...do I just randomly select the entry points where can visually see the movement in price that I desire or is there a better approach?

-
I've been thinking about your question and wanted to ask for some clarification. Sorry if this sounds daft, but does your NN output buy/sell signals based on time relevant values of TAs? Or are you trying to forecast something? –  Armen Safieh-Garabedian Dec 18 '13 at 15:39
As I understand, you are using NN for classification purposes, that is your outputs are: buy, sell, no action. This is something NN's are not good at. They are mostly used for regression. Correct me if I'm wrong. –  sashkello Mar 15 at 23:56
I would make a customized training in such case - instead of minimizing error with respect to some training set, maximize the return. –  sashkello Mar 15 at 23:58

I just look at the future and decide what position I would have wanted.

If $price_{t+interval} > price_t$ + transaction costs then position = 1.

less than would be -1 and flat would be 0.

So now I would have a matrix of indicators and desired position at time t.

-
This would teach the neural network frequencies, but it needs to learn expected values. For example if you get 1€ with prob 99% and lose 1Mio.€ with prob. 1%, then the NN would still learn that its a good deal. Check this out: stats.stackexchange.com/a/44844 –  Anna Jan 14 at 18:04

Neural networks are a supervised machine learning algorithm. Unlike unsupervised machine learning, the key to supervised machine learning is the selection of input factors and explicit labeling of outputs.

Input factors have to be manually selected, such as your combination of technical / fundamental / statistical indicators. Outputs have to be explicitly labeled (buy / sell signals) based on your selected input factors.

For example, a super-simple example could be:

f1 = X day moving average crossing above Y day moving average

You would then create a training set using these factors and labeling your output:

f1 = 0, f2 = 0 --> hold

f1 = 1, f2 = 1 --> buy

f1 = 1, f2 = 0 --> buy

f1 = 1, f2 = 1 --> sell

Then train your NN network against this training set. Once the NN is trained, you should run the NN set on an out-of-sample test set to evaluate the performance of the NN.

-