This paper studies the cognitive biases of investors and the factors that influence investors' behavior. We constructed an assets allocation model to deal with investors' preferences. Empirical results indicate that the more risk averse an individual is, the higher his investment in risk-free assets will be. Returns of portfolios on efficient frontier are positively related to their VAR. This suggests that when trying to build high-return portfolios, investors can use VAR to control and manage portfolio risks. Investors who prefer electronics stocks should all the more pay attention to risk management. Thus, the investor who prefers electronic industry stocks can use VAR to manage portfolio risk. The narrow framing effect will keep investor's portfolio unchanged when the economic state was changing. To avoid being exposed to excessive levels of risk, investors should divest towards fixed-income securities and reduce their position on electronics industry stocks during periods of recession.