In this paper, the Shanghai Stock Exchange Index is used as the training data, and the time series prediction method is used. First, detect the stationarity of the Shanghai Stock Exchange Index time series data, and then the time series which do not satisfy the stationarity are processed by difference method. After that, establish an ARIMA model, where the figure of ACF and PACF offers the probable values of parameter and the parameter is chosen through AIC and BIC the minimum criterion, to further fit historical stock data. Eventually, through training, the predicted values are divided into long-term, medium-term and short-term forecasts which are compared together so as to conduct segment forecast. Experimental results show that the ARIMA model can extract historical stock information well, can make short-term forecast for stock trend, and has certain reference value for enterprises, investors or market regulators.