The article is devoted to the demonstration and analysis of the possibilities of connecting the Markowitz model, which is a classical model for forming a portfolio of securities, and forecasting methods based on machine learning data. The relevance of the chosen topic is justified by the fact that the use of machine learning methods makes it possible to simplify the activities of financial sector workers and the work of professional stock market players, as well as reduce the complexity of interpreting mathematical models and methods of their construction for private investors. The purpose of this work is to use machine learning methods to solve the problem of building an optimal securities portfolio and predicting its behavior. Tasks: - build a Markowitz model based on the selected data; - to build an optimal portfolio based on the proposed optimality criterion; - offer a time series forecast; - to assess the adequacy of the constructed model; - combine the Markowitz model, which belongs to the class of widely known classical models, with the construction of a prediction based on machine learning. Methods and models: machine learning methods are used in the work, the Markowitz model is built based on the selected data, then the Markowitz model is combined with the construction of a forecast based on machine learning. Research results: the optimal portfolio for AXP has been built and its forecast has been fulfilled. The formation of the portfolio was based on the Markowitz model. The data obtained were tested for adequacy and showed fairly good results. A portfolio was built, the optimality criterion of which is the ratio of average profitability and volatility of profitability (maximizing average profitability while minimizing its volatility). The Markowitz model, which belongs to the class of widely known classical models, was combined with the construction of a prediction based on machine learning.