In the financial field, portfolio management is an important measure in the direction of investment or hedging. This paper mainly focuses on the optimization for the portfolio composed of assets from five industries, which is education, banking, automobile manufacturing, parts industry and e-commerce, and considers the allocation of assets to optimize the returns. In this paper, five representative assets from these five industries are selected. The Markowitz efficient frontier is plotted by Monte-Carlo method, using the return data of assets. Then the portfolio is optimized by mean-variance analysis and the maximum Sharpe ratio portfolio as well as minimum variance portfolio can be calculated. Finally, this paper analyzes the performance of the two portfolios, considering the influence of individual assets on the portfolio weight, and uses the Fama-French three factor model to analyze the performance of the portfolio. The results show that PTAIY and PSO from parts manufacturing and education occupy a large proportion in the maximum Sharpe ratio portfolio as well as the minimum variance portfolio. The findings could help investors interested in these five areas.