In principal component analysis, data logarithm transformation and row vector centralization improvement are carried out, reducing the input, and simplifying the network model. Use sparrow search algorithm for optimization, and compare the performance with cuckoo algorithm, seagull algorithm, and whale algorithm. To avoid problems as slow convergence speed and insufficient exploration ability, an improved sparrow search algorithm integrating refraction inverse learning mechanism, sin-cosine and Cauchy variation is proposed, a high-precision PCA-SCSSA-Elman neural network prediction model is established. The results show that SSA-Elman neural network has the fastest convergence speed and the optimal performance value is 0.1391 higher. Combined with the extracted principal component data, compared with PCA-Elman, PCA-SSA-Elman and PCA-SineSSA-Elman prediction models, the mean absolute error is higher than the other three models [45.6850%, 14.9168%, 11.7448%], the prediction error is minimal. The results show that the improved sparrow search algorithm can significantly improve the convergence speed and optimization accuracy.