Significant changes observed in the global economy and in particular in Ukraine in recent years have significantly increased interest in the problems of investment theory. An example of this is the intensification of trading in shares of large and medium-sized international companies and cryptocurrencies, which causes a rapid increase in their values. It is known that in the theory of investments, the task of optimizing the set of components of investment portfolios is considered as a special case. As you know, the issue of decision-making regarding the formation and optimization of an investment portfolio is in the field of attention both for large investment companies and for private investors, since when choosing among possible alternatives for the distribution of capital investments within the market of financial assets, the investor will receive different results. As a result, it is necessary to understand the amount of income received during the period of ownership of the investment portfolio. It is known, according to Gary Markowitz's theory of investment risk, that the optimal distribution of the filling of the investment portfolio should provide the best income while maintaining the lowest risks. At the same time, the decision regarding the structure of capital distribution is often made in conditions of uncertainty, and the profitability of investing capital in investment objects is of a random nature. Since uncertainty creates additional risks, the investment of capital and the task of optimizing the investment portfolio must be considered and solved in the presence of risk. At the same time, effective investment activities require the use of special mathematical methods and informational tools to support decision-making. In the article, using the Ruby programming language, a model is proposed that can be used in the decision-making process when forming a set of components of a portfolio of securities, which allows potential investors to independently assess the effectiveness of a set of investment portfolios by comparing the growth dynamics of shares available on the financial market. It is known that most of the information an investor encounters is in a tabular format, and according to the methodology of scientific knowledge, a person better perceives visualized ways of presenting information. The model proposed in the work uses visualization tools built into the software product, which presents available tabulated information in a structured graphic form.