Nowadays, investment is becoming increasingly common. Under the globalization of the economy, investors are given more investment opportunities and choices. Investors need to select excellent assets and allocate the selected asset portfolio on weight during the investment process. The mean-variance model proposed by Markowitz plays an important guiding role in investment and risk management. This model can effectively evaluate investors portfolio risk and return decisions and significantly impact their decision-making choices. This study uses the data of the annual average return and variance from 11 risky assets and 1 risk-free asset in about 20 years to construct an investment portfolio in a fixed group based on the Markowitz Model. The study calculates the changes in the allocation of the maximum Sharpe ratio and the minimum variance portfolios under three different constraints and one condition with the addition of risk-free assets, respectively, and then analyzes changes in the outcome of data. The capital allocation lines are introduced to analyze the outcome of an investment portfolio with risk-free assets. Compared with the changes from three constraints, reasons are explained why these changes happen under three constraints. Then, the above limitations are taken as a premise, and the study proposes recommendations for the optimal investment portfolio selection for different investors according to the investment cycle, the preference of investors based on the situation of different investors, and market constraints. The study guides investors future investment decisions.