This article analyzes models for forming an optimal investment portfolio, specifically Markowitz's optimal portfolio theory and the CAPM (Capital Asset Pricing Model). In the analysis section, a portfolio was constructed and examined based on data from 15 joint-stock companies operating in Uzbekistan, using stock price data from the last five years. Additionally, insights from various economists such as William Sharpe, Kan, and Zhou are presented. The beta coefficient between the UCI market index and the expected return of the portfolio was calculated, and the expected return of the portfolio, as well as the efficient frontier, was determined using CAPM. The article concludes with general findings and recommendations.