This study is dedicated to considering the problems of optimizing the capital structure by borrowing from Russian non-public companies. The paper substantiates why the Western approach to optimizing the capital structure and borrowing is inapplicable to Russian companies operating in conditions of closed business, often of a semi-informal nature. This inapplicability is due primarily to the difference in institutional structures of Russian and most foreign economies, as well as to the difference in approaches to doing business. In particular, a typical US corporation is managed by hired managers; the owners manage it indirectly by nominating their representatives to the board of directors at general meetings of shareholders, and the main interest of the company for most minority shareholders is dividend income and the ability to manage a share portfolio of this company, so as a result, they are interested in increasing the share value. It should be noted that the concept of market value of a company is much broader than the concept of cost of equity of a company and concerns not only public but also non-public companies, which, in particular, is directly related to the sources of financing of the company. Our study discusses the formation of the target capital structure, mainly of non-public companies, in the Russian economy, and analyzes the borrowing practices. Russian business is characterized by a combination of ownership and management functions. This is due to such features of Russian business as management of the company by its creator, or the immediate relatives of the creator, desire to conduct the most closed financial and economic activities, borrowing not only from legal sources in combination with possible use of shadow borrowing schemes. This means that a model should be developed that allows forming a loan portfolio that is close to optimal, based on the current goals of the company, taking into account all of the above features of Russian business. This publication presents an economic and mathematical model developed and adapted to form an optimal loan portfolio by Russian companies, often existing in semi-informal conditions.