Portfolio construction is extremely essential for the trading of stocks construct an optimal portfolio is one of the frequently asked questions in the financial sector as it is directly related to the profits of investors. While some people use financial theory only in their investments and do not combine it with mathematical methods. So, we explore how to construct an optimal portfolio through financial and mathematical models and theories based on the analysis of stock prices of some Chinese companies in the past year. We find that the stock of Xi'an Catering Co., Ltd and Joyvio Group Limited is extremely attractive for us, at 91 percent and 6 percent of our cash invested respectively. The Sharpe ratio is 0.09948, which means the reward of unit risk is 0.09948. So, we need to invest more in stocks with higher expected returns compared to others. Because it could bring more profits for us. Usually, the companies with an increased stock price during a period will satisfy the requirements as they have better development potential. Our study can also be improved by using the Fama-French three factors model and Machine learning.