There is not yet reliable software for stock prediction, because most experts of this area have been trying to predict an exact stock index. Considering that the fluctuation of a stock index usually is no more than 1% in a day, the error between the forecasted and the actual values should be no more than 0.5%. It is too difficult to realize. However, forecasting whether a stock index will rise or fall does not need to be so exact a numerical value. A few scholars noted the fact, but their systems do not yet work very well because different periods of a stock have different inherent laws. So, we should not depend on a single model or a set of parameters to solve the problem. In this paper, we developed a data-divider to divide a set of historical stock data into two parts according to rising period and falling period, training, respectively, two neural networks optimized by a GA. Above all, the data-divider enables us to avoid the most difficult problem, the effect of unexpected news, which could hardly be predicted. Experiments show that the accuracy of our method increases 20% compared to those of traditional methods.