2. Materials and Methods
The agent-based model of trade wars developed at CEMI RAS is part of the complex of models of the socio-economic system of the Eurasian continent, presented in the work [
8]. In this model dynamics of trade relations among three countries (China, the USA, Russia) and two associations of countries (the European Union and the united rest world) is considered. We can divide countries in the model into three groups:
Three types of agents interact in the trade war model: organizations, states, and residents. Agents-organizations perform the functions of producers and sellers of products and services. There are 11 aggregated industries considered in the model in each country: agriculture and food production, mining, fuel production, public sector, chemical production, production of the materials, production of transport and equipment, light industry, service, commerce, construction. Each of them corresponds to one or a few industries from the national classifiers and Standard International Trade Classification (SITC) to aggregate information about production, exports and imports of the countries. Aggregated industries in each country form organizations whose products are sold to each other, to the state in which they are located, or to the final consumer.
In interaction with agents-organizations, agents-residents implement functions of consumers and employees. In the first of these roles, residents act as buyers of the final products of organizations, in the second - employees of organizations who receive wages. Residents are also taxpayers and recipients of social benefits, which determines their interaction with agents-states.
The states in the model are a type of agents that, on the one hand, participate in economic life (collect taxes and pay benefits), and on the other hand, perform political functions, in particular, they can introduce trade restrictions on export and import of certain products from non-friendly countries. Restrictions are presented as data sets:
where
S1 – country in the model,
S2 – trade partner country of
S1,
t – type of trade relation (export or import),
i – industry for which restrictions are imposed,
r – ratio of trade relation in the current period to the previous period,
y –year of imposition of the trade restriction.
There are two main modules in the agent-based model of trade wars: model objects generation module and dynamic simulation module (
Figure 2). The model objects (agents of various types and their characteristics) are generated using initial modeling data and stored in the model database. In the dynamic simulation module interactions among generated agents are simulated. For agents-residents we simulate salary and social benefits receiving, tax payments, purchase of products and services. Agents-countries perform tax collection, social benefits payments and imposition of trade restrictions set in the scenario parameters. For agents-organizations we simulate production, supplies and sales in the current cycle and recalculate planned volume of output, redistribution of supplies and sales taking into account scenario parameters that reflect changes in economic environment and international trade. Within simulation we consider the following set of scenario parameters: exchange rates of the currencies, inflation in different countries, final demand and state expenses dynamics in different countries, sets of trade restrictions among countries in the model.
The key algorithm that determines dynamics of changes in the work of organizations is the recalculation of output and supplies algorithm. To implement it, it is necessary to assume that part of supplies of organizations is basic, and some is additional, and the volume of additional supplies is not directly related to the current volume of the organization's output. Based on this assumption, four types of supplies are considered in the model: basic intermediate, additional intermediate, basic investment and additional investment. Among the industries of the model, the so-called terminal industries stand out: agriculture and mining, in which all intermediate supplies are additional. This division allows to set the order of recalculation of supplies and sales of the organization, and avoid looping of the algorithm due to the fact that supplies of organizations of terminal industries are the last to recalculate [
9]. There are four steps in the recalculation of output and supplies algorithm:
Redistribution of non-basic supplies among sellers under the influence of sanctions. At this step trade restrictions on suppliers of investment and non-basic intermediate supplies are checked for each organization. If there are any current restrictions, supplies from unfriendly countries are reduced, and the lacking supplies are calculated:
where
– lacking volume of non-basic supply of industry
i,
– current volume of supply of industry
i;
– existing trade restriction on industry
i imports;
,
– existing trade restriction on industry
i exports.
The lacking supplies from the countries that imposed trade restrictions are replaced by supplies from neutral and friendly countries. This action affects orders of organizations that are stored in Zm variable;
- 2.
Recalculation and redistribution of basic intermediate supplies. At this step we consider supplies of raw materials and components, the shortage of which directly affects output of the organization. The required supplies are recalculated taking into account changes in final and intermediate demand:
where – estimation of organization’s demand in the next modeling cycle, –sales to organizations in the current modeling cycle, – changes in of orders from buyers set in the previous step, – sales to residents in the current modeling cycle, – expected dynamics of the final demand (scenario parameter); – sales to the state in the current modeling cycle, – expected dynamics of the state expenses (scenario parameter).
The order in which basic intermediate supplies organizations are recalculated is determined by their industry. At first, we process organizations-manufacturers and service providers, while organizations of terminal industries (agriculture and mining) are processed the last. Implementation of this order allows to take into account changes in intermediate supplies among organizations and recursively make changes in output volumes caused by changes in supplies;
- 3.
Recalculation of sales. At this step we compare orders received by organizations with their production capacities, available materials and components. Using this information, we calculate available supplies and return information about them to the buyers. Organizations are processed in the order opposite to the first step: starting from agriculture and mining, then manufacturing, trade and services;
- 4.
Adjusted recalculation of output and supplies. At this step each organization compares demand for the materials of industry i with volume of available supplies and warehouse stock of these materials:
where
– ratio of available materials of industry
i to the demand for them;
–available basic intermediate supplies of industry
i;
– stock of materials of industry
i in the warehouse of the organization;
– demand for materials of industry
i.
After evaluation of availability of all required materials the adjustment coefficient
is set as the smallest of decrease in demand and available intermediate supplies:
where K – adjustment coefficient for organization’s output; – ratio of available materials of industry i to the demand for them; – coefficient of expected demand’s dynamics.
The adjusted output is calculated as:
where – organization’s output in the next modeling cycle; – organization’s output in the current cycle; K – adjustment coefficient for organization’s output.
All these actions are repeated at each modeling cycle, at the end of modeling time the results are loaded to the model database. At the end of the simulation, access to the results of the calculations is carried out through special queries to the model database.
Agent-based model of trade wars was programmed in Microsoft Visual Studio using C# programming language and PostgreSQL database management system. Program realization of the model is considered in more details in [
10]. Initial data for generating agents and their characteristics is loaded in Excel files, containing information about countries and industries considered in the model; output, product price, fixed assets and supplies of organizations. Main information sources for gaining modeling data are official statistical agencies in Russia (Federal State Statistics Service) [
11], China (National Bureau of Statistics) [
12], the US (Bureau of Economic Analysis) [
13] and the EU (Eurostat) [
14]. As there is no data for the year 2022 presented on the website of National Bureau of Statistics, we additionally use information from Organization for Economic Cooperation and Development (OECD) [
15]. Data for the countries considered in the model as the rest world, is taken from the World Bank website [
16].
Despite the fact that, in general, economic information for different countries is given in a similar form: structure and dynamics of GDP, imports and exports of countries, inter-industry supplies and investments of organizations, there is a problem of their unification, associated primarily with the difference between industry and customs classifiers in various countries. To solve this problem, a method was developed to bring various classifiers to a simplified industry structure of a model of 11 industries. As a result of applying this method, disparate data on production and international trade are reduced to the form of cross-country tables of industry supplies of intermediate and investment goods, which are loaded into the model as initial information on domestic, import and export supplies of organizations. This method and the resulting tables are discussed in more detail in [
1].