The ongoing development of deep learning or machine learning techniques makes time series prediction more precise. This technology has also achieved remarkable success in predicting the return of portfolio in the financial field, which means that the quantitative investment method continues to progress and shows strong applicability, and investors can obtain excess benefits in the market. This study seeks to anticipate portfolio return using deep learning and machine learning and compare and analyze the differences between them. This paper selects the stock data of six representative companies in various fields and calculates the maximum sharp ratio portfolio and then forecasts the return of the portfolio with ARIMA model and LSTM model respectively. The result indicates that, firstly, ARIMA model and LSTM model can be well applied to predict the future return of portfolio; Secondly, ARIMA model performs better in short-term prediction and stable data prediction. When it comes to long-term prediction, the LSTM model performs better. The research results may be useful for investors to choose appropriate time series models for portfolio prediction and analysis.