The timing deep belief network model (T-DBN) is proposed to solve the problems of gradient dispersion, local minimum, poor long-term prediction performance of nonlinear time series prediction and high complexity of high-dimensional sequence data in traditional computer neural networks. In the pre-training stage, the improved greedy pre-training algorithm is adopted. In the pre-training process, the gradient fixing parallel tempering (GFPT) algorithm is used to determine the depth of network by reconstruction error. In the stage of reverse adjustment, the quasi-newton method (BFGS) is adopted to obtain more accurate prediction performance. Combined with the theory of phase space reconstruction and BP (back propagation) neural network, the total power of agricultural machinery in Jiangxi province of China from 2016 to 2020 is predicted. For the highly nonlinear stock data, the characteristics of the Shanghai stock exchange index from 1990-12-20 to 2018-03-30 are extracted from the stock data of Tonghuashun software. T-DBN, DBN and long short-term memory (LSTM) models areused for stock forecasting with the prediction accuracy of 79.3%, 77.9% and 74.6%, respectively. The experimental results demonstrate the better prediction performance of T-DBN model in comparison with DBN and LSTM models.