Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am programming a neural network and I need to use some data to train it. I am following the steps of an experiment which tried to predict direction of stock price index movement using neural networks.

I now have my own historical data set and I have gathered statistics about price movement as in Table 1 of this experiment.

However, I do not know how to create a subset of data the same way they did.

The research data used in this study is the direction of daily closing price movement in the ISE National 100 Index. The entire data set covers the period from January 2, 1997 to December 31, 2007. The total number of cases is 2733 trading days. The number of cases with increasing direction is 1440 while the number of cases with decreasing direction is 1293. That is, 52.7% of the all cases have an increasing direction and 47.3% of the all cases have a decreasing direction. [...] The first subset was used to determine efficient parameter values for evaluated ANN and SVM models. This data set is called ‘‘parameter setting data set’’ and used in the preliminary experiments. The parameter setting data set is consisted of approximately 20% of the entire data set and is proportional to the number of increases and decreases for each year in the entire data set.

My data looks like this:

Example data

from 2004 to 2012.

And for instance I have the following stats about its repartition for 2004:

2004 stats

I want to create the subset for 2004, so I need to select 20% of the data, which means 52 values with 27 values increasing and 25 values decreasing.

How should I create this subset?

Should I pick values randomly or should I pick values following each others ?

share|cite|improve this question
If your neural network will be using data that comes sequentially, you should train it on sequential data. – Jonathan Christensen Jan 3 '13 at 23:01
Ok thanks. I did as you said and tried to select subset of data with the most sequential data – alexandrekow Jan 8 '13 at 23:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.