Since the fifties of the last century, the concept of portfolio management is proposed to enrich the portfolio theory by Markowitz et al., as well as the improvement of portfolio theory by later generations, forming a modern portfolio management theory. This paper uses Markowitz's mean variance portfolio theory to perform a portfolio return maximization analysis on selected assets with assumptions that investors are risk-averse according to mean variance theory. Based on mean variance portfolio theory, as well as Python computational simulation modeling, Monte Carlo simulation is used to find the effective set and effective frontier of the portfolio, and the optimal solution of the portfolio is filtered according to the two constraints of maximum Sharpe ratio and minimum volatility. According to the analysis, the portfolio return of the maximum Sharpe ratio is relatively high, and the maximum Sharpe ratio combination is more worthwhile than the minimum volatility combination. Overall, these results provide enlightenment for further exploration and implementation of portfolio theory.