Traditional stock forecasting methods are generally based on linear models. However, the price of stocks is affected by a variety of objective factors and does not present a simple linear relationship. Neural network is a good tool for predicting nonlinear data. In order to predict the trend of stock price more accurately, we use neural network prediction method on TensorFlow to consider the nonlinear factors affecting the price of stocks, forecast future data based on past data, and use historical transaction records of stocks to analyze and forecast future prices. In this model, historical data such as technical indicators and fundamental indicators are used as input variables, and deep learning and quantitative investment algorithms with multiple indicators are used to predict the rise and fall trend of stock prices after several days, and build an investment portfolio based on the predicted results. The results show that the correct rate of trend prediction is 83.5%, which has a good prediction effect.