A new model of an integrated economic system is investigated which consists of two markets – raw materials and products interconnected by selling and processing raw materials into products. When the markets reach an equilibrium state, this model allows estimating the commodity flows and the economic efficiency of each producer of raw materials or products taking into account the market conditions. With such a structure of interconnected commodity markets, producers in the raw materials market are buyers of raw materials, and in the products market – sellers. Due to this feature of the market system the demand function for raw materials is set implicitly, and the standard methods for searching the equilibrium seem ineffective for this problem. In order to find an equilibrium state for the presented structure of interconnected commodity markets, an algorithm for searching the Nash equilibrium was developed, which takes into account the desire of each market player to maximize profits considering the market conditions and the behaviour of competitors. By applying the methods of game theory and economic modelling, this research provides insight into competitive dynamics and strategic interactions both between players within a single commodity market in terms of competition, and between the markets proper in terms of formation of interconnected pricing. The results have practical significance for developing the market and investment strategies for the companies from real sectors of economy, production modernization programs, and optimization of government subsidy programs.