# Macroprudential Policy in a Heterogeneous Environment—An Application of Agent-Based Approach in Systemic Risk Modelling

^{1}

^{2}

^{*}

^{†}

Next Article in Journal

Next Article in Special Issue

Next Article in Special Issue

Previous Article in Journal

Previous Article in Special Issue

Previous Article in Special Issue

Institute of Economics, Polish Academy of Sciences, Nowy Swiat St. 72, 00-330 Warsaw, Poland

Department of Empirical Analyses of Economic Stability, Cracow University of Economics, Rakowicka St. 27, 31-510 Cracow, Poland

Author to whom correspondence should be addressed.

These authors contributed equally to this work.

Received: 29 December 2019 / Revised: 13 January 2020 / Accepted: 17 January 2020 / Published: 21 January 2020

(This article belongs to the Special Issue Complexity in Economic and Social Systems)

Assessment of welfare effects of macroprudential policy seems the most important application of the Dynamic Stochastic General Equilibrium (DSGE) framework of macro-modelling. In particular, the DSGE-3D model, with three layers of default (3D), was developed and used by the European Systemic Risk Board and European Central Bank as a reference tool to formally model the financial cycle as well as to analyze effects of macroprudential policies. Despite the extreme importance of incorporating financial constraints in Real Business Cycle (RBC) models, the resulting DSGE-3D construct still embraces the representative agent idea, making serious analyses of diversity of economic entities impossible. In this paper, we present an alternative to DSGE modelling that seriously departs from the assumption of the representativeness of agents. Within an Agent Based Modelling (ABM) framework, we build an environment suitable for performing counterfactual simulations of the impact of macroprudential policy on the economy, financial system and society. We contribute to the existing literature by presenting an ABM model with broad insight into heterogeneity of agents. We show the stabilizing effects of macroprudential policies in the case of economic or financial distress.

The new setting of financial supervision tailored after the global financial crisis of 2008–2009 has highlighted the need for research on the nature and measurement of risk in the financial system, also called systemic risk [1,2,3,4]. In response to the problems that occurred during the global financial crisis, the Basel III regulatory framework for financial institutions was adopted in 2010–2011. In the updated version of the Basel document the capital and liquidity requirements were established. In addition, the methods of conducting stress tests in the financial system have been subject to revision. Basel III was designed to strengthen the effects of banks’ capital requirements by increasing the liquidity of the banking sector and reducing leverage undertaken by banks. In the European Union (EU), the implementing act of the Basel Agreements has been issued in the form of a new legislative package covering CRD IV/CRR (i.e., CRD IV Directive No. 2013/36/EU on access to the activity of credit institutions and the prudential supervision of credit institutions and investment firms and CRR Regulation No. 575/2013 on prudential requirements for credit institutions and investment firms).

The literature on selected macroprudential policy tools [5,6] presented in Basel II and III has been mainly focused on theoretical and empirical research on linkages between real sector and the financial system. According to International Monetary Fund, Financial Stability Board and Bank for International Settlements (IMF-FSB-BIS) [7], the assessment of the effectiveness of macroprudential policies includes: the assessment of the extent to which the macroprudential instrument increases the resilience of the macro-financial system; and the assessment of the extent to which the macroprudential instrument has impact on credit dynamics and asset prices (the impact on the cycle). The adoption of the new institutional framework for macroprudential supervision in the EU Member States took place in most countries during last three years. Therefore, the results of empirical studies on the effectiveness of macroprudential instruments are biased by substantial uncertainty. Alternatively one may carry out counterfactual analyses on the impact of a combination of macroprudential instruments on a stylised economy using the following simulation methods: dynamic stochastic general equilibrium models (DSGE) or non-equilibrium models (e.g., ABMs) [8]. Although from the presentation of ABM models in opposition to DSGE models, the conclusion can be drawn that the DSGE models are always less useful, it is important to remember that DSGE models are an extremely important tool used mainly in central banking. A defence of the legitimacy of using DSGE models even after the financial crisis can be found in Christiano et al. [9].

Analyses of the impact of macroprudential policies on the financial system and the real part of the economy have been primarily focused on capital requirements [10,11,12,13], countercyclical capital buffer [14,15,16,17] and leverage [18]. In the literature, we can also observe successive attempts to incorporate stylised macroeconomic and macroprudential policies in the form of financial frictions into Dynamic Stochastic General Equilibrium (DSGE) models [19,20,21,22,23,24,25]. The main goal of these attempts was to examine the effects of monetary policy or the general equilibrium welfare effects of capital requirements and leverage. Despite the role these studies played in formulating theoretical background to design of macroprudential policy, the assumptions of DSGE models are subject to critique [26,27]. DSGE models share the assumption of a perfectly rational representative agent that dynamically optimizes the use of resources. Failure to take into account the heterogeneity of agents in most DSGE models is particularly acute from the perspective of social welfare analysis performed within an equilibrium environment [28].

Both empirical and theoretical studies on the effects of the Basel III have led to the formulation of criticisms of the adopted regulatory framework. In particular, some researchers highlighted insufficient risk and uncertainty sensitivity of macroprudential tools, over-reliance on external rating regulations, improper tool calibration and lack of synchronization of adopted rules at institutional and national level. EU expert groups are still working to incorporate changes within these areas into the Basel IV framework. New research tools are required to examine the impact of regulatory changes on the economy, financial sector and society. The new setting should allow greater flexibility in modelling of risk-taking, risk aversion and decision-making under uncertainty. Consequently assumptions of macromodels should be more realistic to allow for a study of changes in welfare in heterogeneous economy beyond the social planner framework.

The aim of this paper is to analyse the impact of selected macroprudential policy tools on the economic and financial system using agent-based modelling (ABM). Modelling of interactions between agents within the ABM approach was confronted with the DSGE model with three layers of default (‘3D’) [21], which is currently used by experts within the European Systemic Risk Board (ESRB) and European Central Bank (ECB).

This paper contributes to the existing literature of agent-based modelling through detailed and relatively broad insight into heterogeneity of agents. In the approach taken, decision-making rules, preferences and behaviours may vary across units. In our model, all agents, ie banks, individuals, households, consumers, firms, establishments, industries, suppliers, properties, are heterogenous.

We conducted extended simulation experiments that were based on an ABM model that had been calibrated to reflect the features of a small open economy. Our choice was Poland as an exemplar case. The reason for calibrating the model relying on Polish data is that among the EU countries, the Polish economy is relatively small, open and strongly connected to the rest of the European Union countries. Moreover, the Polish banking system still remains strongly influenced by investors from the European Union, who treat Poland as a host country. Generally, the smaller Central and Eastern European (CEE) countries that host foreign financial institutions are exposed to various dimensions of systemic risks more strongly. At the same time, the degree of the development of financial intermediation is relatively low, which results in a rather weak credit channel, especially in the case of investments. Although the financial system in Poland generates limited systemic risk, it is more vulnerable to regulatory arbitrage and the propagation of the shocks that are caused by the activity of international financial groups.

Consequently, the CEE economies and other emerging economies may need to conduct a more active macroprudential policy because of the higher risks that stem from volatile capital flows or credit booms and so forth. These issues also relate to the Polish economy and its financial system. Hence, both the ABM model and the simulations presented in our paper are valuable for gaining a detailed insight into the effects of macroprudential policy, especially in the case of small emerging open economies.

In order to study the macroeconomic effects of macroprudential instruments and their interaction with monetary policy in the case of a hypothetical small open economy, Aoki et al. [29] applied a DSGE framework. The analysed model captured some critical features of the emerging market economies with macroprudential instruments that were defined as the capital requirements that were imposed on banks and a tax on foreign currency (FX) lending. However, there are some relevant aspects that were not taken into consideration in the Aoki et al. [29] model. For example, the possibility of the government or central bank intervening in the foreign exchange markets through the use of official foreign reserves is not discussed. Moreover, what is missing in the model is a more flexible specification of international capital flows (no equity flows or foreign direct investment) and the role of cross border gross flows, which could play a destabilizing role for financial stability. The ABM construct that is presented in our paper and the simulation study seem to be a step forward in addressing some of these issues but in particular in relaxing the assumption of the homogeneity of the economic units that interact in a system.

The use of DSGE models historically has been primarily focused on the analysis of technological changes and their impact on the real economy [30,31] as well as the impact of monetary policy on the business cycle [32,33]. The first DSGE models with financial frictions were not used for impact studies of macroprudential policies on the macro-financial system and social welfare. The research has been mainly focused on the formal explanation of the financial accelerator hypothesis [34,35] and the role of the net worth channel in credit supply [23,36]. In a few models, the impact of LTV changes and capital requirements on the economy was analysed explicitly [25].

After the global financial crisis, interest in systemic risk assessment and macroprudential policies increased [37,38,39]. Currently, one of the most important examples showing the use of DSGE models in research on macroprudential policies is the DSGE model with 3 layers of default (‘3D’ model) [21] developed in ECB. The main goal of the ‘3D’ model was to create a framework for analysing positive and normative macroprudential policies. This model enables to set the optimal levels of capital requirements as well as to analyse welfare within the social planner framework. However, heterogeneity of agents within the model which seems more realistic would change the optimal values for capital requirements and would make the welfare analyses more meaningful.

The paper includes a comment on the ‘3D’ model, due to its similarity to the prepared heterogeneous agent-based simulation. In both cases, the behaviour and decisions of major market players are taken into account. The insolvency of individuals (households), companies and banks describe formally sources of systemic risk. In the ‘3D’ model and in the ABM model, stability of the financial sector is related to the default of agents. Nonetheless, the method of modelling agent’s decisions differs between both approaches. More importantly definition of the insolvency also differs. In the ‘3D’ model, individuals can deposit funds in banks and take loans for the purchase of real estate; entrepreneurs borrow from banks to accumulate capital. Business insolvency is associated with the occurrence of idiosyncratic and aggregate shocks. In the ABM model, the insolvency of agents is tied to internal market dynamics, driven by business and financial factors mainly the supply and investment finance policies of the banks and the demographic factors. The external shocks can be taken into account in the analyses but their significance is smaller than in the DSGE approach.

The ‘3D’ model has been a novelty in the DSGE literature. Traditionally, in the DSGE models, due to appropriately formulated contracts, insolvency at steady state was impossible. Risk of insolvency itself was fully hedged in the model [35]. In a ‘3D’ model, a borrower’s insolvency implies changes in the lender’s balance, which in turn affects his or her optimal behaviour in the market. Moreover, the bank’s insolvency also entails costs to individuals and businesses, in spite of deposit insurance, which in turn strengthens the impact of bank insolvency.

In both approaches, the entire chain of interconnections between agents is formally modelled. Households save and deposit their funds in banks, while other households and companies borrow funds from the same banks. The ABM model departs from the stylised division into two dynasties: savers and borrowers. In an agent-based simulation, each household is made up of individuals with their own heterogeneous profiles in terms of savings, income, spending or additional financing. The way households make decisions depends on the interaction of an individual with family members and other agents in the model. In this way it is possible to trace the way of transferring the risk of insolvency between sectors. However, the transmission of default risk between sectors in DSGE models is accomplished by further optimisation of resources by a representative agent assuming appropriate restrictions and rational expectations. In the ABM model, insolvency transmission is accomplished not only through actual economic and balance-sheet relations and constraints but also the perception of risk and uncertainty of heterogeneous agents in the system [40,41,42]. DelliGatti [41] binds DSGE models with the financial accelerator hypothesis, while ABM models utilise the instability hypothesis of H. Minsky, which take into account not only the financial accelerator hypothesis but also Knightian uncertainty [43]. Additionally, the ABM model presented includes not only the transmission of risk of insolvency between the agents but also between industries.

In the ‘3D’ model the attention is drawn to two types of distortions, which drive banks to excessive use of leverage and significant exposure to risk. They also explain the need for macroprudential policy. The first is related to the existence of deposit insurance agency. Banks run increased risk at the expense of an external agency, leading to higher credit supply and increased demand for deposits. The second distortion is related to the fact that the insolvency is expensive, not only for the lender but also for the borrowers. Occurrence of costly state verification [19] leads to lower demand for credit. The net effect of the two market distortions may be different for each sector. Consequently, the supply of credit for each sector may be lower or greater than the level that maximises the welfare of society.

According to the logic of the ‘3D’ model, in a steady state, when the probability of bank insolvency is high, the risk premium is raised. We assume in the ‘3D’ model that the risk premium is for the whole system and not for a given bank; therefore, banks are willing to take a higher risk because their funding cost is the result of decisions made by all participants within the market. These results seem obvious and a natural conclusion of homogeneity of individuals particularly banks. In the ‘3D’ model, we assume a certain probability of bank default, which is characteristic of the state of equilibrium that we analyse. In financial markets, the decisions of a bank depend on its perception of counterparty risk and estimation of the way a bank is assessed by other units (the >>perception of perception<< of uncertainty). One of the dimensions of the heterogeneity of agents is related to differences in perception of reality, inter alia the perception of counterparty risk, overall uncertainty in the market and the state of the economy. Those elements are clearly omitted in the aforementioned DSGE ‘3D’ model. General frameworks built upon an idea of equilibrium make it impossible to generalise existing DSGE models regarding the aforementioned issues. Also, assumption that a particular individual’s decision may or may not lead to achieving equilibrium seems more realistic. The ABM approach helps overcome these drawbacks. Analyses conducted only within the state of general equilibrium are departed from and the field of interest of non-equilibrium theories and the instability hypothesis is entered [44,45]. The ABM approach is therefore a step towards overcoming the DSGE modelling imperfections indicated by many authors [46,47]. According to empirical literature, the response of systems to the occurrence of shocks may be nonlinear and the financial system itself may be unstable. In addition, shock effects exhibit asymmetric nature. By design, mainly due to the use of log-linearisation, DSGE models are not able to accommodate non-linearity.

DSGE models with financial frictions [19,48], including the ‘3D’ model, refer to the hypothesis of the financial accelerator system. At the same time, the system is characterised by market failures, including the asymmetric information and externalities. A number of researchers highlight the presence of pecuniary externalities [49,50,51]. Pecuniary externalities complement technological externalities and aggregate demand externalities [52]. After the recent financial crisis, one may observe an increased interest in explaining the impact of pecuniary externalities on the system and social welfare. Pecuniary externalities are incorporated mainly into the models by means of credit restrictions. An example of pecuniary externality may be the lack of internalisation of effects of investment decisions in housing and capital prices, which in turn affects the required collateral. In the ‘3D’ model the level of leverage of households and firms is affected endogenously by prices, including real estate prices. At the same time, the direction and size of the impact of pecuniary externalities on allocation of resources are difficult to estimate using the ‘3D’ model.

In agent-based models, it is possible to go one step further to include the premises of instability hypothesis in the analysis. The instability hypothesis is closely tied to financial accelerator hypothesis and it can assume existence of pecuniary externalities. Nonetheless, it goes far beyond it. DelliGatti [41] distinguishes two ways of presenting Minsky’s hypothesis. The first does not refer explicitly to the heterogeneity of agents, and the second assumes the existence of three types of agents; hedging, speculative and Ponzi agents. According to the first explanation, the level of investment in the economy depends on the volume of internal finance and the difference between the market price of assets and the price of the final good. The market price of assets depends on long-term profit expectations. Final good price depends on the expected demand for that good. In the absence of heterogeneity of agents, the representative agent’s investment level decisions are a function of internal financing, which in principle is consistent with the financial accelerator hypothesis. In practice, investment decisions are also made according to how the agents perceive risk. Hence, according to Delli Gatti, in order to fully understand the Minsky’s hypothesis, we need to distinguish between three types of agents that have different attitudes towards external financing.

During the economic boom period, both the borrower and lender expect future cash flows to increase at a pace that will allow the borrower to repay their obligations. As the expectations develop, asset and product prices increase, stimulating investment growth. As a result, production, profits and employment in the economy increase. Banks increase the supply of credit, often requiring lower collateral. Companies are less cautious when they borrow money. Consequently, the proportion of speculative and Ponzi agents increase and the financial system resilience decreases. If the level of debt in relation to its service is perceived as too high on aggregate, the number of insolvency announcements in the system increases, leading to an eventual financial crisis.

Both the ‘3D’ model and the ABM simulation are examples of stochastic dynamic systems that describe the evolution of basic components of the economy. However, while in the ‘3D’ model the economic agents are homogeneous, fully rational and dynamically optimising, in the ABM simulation model, the agents are fully heterogeneous, bounded rational and they perform heuristic optimisation [53,54,55,56].

In order to include the conclusions of the Minsky’s hypothesis in analyses, heterogeneity of agents was included in the agent-based simulation. The heterogeneity of the economy is understood here, however, more broadly than the differentiation of attitudes towards external financing. It is understood as a differentiation of states, behaviour rules and expectations; this implies heterogeneous distributions of variables ex ante and ex post.

Both groups of researchers, working on the DSGE models and ABM models respectively have recognised the need to consider heterogeneity of the economy in order to analyse the optimality of policies as well as welfare implications. The heterogeneity of agents in the ABM approach is, however, understood differently than in DSGE models with heterogeneous agents [57,58,59]. In the DSGE models with heterogeneous agents, the discontinuation of the assumption of a representative agent is made primarily by allowing for idiosyncratic shocks and by removing the assumption of completeness of asset markets. In particular, such a definition of heterogeneity requires the redefinition of basic model and analyses elements, including the definition of steady state and equilibrium [58]. States of the economy are generally considered to be the realisation of a complex stochastic process with approximate properties to the Markov processes. Therefore, in such models, stationary equilibrium is considered, within which the stationary (ergodic) distribution exists. Within these model types, decision functions and price process realisations are approximated numerically. Some of these techniques were also adopted in the ABM approach [60,61,62].

The heterogeneity of agents in ABM is understood differently. This could be due to differentiation of attributes and states, differentiation of decision rules [63,64], attitudes towards risks or expectations [65,66,67]. In most ABM models with heterogeneous expectations, agents typically have adaptive expectations, as opposed to the rational expectations of representative agent within the DSGE approach. All these dimensions of heterogeneity appear in the simulation presented in the next section. Among others, the empirical distributions of basic economic categories such as income, expenses or credits were used to calibrate the states and the decision functions and procedures were selected after conducting the empirical research on the patterns of consumption and production on the market. The adaptive expectations were imposed as well on simulation design. A key difference between the presented simulation and other agent-based models is inclusion of varied attitudes towards risk and uncertainty in Knight’s sense and the risk sensitivities.

The final distinguishing element of the ABM approach is the possibility to introduce more realistic assumptions in the model than in the DSGE approach. Good examples are the assumption of visibility and satiation. This visibility means that agent decisions take into account not only purely economic conditions and factors, such as the price of the product but also the proximity of the supplier in a spatial sense. In the case of analysis of financial system, the idea of visibility has an additional dimension. It does not come down to visibility in a geographic or spatial sense but rather to the perception of banks as relatively safe institutions. The perception of banks does not have to be reflected in economic foundations or stances [42]. Adopting the saturation principle leads to a departure from the global optimisation of underlying criteria with restrictions on the choice of local maxima.

The presented ABM model is based on the traditions of the EURACE [68,69], FP7 MOSIPS and the population dynamics model in the EU regions models [70] as well as FP7 CRISIS models. Our ABM model is also consistent with the stock-flow approach [71,72]. Impact studies of macroprudential policies on the economy within the ABM approach is relatively new. However, the topic refers to the tradition of agent-based models within financial markets [73,74,75,76,77] as well as literature on credit and financial markets from the agent-based perspective [72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]. In the broader sense, the study also refers to the coevolution models successfully applied in [98,99] to explain the stylized fact of persistency in a time series. For more general reviews on complex network theory refer to References [100,101], while spatial interactions in agent-based modeling were discussed in Reference [102,103].

The purpose of the model is to bridge the gap in the literature on the role of macroprudential policies in systemic risk mitigation. In the following section, details of the ABM model, simulation results and an explanation of the logic behind robustness checks is provided. Comments on welfare analysis within the DSGE and ABM approach are also provided; hence a critical perspective on ‘3D’ modelling results is presented.

Presented within this section is an ABM model suitable for performing simulations that provide detailed insight into the nature of the relationship between the financial system and the real part of the economy. Due to the specifics of agent-based modelling, initially presented is the software environment in which simulations were developed. Next, attributes and activities of agents are presented. Also discussed is the method of sequential updating of the states within simulation modules. The form used to present the model and simulation is consistent with ‘A Common Protocol for Agent-Based Social Simulations’ [104].

The simulation was developed using object-oriented programming in Java-NetBeans and Eclipse environments. Statistical data to determine the attributes of system agents were grouped in a relational database (PostGreSQL-pgAdmin III). The simulation was linked to the database using Hibernate and SQL queries. According to the logic of object-oriented programming, initially agents and their attributes are described, and then the simulation workings from the perspective of individual agents and their activities are discussed. In the next subsection, a sequential update of agents’ attributes in simulation modules is presented.

In the macro-finance model, 9 agents are distinguished: Banks, Individuals, Households, Consumers, Firms, Establishments, Suppliers, Properties and Industries. All Parameters in a separate object are also defined. The relations between agents in the model are presented in the Figure 1. The attributes of the agents can be found in the Table A1, Table A2, Table A3, Table A4, Table A5, Table A6, Table A7, Table A8, Table A9 and Table A10 in the Appendix A.

Individuals do not determine the behaviour of the system in the initial Initialisation, Production, Supply chain and Public contracts modules. Their significance is enhanced only in the Households consumption, Households mobility and Individuals’ records updating modules. Nonetheless, individuals play a special role in the model because they determine the functioning of the program and the way data that describe agents’ attributes is mapped in the relational database.

In the Households consumption module, the sum of the income of individual entities forming the given household is initially calculated. Total household income is not only equal to the sum of family member income but also includes additional income from rental property and alimony payments. After calculating total household income, resources are divided between consumption and savings. The program counts the number of household consumers and their total disposable income. Depending on the level of disposable income, household savings are determined to update household members’ deposits. If a household consists of a couple (with or without children), then savings are distributed between them. Otherwise, if the household consists of a single adult or single parent, the savings are given to that adult. If the disposable income is exceptionally low, the scheme works similarly, with the common deposits used primarily to cover the basic needs. Decisions on the distribution of income between consumption and savings and the distribution of savings between household members are dynamic. For example, if the household changes as a result of divorce or death of the spouse, the states are updated.

Households represent different types of consumers in the model that determine the purchase of goods and services from a given industry. Households purchase products from suppliers according to the price offered by the supplier relative to the average industry price, quality of goods or services relative to average industry quality and depending on supplier’s spatial location. Households of a certain consumer type seek suppliers sequentially further from their location. Ultimately, they seek suppliers globally, taking into account only the price and quality of the product or service.

Purchases of goods and services do not need to be financed solely by funds deposited in a bank account. Households with creditworthiness are eligible for consumer credit. In the model, loan maturity depends on the amount of the loan.

In the Households mobility module, households decide the place of residence and purchase or lease the property. If the household already owns the property, the model verifies whether the cost of repaying the mortgaged loan relative to the household income is too high. If repayment cost is too high, the property is designated for sale. If the property in the previous iteration has already been marked for sale, the price is reduced.

If a household leases a property, rent is equal to the sum of the property owners bank loan repayment obligations; rent is calculated as the ratio of property price to the number of families renting the property. If the rental cost is too high, the household seeks a new rental property. Preference is given to properties near the current place of residence. If household members are not working, further conditions are laid down for disposable income and burdens on household loans. If income after deductions is relatively low and the person is over 25 and not working, then the individual defaults. The banks which have granted the loans to this individual update the non-performing loans value. In this module, income from renting real estate property to other households is also updated. If the property is not leased, it is marked for sale. If it is not purchased, subsequent iterations reduce the desired property sale value.

One of the most important elements of this module is the ability to purchase real estate. Households with high savings buy property in cash with a given probability. Nonetheless, some households, despite their resources, decide to apply for a mortgage loan. Households that do not have sufficient savings, but meet the requirements, also take a loan. If the household is already the owner of one of the properties, it may additionally take a non-residential loan on the pledge of the first property. In practice, either the household takes a residential or non-residential loan, taking into account whether it is already a property owner. Probabilities of taking a residential and non-residential loan were estimated based on empirical data.

Attributes of individual entities change their values in the Individuals’ records updating module. Depending on age and sex, the program determines the probability of death of an individual. If the probability is high, the person dies and the assets capital and deposits go to the heir. If the deceased person was the owner of a business, the heir can continue the business or forgo, depending on their previous income as an employee in one of the firms. Simultaneously, the division of capital in the economy changes. If the probability of individual’s death is low, the program directs the individual to the Education and Pairing modules. In the selected modules the consumer type of households is updated and in the final modules the remaining individuals’ records are updated.

The role of Firms is highlighted primarily in the modules: Firm demography, Mergers & Acquisitions and Firm growth. An entrepreneur can open a new business according to a certain probability that depends on the experience of running the company, the age and level of education completed by the individual. When deciding to set up a new business, the entrepreneur takes into account the average profitability of individual industries in the economy, the ease of obtaining licenses for running a business in a given industry and the ability to raise additional funds for opening and running a business. In the case of small and medium-sized enterprises, these funds can be obtained from banks, while in the case of large companies, capital is obtained from many individuals, who are henceforth shareholders of this company. Obtaining funding from a bank requires a number of formal requirements to be met, including leverage, investment and industry risk, investment risk mitigation and a good credit history of the applicant. Implicitly, banks also take into account the cost of labour, equity and size of the enterprise relative to the average enterprise size in the industry.

As a result of the acquisition of another company or as a result of the company’s strategic development, firms can increase the number of establishments they own. In the model, it is possible to obtain additional funds from banks for expansion. Firms can also cease their business activity.

In the simulation, companies announce insolvency when the level of indebtedness and the risk of business exceed the acceptable level. A low percentage of business that has been run in the low-profit sector at high operating costs defaults as well. In the event of a company’s inactivity on the market for six quarters, the program automatically removes the company from the database and program. The adoption of such assumptions ensures adequate market dynamics in the simulation. Firms and establishments are auxiliary objects for the remaining agents in the model. In the final modules, other attributes of firms and establishments are updated.

Establishments in the simulation allow for the spatial location of businesses. In the Initialisation module, the maximum potential production of goods and services of the establishment is computed. The price of the goods produced by the establishments changes depending on the demand. In each period, the optimal number of products to be stored for future sales is calculated. In the next period, the facility will only produce the number of goods equal to the number of goods demanded minus the number of goods stored. In addition, the production process takes into account the manufacturing risk and the overall level of corporate debt, which should not exceed the level specified by prudential regulation and policies. For the production of final goods, the establishments purchase inputs from others acting as suppliers. The choice of supplier is designed in such a way as to take into account economic categories such as price or product quality but also supplier availability in a geographical or spatial sense.

The demand from the private sector is supplemented by the need for goods from the public sector. It was assumed that the ability to sign a contract in a public sector depends on the size of the establishments producing the given good and the price and quality of the product offered compared to the average values in the industry. The establishments then decide on the destination of the final goods. Establishments may allocate all products for sale in a given sector or export some of their products to another sector and other spatial units.

In addition, the establishments play an auxiliary role in other modules. Individuals seek buildings near the workplace, that is, in the territorial unit within which the establishments are located. At the time of setting up a new company, new establishments are also created. Similarly, when a new company is created as a result of an acquisition or merger, the affiliation of the company and the owner of the establishments change. The owners of establishments decide to increase or decrease the workforce and firms with a strong market position increase the number of establishments. In addition, depending on the demand for work, the number of employees to be hired and fired in each establishment is calculated. In the final modules, firms pay salaries to establishments’ employees and the remaining attributes of establishments are updated.

The existence of major branches of the economy is assumed. The role of industries is crucial when calculating large exposures (LE) of banks to particular industries. Industries is an auxiliary object as well. Firms and establishments operate within the industries. The establishments may import and export goods between industries as part of the purchase of inputs for production. When firms apply for a loan, the total exposure to the industry is checked, which should not exceed the regulatory thresholds. The average values of variables for the industries are treated as a benchmark for business operations of firms and establishments. The main values calculated by the program are the number of units operating in the sector, average product price in the sector, average good quality, average firm size in the sector, average import and export, average industry earnings and average industry workforce. When entrepreneurs decide to run a business, first they attempt it in the relatively most profitable sector, and then in the next sectors.

Banks provide loans to individuals, households and companies. In the case of individuals and households, we distinguish between consumer loans and mortgages for residential and non-residential purposes. Companies can apply for a loan to purchase inputs and increase sales and business development (investment loans). Banks analyse loans granted to each of the industries and examine the risks associated with high exposures to the industry. According to regulatory requirements, banks are not allowed to lend to specific industries above certain thresholds.

Individuals and establishments accumulate funds in a bank account. To each individual and establishment at least one bank is matched based on survey data. The model assumes the existence of network and reputation effects. According to the results of empirical research, individuals and households are not guided solely by price in the decision to allocate funds. With relatively high probability, the entity will decide to remain with the bank assigned to them. On the other hand, if they decide to change bank, they will take into account interest rates and additional transaction costs. In the case of consumer credit and the purchase of inputs, agents are more driven by the reputation of the bank than the interest rate. On the other hand, in the case of residential and non-residential loans as well as investment loans, households and firms are primarily guided by the long-term interest rates of banks.

In the module Banks Supply side & regulatory requirements, banks set the supply of different types of loans. Banks compete with each other in terms of price, offering different interest rates on deposits and loans, as well as in terms of creditworthiness criteria. Risk-taking banks provide loans to individuals, households or companies with a lower credit history or lower creditworthiness (income or equity respectively). In the absence of macroprudential policy solutions, banks could be willing to lend to more risk-prone entities, which would jeopardise the stability of the financial sector. Thus, the model takes into account the examples of macroprudential policy tools. Firstly, the existence of capital requirements (CAR) and recommendations of the financial supervision authority regarding the capital maintained by banks were taken into account. The model then included the large exposures (LE) and exposures of risk to the industries. Banks cannot lend to a given industry over a specified amount and will not choose to lend to a company that runs risk-prone business without sufficient collateral. By providing housing and non-residential loans, banks pay attention to the following indicators: debt to assets (DTA), debt service to income (DSTI) and loan to value ratios (LTV). Moreover, the liquidity ratio (LCR) and leverage ratio (LR) have been taken into account as well.

From the supervisor’s point of view, it is extremely important to analyse the value of these indicators on aggregate for the economy. The survey data allows only for a static description of the level of these ratios for a given period. The simulation allows for the investigation of changes that occur in the indicator values as a result of dynamic interactions between fully heterogeneous agents. Similarly, for companies and premises leverage requirements (LR) are analysed.

Individuals, households, firms and establishments make decisions about depositing funds and obtaining a loan based on interest rates. In the system it is possible to introduce interest rates offered by banks. In this case, after taking into account the network and reputation effects, banks compete on interest rates. It is possible to take into account counterparty risk indicators and indicators of >>perception of perception<< in the analysis. It is then possible to integrate a macro-financial model into a financial model that simulates the role of risk perception and uncertainty in generating systemic risk in the interbank market [42].

The graphical representation of sequential updating of states in the model is presented in Appendix B.

In the Initialisation module, we calculate the average profit (that is ${\overline{\pi}}_{t}^{s}$) of the ${N}_{t}^{{firm}_{s}}$ firms doing business in the S industries ($s,\phantom{\rule{4pt}{0ex}}\mathrm{where}\phantom{\rule{4pt}{0ex}}s\in \left\{1,2\dots S\right\},\phantom{\rule{4pt}{0ex}}S\in \mathbb{N}$) at time t. The procedure classifies sectors according to their average profitability. Information on average profitability is used by individuals when they decide to establish a new firm in a given industry. Each firm in the sector s generates profits (${\mathrm{\Pi}}_{t}^{fir{m}_{s}}$).
In this module, the model also stores the initial supply of different credit types (for each bank b): consumer loans ${S}_{t}^{{l.C}^{ind}}$, residential ${S}_{t}^{{l.H}^{ind}}$ and non-residential loans (${S}_{t}^{{NH}^{ind}}$), firm investment loans $({S}_{t}^{l.{I}^{est}})$ and short-term loans for firms ${(S}_{t}^{l.{SH}^{est}})$ as temporal variables. This information is used later in module (M.55) to determine how much supply was used during this iteration by different agents.

$$\begin{array}{c}\hfill {\overline{\pi}}_{t}^{s}={\displaystyle \sum}_{{firm}_{s}=1}^{N}{\displaystyle \frac{{\mathrm{\Pi}}_{t}^{fir{m}_{s}}}{{N}_{t}^{{firm}_{s}}}}.\end{array}$$

In the Price updating submodule, the price (${P}_{t}^{est})$ is updated according to the demand $\left({Q}_{t}^{{d}_{est}}\right)$ for a given good or service in relation to the expected demand ($E\left({Q}_{t}^{{d}_{est}}\right)$) and the level of production $\left({Y}_{t}^{est}\right)$ relative to the maximum potential production of each establishment (${{Y}_{t}}_{max}^{s})$. In this sub-module, the values of variables determining the number of employees to be hired $\left({L}_{t}^{{HI}^{est}}\right)$ and fired $\left({L}_{t}^{{FI}^{est}}\right)$ in the current period in each establishment are set to zero.

The maximum production of premises in a given sector is then calculated according to the Cobb and Douglas production function:
where ${L}_{t}^{est}$ is the labour force, ${K}_{t}^{est}$ is the capital, ${A}_{t}^{est}$ is technology and ${(Ql)}_{t}^{est}/{(Ql)}_{t}^{s}$ represents the relative quality of the establishment’s product (or service) with respect to the average quality of product and services in the sector (industry). The value of parameters ${\alpha}_{1.s}$${\alpha}_{2.s}$${\alpha}_{3.s}$${\alpha}_{4.s}$${\alpha}_{5.s}$ are specific to each industry. When initialising the system, the price is defined based on the initial conditions in the database. In subsequent iterations, the price of the previous period is assumed to be the initial value of the good (${P}_{t}^{est}={P}_{t-1}^{est}$). This price may change depending on the demand relative to expected demand and production in comparison to the maximum capacity, that is to say the maximum potential production. If the demand for good produced by a given facility is greater than the expected demand for that good and production is greater than the specified part ${\alpha}_{6}\phantom{\rule{4pt}{0ex}}$ of maximum production, then the price increases in proportion to the given parameter $\phantom{\rule{4pt}{0ex}}{\alpha}_{7.s}$. The $\phantom{\rule{4pt}{0ex}}{\alpha}_{7.s}$. parameter is industry-specific. If the demand for a good is less than the part ${\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{3.33333pt}{0ex}}}_{8}\phantom{\rule{4pt}{0ex}}$ of expected demand for this good and output is less than the specified ${\alpha}_{9}$ part of maximum output, the price drops by the percentage given by the parameter ${\alpha}_{10.s}$. The ${\alpha}_{10.s}\phantom{\rule{4pt}{0ex}}$ parameter is industry-specific. This procedure is consistent with the adoption of adaptive expectations in the model.

$$\begin{array}{c}\hfill {{Y}_{t}}_{max}^{s}=\phantom{\rule{4pt}{0ex}}{\alpha}_{1.s}{({L}_{t}^{est}+1)}^{{\alpha}_{2.s}}{({K}_{t}^{est})}^{{\alpha}_{3.s}}{\left({\displaystyle \frac{{(Ql)}_{t}^{est}}{{(Ql)}_{t}^{s}}}\right)}^{{\alpha}_{4.s}}{({A}_{t}^{est})}^{{\alpha}_{5.s}},\end{array}$$

In this sub-module, we update the expected demand for the next iteration ($E({Q}_{t}^{{d}_{est}})$). The formula of the expected demand for a good depends on the production experience of the establishment. If the premises have been operating on the market for at least a quarter, the expected demand for its good is calculated according to the following formula:
The expected demand depends on the price of the product relative to the average price in the industry within the periods t and $t-1$, product quality relative to the average quality in the industry within the periods t and $t-1$, given parameter values, and demand for the goods up to date. The parameters ${\alpha}_{11.s}$, ${\alpha}_{12.s}$${\alpha}_{13.s}\phantom{\rule{4pt}{0ex}}$ and ${\alpha}_{14.s\phantom{\rule{4pt}{0ex}}}$ are industry-specific.

$$\begin{array}{cc}\hfill E\left({Q}_{t}^{{d}_{est}}\right)& =\left[{\alpha}_{11.s}\left({\displaystyle \frac{{P}_{t}^{est}}{{P}_{t}^{s}}}\right)+{\alpha}_{12.s}\left({\displaystyle \frac{{P}_{t-1}^{est}}{{P}_{t-1}^{s}}}\right)+{\alpha}_{13.s}\left({\displaystyle \frac{{(Ql)}_{t}^{est}}{{(Ql)}_{t}^{s}}}\right)+{\alpha}_{14.s}\left({\displaystyle \frac{{(Ql)}_{t-1}^{est}}{({Ql)}_{t-1}^{s}}}\right)\right]\times {Q}_{t-1}^{{d}_{est}}.\end{array}$$

However, if the establishment is new, then the expected demand is calculated to take into account the workforce in the newly-created establishment and the average sales per worker in the industry ${(Sl)}_{t}^{s}$ within which it operates.

$$\begin{array}{cc}\hfill E\left({Q}_{t}^{{d}_{est}}\right)& =\left[\alpha {\phantom{\rule{3.33333pt}{0ex}}}_{11.s}\left({\displaystyle \frac{{P}_{t}^{est}}{{P}_{t}^{s}}}\right)+{\alpha}_{12.s}\left({\displaystyle \frac{{P}_{t-1}^{est}}{{P}_{t-1}^{s}}}\right)+{\alpha}_{13.s}\left({\displaystyle \frac{{(Ql)}_{t}^{est}}{({Ql)}_{t}^{s}}}\right)+{\alpha}_{14.s}\left({\displaystyle \frac{{(Ql)}_{t-1}^{est}}{{(Ql)}_{t-1}^{s}}}\right)\right]\times \left({L}_{t}^{est}+1\right)\times {(Sl)}_{t}^{s}.\end{array}$$

If the establishment is new (${(New)}_{t}^{est}=1$), we calculate the optimal level of stock (${Inv}_{{opt}_{t}}^{est})$ as part of the expected demand, specified by the parameter ${\alpha}_{15}$. If the establishment is already established, the optimum stock level is calculated to take into account the expected demand for the good, the ratio of expected revenue from the sale of goods (${P}_{t}^{est}\times E\left({Q}_{t}^{{d}_{est}}\right)$) to the costs of producing that good in the current period (${TC}_{t}^{est}$), and the ratio of sales revenue in the current period ${(P}_{t}^{est}\times {(Sl)}_{t}^{est})$ to the total costs incurred in the previous period (${TC}_{t-1}^{est}$).

$$\begin{array}{c}\hfill {Inv}_{{opt}_{t}}^{est}={\alpha}_{15}\times \phantom{\rule{4pt}{0ex}}E\left({Q}_{t}^{{d}_{est}}\right)+\phantom{\rule{4pt}{0ex}}{\alpha}_{16}\times \left({\displaystyle \frac{{P}_{t}^{est}\times E\left({Q}_{t}^{{d}_{est}}\right)}{{TC}_{t}^{est}}}\right)+{\alpha}_{17}\times \left({\displaystyle \frac{{P}_{t}^{est}\times {(Sl)}_{t}^{est}}{{TC}_{t-1}^{est}}}\right).\end{array}$$

If the optimum stock of products ${(Inv}_{{opt}_{t}}^{est})$ is less than or equal to the actual stock ${(Inv}_{t}^{est})$, the establishment will not produce goods in the current period. However, if the optimal stock is greater than the stored number of goods, the establishment should produce the difference between the optimum level and the current stock.
Nonetheless, these establishments will produce goods only when the level of leverage and financial risk associated with the debt of the establishments does not exceed the levels specified by the parameters ${\alpha}_{18}$ and ${\alpha}_{19}$. If the establishment meets the conditions to produce goods, the production is equal to the lower value of either maximum production of the establishment or the difference between the optimum stock and the actual stock (inventory) of goods.

$$\begin{array}{c}\hfill {Y}_{t}^{est}=\mathrm{min}({{Y}_{t}}_{max}^{est};\phantom{\rule{4pt}{0ex}}{Inv}_{{opt}_{t}}^{est}-{Inv}_{t}^{est}).\end{array}$$

In this module, establishments buy inputs and decide on the import and export of goods between industries. In order to minimise costs, they choose a supplier from the nearest spatially located area, thus limiting the cost of transport. In addition, the adopted mechanism allows the modelling of continuation of transaction relationships between suppliers and recipients of goods. Each company is located spatially in the form of establishments. Each establishment is a supplier for another establishment. For each establishment in all sectors, the initial value of inputs ${((Inp)}_{t}^{est})$, profits from sales $({(Sl)}_{t}^{est}$) and demand for goods ${(Q}_{t}^{{d}_{est}})$ are set to zero. Next, the amount of inputs ${(q}_{t}^{est.buy.(sup)(.s)})$ (provided by suppliers from sectors $\phantom{\rule{4pt}{0ex}}s$) necessary to ensure continuity of production, taking into account import and export of inputs between industries is calculated. If the facility imports or exports semi-finished products, the amount of inputs that the establishment is going to purchase is obtained using the following formula:
In the model there are $2\times s$ values for parameters ${\alpha}_{20.s-buy.s}$ and ${\alpha}_{21.s-buy.s}$ (Cf. Calibration for the explanation how the values of parameters were obtained). For each establishment in the industry, the value of the parameter is the same but the values vary between sectors (industries). If the establishment does not import goods then the quantity of purchased goods is equal to the part of production specified by parameter ${\alpha}_{20.s-buy.s}$:
The total quantity of inputs is the sum of inputs purchased from all suppliers in all sectors (${q}_{t}^{est.buy}$).

$$\begin{array}{c}\hfill {q}_{t}^{est.buy.(sup)(.s)}={\alpha}_{20.s-buy.s}\times {Y}_{t}^{est}\times {\alpha}_{21.s-buy.s}.\end{array}$$

$$\begin{array}{c}\hfill {q}_{t}^{est.buy.(sup)(.s)}={\alpha}_{20.s-buy.s}\times {Y}_{t}^{est}.\end{array}$$

When searching for a supplier, the establishment takes into account the amount of goods stored by the supplier $({Inv}_{t}^{est(.\mathrm{sup})}>$ ${q}_{t}^{est.buy(.s)}$), and compares the ratio of quality to price of a supplier (establishment in the sector s) with the average ratio within the industry (sector):
In addition, it also takes into account supplier location (i.e., compares the spatial codes at NUTS 1-4 levels: ${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{1}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{2}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{3}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{4}}$). If the current supplier has a sufficient number of inputs for sale, and the quality and price of the good are acceptable in relation to the average price and quality in the sector, then the establishment can buy inputs from the supplier. The model consolidates the network effects developed during the cooperation of businesses. If the supplier does not meet the requirements, the establishments seek a new supplier locally in increasingly distant locations and then globally. The parameter values from ${\alpha}_{22.s-est}$ at time $t\phantom{\rule{4pt}{0ex}}$ to ${\alpha}_{25.s-est}\phantom{\rule{4pt}{0ex}}$ are specific to the supplier’s sector.

$$\begin{array}{c}\hfill {\displaystyle \frac{{\alpha}_{22.s-est}\times {(Ql)}_{t}^{est(.\mathrm{s})}}{{\alpha}_{23.s-est}\times {P}_{t}^{est(.\mathrm{s})}}}>{\displaystyle \frac{{\alpha}_{24.s-est}\times {(Ql)}_{t}^{s}}{{\alpha}_{25.s-est}\times {P}_{t}^{s}}}.\end{array}$$

After selecting a supplier, the establishment purchases inputs. To purchase inputs, the establishment must have sufficient liquid assets to cover the wages and the cost of buying the inputs: ${(LA)}_{t}^{est.buy}-{W}_{t}^{est.buy}\ge (1+\phantom{\rule{4pt}{0ex}}{\alpha}_{26.s-sup}\times \varpi )\times {P}_{t}^{est(.sup)(.s)}\times {q}_{t}^{est.buy(.s)}$, where $\varpi $ is the binary variable expressing whether the cost of transportation should be added. If it has sufficient liquid assets, it can finance the purchase of inputs from accumulated funds. Therefore, in the model, with the probability $p{r}_{1}$ the establishment will not apply for a loan. In that case, for the establishment-buyer inputs $({(Inp)}_{t}^{est.buy})$ and liquid assets $({(LA)}_{t}^{est.buy})$ are updated to. The signs “+=” shall be interpreted as the incrementation of the value of the variable by the amount quantified by the formula given on the right-hand side. Respectively, “-=”, shall be interpreted as a decrease in the value.
While for all establishments-suppliers from each sector, the sales expressed in monetary terms $({(Sl)}_{t}^{est.(sup)(.s)})$, demand for goods $({Q}_{t}^{{d}_{est(.sup).(s)}})$, liquid assets $({(LA)}_{t}^{est.(sup)(.s)})$ and stock $({(Inv)}_{t}^{est.(sup)(.s)})$ are updated.
In particular cases, with the probability of ${1-\phantom{\rule{4pt}{0ex}}pr}_{1}$, despite sufficient liquid assets, the establishment may apply for a loan to purchase additional inputs that will allow the facility to increase its production capacity and sales. If the establishment applies for a loan, the applicant’s creditworthiness is checked even if its accumulated funds are sufficient to cover the purchase. In the submodule Bank credit admissibility 1 (M.9), conditions in addition to liquidity funds are checked. In accordance to the market dynamics of short-term loans, some of the applicants will not obtain a loan from the bank due to lack of creditworthiness. The possibility of establishments applying for a short-term loan in the case of temporary liquidity problems has also been included in the model (i.e., ${(LA)}_{t}^{est.buy}<{(1+\phantom{\rule{4pt}{0ex}}{\alpha}_{26.s-sup}\times \varpi )\times P}_{t}^{est(.\mathrm{sup})(.\mathrm{s})}\times {q}_{t}^{est.buy(.s)}$). If, in spite of short-term liquidity problems, the establishment has not completely lost its creditworthiness, the bank may grant him credit for the purchase of inputs in the submodule Bank credit admissibility 2 (M.10). If the establishment has no creditworthiness, it has to adjust the quantity to buy $({\tilde{q}}_{t}^{est.buy})$:
After the purchase, the value of inputs (${(Inp)}_{t}^{est})$ and liquid assets of establishment-buyer (${(LA)}_{t}^{est.buy})$ are updated.
At the same time, we update the values of sales (${(Sl)}_{t}^{est.(sup)}$), demand for a good $({Q}_{t}^{{d}_{est.(sup)}})$, liquid assets (${(LA)}_{t}^{est.buy}$) and stock of suppliers from all sectors that provided inputs to establishments (${Inv}_{t}^{est.sup}$) are updated:
where ${\tilde{q}}_{t}^{est.buy(.s)}$ is the quantity of inputs that has been selected according to the adaptive algorithm.

$$\begin{array}{c}\hfill {(Inp)}_{t}^{est.buy}+=(1+\phantom{\rule{4pt}{0ex}}{\alpha}_{26.s-sup}\times \varpi )\times \phantom{\rule{4pt}{0ex}}{P}_{t}^{est(.sup)(.s)}\times {q}_{t}^{est.buy(.s)}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est.buy}-=(1+\phantom{\rule{4pt}{0ex}}{\alpha}_{26.s-sup}\times \varpi )\times \phantom{\rule{4pt}{0ex}}{P}_{t}^{est(.sup)(.s)}\times {q}_{t}^{est.buy(.s)}.\end{array}$$

$$\begin{array}{c}\hfill {(Sl)}_{t}^{est.(sup)(.s)}+={P}_{t}^{est(.sup).(s)}\times {q}_{t}^{est.buy(.s)}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est.(sup)(.s)}+={P}_{t}^{est(.sup).(s)}\times {q}_{t}^{est.buy(.s)}\end{array}$$

$$\begin{array}{c}\hfill {Q}_{t}^{{d}_{est.\left(sup\right).(s)}}+={q}_{t}^{est.buy(.s)}\end{array}$$

$$\begin{array}{c}\hfill {(Inv)}_{t}^{est.(sup)(.s)}-={q}_{t}^{est.buy(.s)}.\end{array}$$

$$\begin{array}{c}\hfill {\tilde{q}}_{t}^{est.buy(.s)}\phantom{\rule{4pt}{0ex}}=round\left(\frac{{((LA)}_{t}^{est.buy}-\phantom{\rule{4pt}{0ex}}{W}_{t}^{est.buy})\times {\alpha}_{20.s-buy.s}}{{P}_{t}^{est.(sup)(.s)}\times (1+{\alpha}_{26.s-sup}\times \varpi )}\right).\end{array}$$

$$\begin{array}{c}\hfill {(Inp)}_{t}^{est.buy}+={\tilde{q}}_{t}^{est.buy(.s)}\times {P}_{t}^{est.sup(.s)}\times (1+{\alpha}_{26.s-sup}\times \varpi )\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est.buy}-={\tilde{q}}_{t}^{est.buy(.s)}\times {P}_{t}^{est.sup(.s)}\times (1+{\alpha}_{26.s-sup}\times \varpi )\end{array}$$

$$\begin{array}{c}\hfill {(Sl)}_{t}^{est1.(sup)}+={P}_{t}^{est.sup(.s)}\times {Inv}_{t}^{est1.sup}\end{array}$$

$$\begin{array}{c}\hfill {(Sl)}_{t}^{est2.(sup)}+={P}_{t}^{est.sup(.s)}\phantom{\rule{4pt}{0ex}}\times ({\tilde{q}}_{t}^{est.buy(.s)}\phantom{\rule{4pt}{0ex}}-\phantom{\rule{4pt}{0ex}}{Inv}_{t}^{est1.sup})\end{array}$$

$$\begin{array}{c}\hfill {Q}_{t}^{{d}_{est1.(sup)}}+\phantom{\rule{4pt}{0ex}}={Inv}_{t}^{est1.sup}\end{array}$$

$$\begin{array}{c}\hfill {Q}_{t}^{{d}_{est2.(sup)}}+\phantom{\rule{4pt}{0ex}}={\tilde{q}}_{t}^{est.buy(.s)}-{Inv}_{t}^{est1.sup}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est1.buy}+={P}_{t}^{est.sup.(s)}\times {Inv}_{t}^{est1.sup}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est2.(sup)}+={P}_{t}^{est.sup.(s)}\times ({\tilde{q}}_{t}^{est.buy(.s)}-\phantom{\rule{4pt}{0ex}}{Inv}_{t}^{est1.sup})\end{array}$$

$$\begin{array}{c}\hfill {Inv}_{t}^{est2.sup}-=({\tilde{q}}_{t}^{est.buy(.s)}-\phantom{\rule{4pt}{0ex}}{Inv}_{t}^{est1.sup})\end{array}$$

$$\begin{array}{c}\hfill {Inv}_{t}^{est1.sup}=0\end{array}$$

In this submodule we analyse the case of an establishment without liquidity problems. The requested amount is given by the formula:
In the future, the model could also recognize different business types, similarly to the consumer types in the model, however at this stage, access to such disaggregated data was unavailable. Firstly, it is checked whether the matched bank in the database is able to loan this quantity (${S}_{t}^{l.{SH}^{est}}\ge {l}_{t}^{{SH}^{est}})$, as is the creditworthiness of the applicant. The values of ROA, ROE and leverage ratios as well as the value of average financial risk associated with the establishment operating in a given sector and its default history are checked. If the loan is granted, then the values of loans $({l}_{t}^{{SH}^{est}})$, quarterly payments (${l}_{t}^{S{H}_{q}^{est}}$), interest to be paid (in total) (${R}_{t}^{{SH}^{ind}})$ and quarterly $({R}_{t}^{{SH}_{q}^{ind}})$, inputs (${(Inp)}_{t}^{est})$ and liquidity assets $({(LA)}_{t}^{est})$ are updated (for the establishment-buyer).
At the same time, the revenue of banks (${({Rev}_{{l}^{SH}})}_{t}^{b})$ and supply of short-term credit for firms (${S}_{t}^{l.{SH}^{est}})$ are updates as well as sales $({(Sl)}_{t}^{est})$, demand $({Q}_{t}^{{d}_{est}})$, liquidity assets $({(LA)}_{t}^{est})$ and stock of all establishments from sectors $({(Inv)}_{t}^{est})\phantom{\rule{4pt}{0ex}}$ that provided inputs to establishments (buyers).
Short-term loans make it possible to guarantee the solvency of establishments in everyday business transactions. Restrictions to funding provision could result in an establishment’s loss of liquidity and production capacity. If the matched bank does not agree to grant credit, the same conditions are checked with other banks in the market. Firstly, the conditions are checked in the bank that offers the lowest interest rate. If none will grant the loan, the establishment needs to adjust the quantity of inputs to be purchased $({\tilde{q}}_{t}^{est.buy})$.

$$\begin{array}{c}\hfill {l}_{t}^{{SH}^{est}}+={\alpha}_{27}\times {((LA)}_{t}^{est.buy}-{W}_{t}^{est.buy}-{P}_{t}^{est\left(.sup\right)(.s)}\times {q}_{t}^{est.buy\left(.s\right)})\end{array}$$

$$\begin{array}{ll}{R}_{t}^{{SH}^{ind}}& +=\frac{1}{\kappa \phantom{\rule{3.33333pt}{0ex}}}\times [{\alpha}_{27}\times {((LA)}_{t}^{est.buy}-{W}_{t}^{est.buy}-{P}_{t}^{est\left(.sup\right)(.\mathrm{s})}\times {q}_{t}^{est.buy\left(.s\right)})\times {\left(1+0.25\times {i}_{{l}^{SH}}\right)}^{{\mathrm{M}}^{{SH}^{est}}}+\\ & -{\alpha}_{27}\times {((LA)}_{t}^{est.buy}-{W}_{t}^{est.buy}-{P}_{t}^{est\left(.sup\right)(.\mathrm{s})}\times {q}_{t}^{est.buy\left(.s\right)}))]\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{SH}_{q}^{est}}={\displaystyle \frac{{R}_{t}^{{SH}^{est}}}{{\mathrm{M}}^{{SH}^{est}}}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{S{H}_{q}^{est}}={\displaystyle \frac{{l}_{t}^{{SH}^{est}}}{{\mathrm{M}}^{{SH}^{est}}}}\end{array}$$

$$\begin{array}{c}\hfill {(Inp)}_{t}^{est.buy}+={P}_{t}^{est\left(.sup\right)(.\mathrm{s})}\times {q}_{t}^{est.buy\left(.s\right)}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est.buy}-={P}_{t}^{est\left(.sup\right)(.\mathrm{s})}\times {q}_{t}^{est.buy\left(.s\right)}-{\alpha}_{27}\times {((LA)}_{t}^{est.buy}-{W}_{t}^{est.buy}-{P}_{t}^{est\left(.sup\right)(.s)}\times {q}_{t}^{est.buy\left(.s\right)})\end{array}$$

$$\begin{array}{c}\hfill {({Rev}_{{l}^{SH}})}_{t}^{b}+={R}_{t}^{{SH}_{q}^{est}}\end{array}$$

$$\begin{array}{c}\hfill {S}_{t}^{l.{SH}^{est}}-={\alpha}_{27}\times {((LA)}_{t}^{est.buy}-{W}_{t}^{est.buy}-{P}_{t}^{est\left(.sup\right)(.\mathrm{s})}\times {q}_{t}^{est.buy\left(.s\right)})\end{array}$$

$$\begin{array}{c}\hfill {(Sl)}_{t}^{est(.sup)}+={P}_{t}^{est\left(.sup\right)(.\mathrm{s})}\times {q}_{t}^{est.buy\left(.s\right)}\end{array}$$

$$\begin{array}{c}\hfill {Q}_{t}^{{d}_{est}}+={q}_{t}^{est.buy\left(.s\right)}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est(.sup)}+={P}_{t}^{est\left(.sup\right)(.s)}\times {q}_{t}^{est.buy\left(.s\right)}\end{array}$$

$$\begin{array}{c}\hfill {(Inv)}_{t}^{est(.sup)}-={q}_{t}^{est.buy\left(.s\right)}.\end{array}$$

The requested amount is given by the formula:
Similar to the submodule 9, the supply conditions and creditworthiness are checked. In this case, the conditions for granting credit are also tightened, hence the differences in the parameters in the sub-modules Bank credit admissibility 1 (M.9) and Bank credit admissibility 2 (M.10). If a loan is not granted by a given bank, the establishment tries to obtain a loan from another bank. If there is no bank that is willing to supply a loan, the establishment is only able to purchase a portion of the planned amount of inputs. The logic of adaptive algorithms is used here. The values of variables are updated in the similar way as in the previous module (M.9). Purchases by establishments from the suppliers are supplemented by the purchases of consumers and the governmental sector.

$$\begin{array}{c}\hfill {l}_{t}^{{SH}^{est}}=\phantom{\rule{4pt}{0ex}}{q}_{t}^{est.buy\left(.s\right)}\times {P}_{t}^{est(.sup)(.s)}\times (1+{\alpha}_{26.s-sup}\times \varpi )-({(LA)}_{t}^{est.buy}-{W}_{t}^{est.buy}).\end{array}$$

Firstly, in the module, the individuals’ and households’ incomes (respectively ${y}_{t}^{ind}\phantom{\rule{4pt}{0ex}}\mathrm{and}\phantom{\rule{4pt}{0ex}}{y}_{t}^{HH})$ are computed. Individual income includes income from various sources: wages, business activity, dividends, public pensions, pension benefits, pre-retirement benefits and training allowances. The model distinguishes three main categories: wage (${w}_{t}^{ind}$), subsidy (${(sub)}_{t}^{ind}$) and interest from bank savings (deposits) (${i}_{d}\times \phantom{\rule{4pt}{0ex}}{d}_{t}^{ind}$). An individual’s income is expressed by the following formula:
Household income includes the sum of individual incomes, supplemental security income, alimony, donations, property rental income, interest and dividends from savings accounts, bonds, investment funds and income earned from participation in companies in which family members were investors or inactive partners. All items have been grouped into categories at the database level. The total income of the household (composed of ${N}^{ind.HH}$ individuals) is given by:
where ${(Don)}_{t}^{HH}$ are donations and ${(Rent)}_{{RE}_{t}}^{HH}$ is an additional income from renting apartments.

$$\begin{array}{c}\hfill {y}_{t}^{ind}={w}_{t}^{ind}+{(sub)}_{t}^{ind}+\phantom{\rule{4pt}{0ex}}{i}_{d}\times \phantom{\rule{4pt}{0ex}}{d}_{t}^{ind}.\end{array}$$

$$\begin{array}{c}\hfill {y}_{t}^{HH}={\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}{y}_{it}^{ind}+{(Don)}_{t}^{HH}+{(Rent)}_{{RE}_{t}}^{HH},\end{array}$$

At the beginning of the cycle, at least two banks are assigned to each individual; the bank to which the individual entrusted their savings (${Id}_{{d}_{t}}^{bank.(ind)}$) and the bank that may grant consumer loans to the individual (${Id}_{{l}_{t}^{C}}^{bank.\left(ind\right)}$). In the model, it is assumed that individuals are less prone to change the bank to which they entrusted their saving and current account funds than to change the ‘bank-lender.’ If they decide to change bank, when looking for a new bank, they take into account the offered interest rates on deposits and transaction costs, that is, the costs of changing the bank and opening a new bank account. The likelihood of a bank changing in the case of a consumer loan is higher than in the case of deposits. In the case of deposits, psychological factors such as habit formation or the perception of a bank as a reputable institution, which reinforce network effects, play a greater role. In the case of mortgages, households primarily rely on the interest rate on the loan.

After calculating household income, savings ${(s}_{t}^{HH})$ are calculated. Disposable income is the household income after deducting the cost of living (${h}_{t}^{HH}$), which includes the cost of renting or repaying the mortgage. If the disposable income is higher than the specified income per person in the household, where the per person income is given by the parameter ${\alpha}_{41}$, then the savings are computed according to the following formula:
where ${\alpha}_{41}\phantom{\rule{4pt}{0ex}}$ is the minimum cost of food per person in the household according to Central Statistical Office statistics, ${N}_{t}^{ind.HH}\phantom{\rule{4pt}{0ex}}$ counts the number of individuals in the household.

$$\begin{array}{c}\hfill {s}_{t}^{HH}=max\left\{0;\phantom{\rule{4pt}{0ex}}\frac{\sqrt{{(Age)}_{t}^{eldest.ind}}}{{\alpha}_{42}}\times \left({y}_{t}^{HH}-{h}_{t}^{HH}-{\alpha}_{41}\times {N}_{t}^{ind.HH}\right)\right\},\end{array}$$

However, if disposable income is lower than the specified parameter ${\alpha}_{38}$ (income per capita) multiplied by the number of consumers in the household (${N}_{t}^{ind.HH}$), two possibilities are considered. First, when the disposable income is positive, the savings are calculated according to the following formula:
Household savings are redistributed between the accounts of adult household members. If the household is a single person, then all savings are transferred to his or her account. If the household is a couple or an extended one (more than two adults in the family), then the corresponding parts of the savings are transferred to the adults’ bank accounts.
Second, if the disposable income is negative, household members spend their savings and current deposits on consumption and try to sell the properties on the real estate market. The algorithm looks for households which have sufficient funds after deducting the debt burden to pay for the property:
If this kind of household is found, then the values of deposits of buyers and sellers are updated as well as the status of the ownership of buyers $({(Own)}_{t}^{HH}=1)$.
If the household does not receive additional resources, this can eventually lead to default ${(PD}_{t}^{ind}\phantom{\rule{3.33333pt}{0ex}}+\phantom{\rule{3.33333pt}{0ex}}+\phantom{\rule{3.33333pt}{0ex}})$ and the household is removed from the database. The program updates the value of non-performing loans (${({NPL}_{{l}^{I}})}_{t}^{b},\phantom{\rule{4pt}{0ex}}{({NPL}_{{l}^{C}})}_{t}^{b},\phantom{\rule{4pt}{0ex}}{({NPL}_{{l}^{H}})}_{t}^{b}\phantom{\rule{4pt}{0ex}},\phantom{\rule{4pt}{0ex}}{({NPL}_{{l}^{NH}})}_{t}^{b}$). The probability of default of the bank increases.
where ${(pl)}_{t}^{{I}^{ind}}$ is the sum of liabilities to the bank for outstanding investment loans that have to be repaid in the given iteration, ${(pl)}_{t}^{{C}^{ind}}$ is the sum of liabilities to the bank for outstanding consumer loans, ${(pl)}_{t}^{{H}^{ind}}$ is the sum of liabilities to the bank for outstanding housing loans and ${(pl)}_{t}^{N{H}^{ind}}$ is the sum of liabilities to the bank for outstanding non-housing loans.

$$\begin{array}{c}\hfill {s}_{t}^{HH}=max\left\{0;\phantom{\rule{4pt}{0ex}}\frac{\sqrt{{(Age)}_{t}^{eldest.ind}}}{3\times {\alpha}_{42}}\times \left({y}_{t}^{HH}-{h}_{t}^{HH}-{\alpha}_{41}\times {N}_{t}^{ind.HH}\right)\right\}.\end{array}$$

$$\begin{array}{c}\hfill {d}_{t}^{HH}+=\frac{1}{{N}_{t}^{ind.HH}}\times {s}_{t}^{HH}.\end{array}$$

$$\begin{array}{c}\hfill {\displaystyle \sum}_{i=1}^{{N}^{ind}}{d}_{it}^{ind}-{\displaystyle \sum}_{i=1}^{{N}^{ind}}\left({l}_{it}^{{C}_{q}^{ind}}+{R}_{it}^{{C}_{q}^{ind}}+{l}_{it}^{{H}_{q}^{ind}}+{R}_{it}^{{H}_{q}^{ind}}+{l}_{it}^{N{H}_{q}^{ind}}+{R}_{it}^{{NH}_{q}^{ind}}\right)\phantom{\rule{4pt}{0ex}}\ge {P}_{t}^{prop}.\end{array}$$

$$\begin{array}{c}\hfill {d}_{it}^{ind.seller}+=\frac{1}{{N}^{ind}}{P}_{t}^{prop}\end{array}$$

$$\begin{array}{c}\hfill {d}_{it}^{ind.buy}-=\frac{1}{{N}^{ind}}{P}_{t}^{prop}.\end{array}$$

$$\begin{array}{c}\hfill {\left({NPL}_{{l}^{I}}\right)}_{t}^{b}+={(pl)}_{t}^{{I}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{C}})}_{t}^{b}+={(pl)}_{t}^{{C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{H}})}_{t}^{b}+={(pl)}_{t}^{{H}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{NH}})}_{t}^{b}+={(pl)}_{t}^{{NH}^{ind}},\end{array}$$

The bank may become a new temporary owner of the property if the household was removed from the database after the default. The property is marked for sale. After selling, we update the value of bank’s revenues:

$$\begin{array}{c}\hfill {({Rev}_{{l}^{H}})}_{t}^{b}+={P}_{t}^{prop}.\end{array}$$

In this submodule, the desired consumption of goods in the current period in a particular industry by the household is determined. Households can finance their consumption entirely by their own means or apply for consumer credit. The basic amount of good purchased from the industry $({Q}_{basic}^{HH.(cons)})$ is given by:
where parameter value ${\alpha}_{43.tc.s}$ is specific to industry and customer type. The parameter expresses the percentage of total consumption that is, household purchases from all industries. When buying from several industries, we assume ${\sum}_{s=1}^{S}{\alpha}_{43.tc.s}=1,\phantom{\rule{4pt}{0ex}}$ where S is the number of industries. If the household consume only the quantity ${Q}_{t}^{HH.(cons)}={Q}^{HH.{(cons)}_{basic}}$ we proceed to the Supplier searching module.

$$\begin{array}{c}\hfill {Q}_{basic}^{HH.(cons)}=\phantom{\rule{4pt}{0ex}}{\alpha}_{43.tc.s}\times \frac{{\sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind}-{\sum}_{i=1}^{{N}^{ind.HH}}({l}_{it}^{{C}_{q}^{ind}}+{R}_{it}^{{C}_{q}^{ind}}+{l}_{it}^{{H}_{q}^{ind}}+{R}_{it}^{{H}_{q}^{ind}}+{l}_{it}^{N{H}_{q}^{ind}}+{R}_{it}^{{NH}_{q}^{ind}})}{{P}_{t}^{s}\times \left(1+{t}_{VAT}^{s}\right)},\end{array}$$

In the case of taking a loan, consumption funds are increased by the amount of the loan less debt burden and service. The loan can only be granted if the following basic condition is met:
In this case the quantity of loans is given by the formula:
The parameter value ${\alpha}_{45.tc.s}$ is specific to industry and customer type, while ${\alpha}_{46.s}$ is industry-specific. With a certain probability (${pr}_{2}$), an individual tries to obtain the quantity in the matched bank in the database (${Id}_{{l}_{t}^{C}}^{bank.\left(ind\right)}$). In this case, the supply from the bank and creditworthiness are checked in the Supply side checking 1 (M.15) and Consumer credit admissibility 1 (M.17). The individual can also try to obtain the loan from other banks. In such cases, interest rates are compared, and Supply side checking 2 (M.16) and Consumer credit admissibility 2 (M.18) are proceeded to.

$$\begin{array}{c}\hfill \left\{{y}_{t}^{HH}-{h}_{t}^{HH}-{\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{it}^{{C}_{q}^{ind}}+{R}_{it}^{{C}_{q}^{ind}}+{l}_{it}^{{H}_{q}^{ind}}+{R}_{it}^{{H}_{q}^{ind}}+{l}_{it}^{N{H}_{q}^{ind}}+{R}_{it}^{{NH}_{q}^{ind}})\right\}\ge {\alpha}_{44}\times {N}_{t}^{ind.HH}.\end{array}$$

$$\begin{array}{c}\hfill {l}_{temp}^{{C}^{ind}}={\alpha}_{45.tc.s}\times \left\{{y}_{t}^{HH}-{h}_{t}^{HH}-{\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{it}^{{C}_{q}^{ind}}+{R}_{it}^{{C}_{q}^{ind}}+{l}_{it}^{{H}_{q}^{ind}}+{R}_{it}^{{H}_{q}^{ind}}+{l}_{it}^{N{H}_{q}^{ind}}+{R}_{it}^{{NH}_{q}^{ind}})\right\}+{\alpha}_{46.s}.\end{array}$$

In the Supply side checking 1 (M.15) submodule it is checked whether the bank assigned to the household has sufficient funds to grant the loan (${S}_{t}^{{l.C}^{ind}}\ge {l}_{t}^{{C}^{ind}}$), whether the bank’s policy will allow another loan to be granted, and whether the regulatory requirement for sectoral exposures is met (${l}_{t}^{{C}^{ind}}<{\alpha}_{47})$. In the Supply side checking 2 (M.16) submodule, we check whether any bank selected from the list of banks offering consumer loans at a specified interest rate has sufficient credit supply and that the regulatory requirements for sectoral exposures are met. If none is able to give this amount, the amount of loan is adjusted using adaptive algorithm (${\tilde{l}}_{t}^{{C}^{ind}}$).

In submodules M.17 & M.18, household creditworthiness is checked with the bank assigned to the household or other bank (from the list of banks) selected in the Supply side checking 2 (M.18) submodule. The first condition relates to the level of income per person after deduction of repayments of other loans. This level is specific to each bank:
The next conditions relate to credit history of the household (the probability of default of members of the family) ($({PD)}_{t}^{ind.HH}\le {\alpha}_{49.b}$), and the maximum number of loans that can be granted to one household. If all conditions are met, the loan can be granted. For all loans granted to individuals and households, the applicant age (${(Age)}_{t}^{ind}\ge 18)$ and status of the labour market (${\Xi}_{t}^{ind}=\{3||5\}$) are also checked. It is also possible to include a variable which counts the elapsed time since the last change in status on the labour market. If the individual works less than 4 quarters and is under 30, it is assumed that they have a fixed-term contract and no creditworthiness.

$$\begin{array}{c}\hfill \left\{{y}_{t}^{HH}-{{h}_{t}^{HH}}_{t}-({\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}\left({l}_{it}^{{C}_{q}^{ind}}+{R}_{it}^{{C}_{q}^{ind}}+{l}_{it}^{{H}_{q}^{ind}}+{R}_{it}^{{H}_{q}^{ind}}+{l}_{it}^{N{H}_{q}^{ind}}+{R}_{it}^{{NH}_{q}^{ind}}\right))\right\}\ge {\alpha}_{50.b}\times {N}_{t}^{ind.HH}.\end{array}$$

In this submodule, maturity is assigned to the loan (${\mathrm{M}}^{{C}^{ind}}$) depending on the amount of loan granted. Next, the value of debt service is updated, taking into account the civil status of the household members.
The amount of credit granted by the bank, the supply of the credit and the revenues of the bank in the given period are also increased.
Finally, the amount of consumer goods to be purchased from different industries is computed.

$$\begin{array}{c}\hfill {l}_{t}^{{C}^{ind}}=\frac{1}{{N}_{t}^{adults.HH}}\times {l}_{temp}^{{C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{C}_{q}^{ind}}=\frac{1}{{N}_{t}^{adults.HH}}\times \frac{{l}_{temp}^{{C}^{ind}}}{{\mathrm{M}}^{{C}^{ind}}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{C}^{ind}}+=\frac{1}{{N}_{t}^{adults.HH}}\times {l}_{temp}^{{C}^{ind}}\phantom{\rule{4pt}{0ex}}{\times \left(1+{i}_{{l}^{C}}\right)}^{{\mathrm{M}}^{{C}^{ind}}}-{l}_{temp}^{{C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{C}_{q}^{ind}}=\frac{{R}_{t}^{{C}^{ind}}}{{\mathrm{M}}^{{C}^{ind}}}.\end{array}$$

$$\begin{array}{c}\hfill {S}_{t}^{{l.C}^{ind}}-={l}_{temp}^{{C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {({Rev}_{{l}^{C}})}_{t}^{b}+={R}_{t}^{{C}_{q}^{ind}}.\end{array}$$

$$\begin{array}{c}\hfill {Q}_{t}^{HH.(cons)}=\phantom{\rule{4pt}{0ex}}{Q}_{basic}^{HH.(cons)}+\frac{{\alpha}_{43.tc.s}\times {l}_{t}^{{C}^{ind}}}{{\mathrm{M}}^{{C}^{ind}}\times \{{P}_{t}^{s}\times (1+{t}_{VAT})\}}.\end{array}$$

The household next chooses the supplier. If the current supplier has sufficient stock of good (${Inv}_{t}^{est.(sup)}$) and the ratio of quality to price is higher than average ratio in the sector, then the household purchases the goods (${Q}_{t}^{HH.(cons)}$) from this supplier.
Otherwise, the household seeks a new supplier from incrementally more distant spatial locations. The requirements for the same spatial codes are loosened sequentially. Later, in the Purchase.hhs submodule, the profits from sales ${((Sl)}_{t}^{est.(sup)})$, demand (${Q}_{t}^{{d}_{est.(sup)}}$), stock (${Inv}_{t}^{est.(sup)}$), liquid assets (${(LA)}_{t}^{est.(sup)}$) of suppliers are updated. In addition, deposits of consumers are updated.

$$\begin{array}{c}\hfill {Inv}_{t}^{est.(sup)}\ge {Q}_{t}^{HH.(cons)}\phantom{\rule{4pt}{0ex}}\&\&\frac{{\alpha}_{22.s-sup}\times {(Ql)}_{t}^{est.(sup)}}{{\alpha}_{23.s-sup}\times {P}_{t}^{est(.sup)}}>\frac{{\alpha}_{24.s-sup}\times {(Ql)}_{t}^{s}}{{\alpha}_{25.s-sup}\times {P}_{t}^{s}}.\end{array}$$

$$\begin{array}{c}\hfill {(Sl)}_{t}^{est.(sup)}+={P}_{t}^{est(.\mathrm{sup})}\times {Q}_{t}^{HH.(cons)}\end{array}$$

$$\begin{array}{c}\hfill {Q}_{t}^{{d}_{est.(sup)}}+\phantom{\rule{4pt}{0ex}}=\phantom{\rule{4pt}{0ex}}{Q}_{t}^{HH.(cons)}\end{array}$$

$$\begin{array}{c}\hfill {Inv}_{t}^{est.(sup)}-\phantom{\rule{4pt}{0ex}}={Q}_{t}^{HH.(cons)}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est.(sup)}+={P}_{t}^{est(.sup)}\times {Q}_{t}^{HH.(cons)}\end{array}$$

$$\begin{array}{c}\hfill {d}_{it}^{ind}-=\frac{1}{{N}_{t}^{adults.HH}}{P}_{t}^{est(.sup)}\times {Q}_{t}^{HH.(cons)}.\end{array}$$

In this module, we complement the demand of the private sector with demand from the public sector. Public contracts are usually signed by large companies. A public contract is awarded when the product price is lower than the average price of the product in the sector (${P}_{t}^{est}\le {P}_{t}^{s}$). In addition, the probability of signing contracts increases with the size of the business and the quality of the product. If the terms of the contract are met, the value of the stored goods (${Inv}_{t}^{est}$), the demand for good (${Q}_{t}^{{d}_{est.(sup)}}$), liquid assets of the supplier ${(LA)}_{t}^{est}$ and the value of sales ${(Sl)}_{t}^{est}$ are updated. The stock cannot be lower than the minimum fraction of production $({Y}_{t}^{est}$) given by the parameter ${\alpha}_{57}$.

$$\begin{array}{c}\hfill {Inv}_{t}^{est.(sup)}-=max\{0;min\left({Inv}_{t}^{est.(sup)},\phantom{\rule{4pt}{0ex}}{\alpha}_{57}\times {Y}_{t}^{est.(sup)}\right)\}\end{array}$$

$$\begin{array}{c}\hfill {Q}_{t}^{{d}_{est.(sup)}}+=min\left({Inv}_{t}^{est.(sup)},\phantom{\rule{4pt}{0ex}}{\alpha}_{57}\times {Y}_{t}^{est.(sup)}\right)\phantom{\rule{4pt}{0ex}}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{est.(sup)}+={\alpha}_{58}\times min\left({Inv}_{t}^{est.(sup)},\phantom{\rule{4pt}{0ex}}{\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{3.33333pt}{0ex}}}_{57}\times {Y}_{t}^{est.(sup)}\right)\phantom{\rule{4pt}{0ex}}\end{array}$$

$$\begin{array}{c}\hfill {(Sl)}_{t}^{est.(sup)}+={\alpha}_{58}\times min\left({Inv}_{t}^{est.(sup)},\phantom{\rule{4pt}{0ex}}{\phantom{\rule{4pt}{0ex}}\alpha \phantom{\rule{3.33333pt}{0ex}}}_{57}\times {Y}_{t}^{est.(sup)}\right)\phantom{\rule{4pt}{0ex}}.\end{array}$$

The term property refers to the value of apartment or houses, with or without land. Households live in properties they own (${(Own)}_{t}^{HH}=1)$ or rent property from other households (${(Own)}_{t}^{HH}=0)$. The household may own more than one property. Real estate may be subject to residential $\left({l}_{t}^{{H}^{ind}}\right)\phantom{\rule{4pt}{0ex}}$ and non-residential loans (${l}_{t}^{{NH}^{ind}}$). If the household lives in their own property, then the cost of living is equal to the sum of the financial obligations of the owners of the building, that is, the adult individuals forming the household who bought the property:
where parameters ${\beta}_{0}$ and ${\beta}_{1}$ adjust the fixed and the variable parts of accommodation cost.

$$\begin{array}{c}\hfill {h}_{t}^{HH}={\beta}_{0}+\phantom{\rule{4pt}{0ex}}{\beta}_{1}\times \{{\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{t}^{{H}_{q}^{ind.HH}}+\phantom{\rule{4pt}{0ex}}{R}_{t}^{{H}_{q}^{ind}})\},\end{array}$$

The cost of renting is calculated as a part ${\beta}_{1}$ of the sum of liabilities to the bank (loans) and the part ${\beta}_{4}$ of the cost of rent, calculated as the ratio of the price of the property to the number of households that rent this property.
In the first case of ownership, if the rental cost is greater than the specified parameter ${\beta}_{2}$ (part of the income ${y}_{t}^{HH}$), the household decides to sell the property. If the property was already marked for sale (${(ForSale)}_{t}^{prop}=1$), then the price (${P}_{t}^{prop}$) has to be decreased by a percentage ${\beta}_{3}$. In practice, the parameter ${\beta}_{3}$ reflects how much the price has to be lowered in order to sell the property in next iteration. In the second case, if a household rents a property and the cost of rent is too high, it will start looking for a new home. The household looks for another building considering the status on the labour market (${\Xi}_{t}^{int}=\{3||5\}$) and the age of the household members (${(Age)}_{t}^{ind}\ge 18$). If two adults in the household are working, the program randomly selects one of them and searches for a building near the person’s workplace (the algorithm checks and compares the spatial codes: ${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{1}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{2}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{3}},{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{4}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{1}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{2}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{3}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{4}}$). In addition to property locations, households take into account the price of the property from the appropriate price range and whether the building is for sale. If more than one property meets the criteria, one is selected at random and the spatial codes attributing the individual to the respective spatial units are updated.

$$\begin{array}{c}\hfill {h}_{t}^{HH}={\beta}_{1}\times \{{\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{t}^{{H}_{q}^{ind.HH}}+\phantom{\rule{4pt}{0ex}}{R}_{t}^{{H}_{q}^{ind}})\}+{\beta}_{4}\times {\displaystyle \frac{{P}_{t}^{prop}}{{(\#Rent)}_{t}^{prop}}}\end{array}$$

If two adults are not working (${\Xi}_{t}^{int}=\{1||2\}$) and the difference between the sum of individual deposits and the sum of the individual liabilities of family members is less than the subsistence level expressed by the parameter ${\beta}_{7}$, then the individuals are removed from the database, the household is removed from the database, and the corresponding records from the object Consumers are deleted as well.
The exception is a situation in which an adult is under 25. Then the assumption applies that they are still living with their parents. If individuals and households are removed from the database, all records related to insolvency are updated. Consequently, the non-performing loans for a given bank and sectors are increased. The probability of bank’s default increases as well. Especially,
where ${(pl)}_{t}$ is the sum of liabilities to the bank for outstanding (respectively investment, consumer, housing and non-housing) loans that have to be repaid in the given iteration.

$$\begin{array}{c}\hfill {\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind.HH}-{\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{t}^{{H}_{q}^{ind}}+\phantom{\rule{4pt}{0ex}}{R}_{t}^{{H}_{q}^{ind}})\}+{\beta}_{4}\times {\displaystyle \frac{{P}_{t}^{prop}}{{\left(\#Rent\right)}_{t}^{prop}}}\phantom{\rule{4pt}{0ex}}<\phantom{\rule{4pt}{0ex}}{\beta}_{7}\end{array}$$

$$\begin{array}{c}\hfill {\left({NPL}_{{l}^{I}}\right)}_{t}^{b}+={(pl)}_{t}^{{I}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{C}})}_{t}^{b}+={(pl)}_{t}^{{C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{H}})}_{t}^{b}+={(pl)}_{t}^{{H}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{NH}})}_{t}^{b}+={(pl)}_{t}^{{NH}^{ind}}\end{array}$$

In this module, property attributes are updated if the household obtains profits from renting the property. The algorithm checks all household properties. The primary property (${(PH)}_{t}^{prop}=1$) cannot be sublet to another household. If the household has a second property (${(PH)}_{t}^{prop}=0$), the number of households that live in the house is checked. If none live there, it is marked for sale (${(ForSale)}_{t}^{prop}=1$). If it was previously marked for sale (${(ForSale)}_{t-1}^{prop}=1$), its price is reduced by a certain percentage of the value that is specified by the parameter ${\beta}_{3}$.
Revenues from renting second property (${(Rent)}_{{RE}_{t}}^{HH}$) are updated according to:

$$\begin{array}{c}\hfill {P}_{t}^{prop}={\beta}_{3}\times {P}_{t-1}^{prop}.\end{array}$$

$$\begin{array}{c}\hfill {(Rent)}_{{RE}_{t}}^{HH}+={\beta}_{4}\times {P}_{t}^{prop}.\end{array}$$

In this sub-module the household decides how to finance the purchase of houses and other non-housing purchases. If the current funds and savings in the bank account are greater than the price of the cheapest property on the market that has already been marked for sale (${(ForSale)}_{t-1}^{prop}=1$), it can potentially buy a property in cash.
In practice, we assume that a household buys a property in cash, only with a given probability (${pr}_{3}$) in the model. If a member of the household is an individual who owns the firm (${(Entr)}_{t}^{ind}=1$) or is unemployed (${\Xi}_{t}^{ind}=2$) with a high entrepreneurial spirit (${(EntrS)}_{t}^{ind}>\phantom{\rule{4pt}{0ex}}0.5$), then the funds will be first invested in the firm rather than housing or non-housing purchases. We update the status of individual as an entrepreneur ${((Entr)}_{t}^{ind}=1)$. If a household does not have enough resources to buy a property in cash, it will apply for a loan and the sub-module Macroprudential ratios is moved to.

$$\begin{array}{c}\hfill {\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind.HH}-{\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{t}^{{H}_{q}^{ind}}+\phantom{\rule{4pt}{0ex}}{R}_{t}^{{H}_{q}^{ind}})\}\phantom{\rule{4pt}{0ex}}>\phantom{\rule{4pt}{0ex}}{P}_{{min}_{t}}^{prop}.\end{array}$$

In this submodule, macroprudential ratios are computed. In addition, the total indebtedness, debt servicing and total assets held by the household are computed as a temporal variables. The following macroprudential ratios were included in the system for residential and non-residential loans: total debt to assets ratio, debt to income ratio, debt service to income ratio, loan-to-value ratio.

$$\begin{array}{c}\hfill {(IndebtQ)}_{temp}^{HH}={\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{it}^{{C}_{q}^{ind}}+{l}_{it}^{{H}_{q}^{ind}}+{l}_{it}^{N{H}_{q}^{ind}}+{l}_{it}^{{I}_{q}^{ind}})\end{array}$$

$$\begin{array}{c}\hfill {(DServiceQ)}_{temp}^{HH}={\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({{R}_{it}^{{C}_{q}^{ind}}+R}_{it}^{{H}_{q}^{ind}}+{R}_{it}^{{NH}_{q}^{ind}}+{R}_{it}^{{I}_{q}^{ind}})\end{array}$$

$$\begin{array}{c}\hfill {(AssetsQ)}_{temp}^{HH}={\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind.HH}\end{array}$$

$$\begin{array}{c}\hfill {(DTA)}_{t}^{HH}=\frac{{(IndebtQ)}_{temp}^{HH}}{{(AssetsQ)}_{temp}^{HH}}\end{array}$$

$$\begin{array}{c}\hfill {(DTI)}_{t}^{HH}=\phantom{\rule{4pt}{0ex}}\frac{{(IndebtQ)}_{temp}^{HH}}{{y}_{t}^{HH}}\end{array}$$

$$\begin{array}{c}\hfill {(DSTI)}_{t}^{HH}=\frac{{(DServiceQ)}_{temp}^{HH}}{{y}_{t}^{HH}}\end{array}$$

$$\begin{array}{c}\hfill {(LTV)}_{t}^{HH}=\frac{{\sum}_{i=1}^{{N}^{ind.HH}}{l}_{it}^{{H}^{ind}}}{{P}_{t}^{prop}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}.\end{array}$$

In this sub-module, the household’s creditworthiness and supply side conditions are checked. Firstly, basic requirements are checked. If the household debt ratios exceed regulatory requirements, the household lacks creditworthiness (${(DSTI)}_{t}^{HH}>{\beta}_{8.b}||\phantom{\rule{4pt}{0ex}}{\left(DTI\right)}_{t}^{HH}>{\beta}_{9.b}||\phantom{\rule{4pt}{0ex}}{(DTA)}_{t}^{HH}>{\beta}_{10.b})$. Likewise, if all household members study, they are inactive on the labour market or are living on social benefits (${\Xi}_{t}^{ind}=\{1|\left|2\right||4\}$). The model also takes into account the situation of people under the age of 30 who work less than 1 year in a company that also do not have creditworthiness $(({\Xi}_{t}^{ind}\phantom{\rule{3.33333pt}{0ex}}=\phantom{\rule{3.33333pt}{0ex}}3\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{\left(Age\right)}_{t}^{ind}\phantom{\rule{3.33333pt}{0ex}}<\phantom{\rule{3.33333pt}{0ex}}30$ && ${\mathsf{\Psi}}_{t}^{ind}\le 4)\phantom{\rule{4pt}{0ex}}||\phantom{\rule{4pt}{0ex}}({\mathsf{\Lambda}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{ind}=2\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{\Xi}_{t}^{ind}=(1\left|\left|2\right|\right|4)\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{\Xi}_{t}^{ind}=3\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}{\left(Age\right)}_{t}^{ind}<30$ && ${\mathsf{\Psi}}_{t}^{ind}\le 4\phantom{\rule{4pt}{0ex}}))$. Then the value of collateral is estimated. For the all properties that the household owns, the property prices are summed up (${(Collat)}_{temp}^{max}+={P}_{t}^{prop}$). Households may apply for a residential or non-residential loan under a pledge of real estate. If the household owns at least one property, it will apply for a residential loan with a given probability, and for a non-residential loan with one minus that probability. On the other hand, if a household has rented a property (i.e., is not an owner), it will first apply for a residential loan. In most cases, the first property is bought in cash. The value of the mortgage loan is equal to the difference between the price of the cheapest real estate on the market, and the savings (less the charges for other loans); this is according to the following equation:
where ${\phantom{\rule{4pt}{0ex}}(Debt)}_{temp}^{HH},\phantom{\rule{4pt}{0ex}}{(DebtServ)}_{temp}^{HH}$ are given by the expressions:
Households choose a bank with which to apply for a loan, taking into account the interest rate. At the same time, the bank must have sufficient funds and be willing to accept the LTV ratio of applicant (${LTV}_{temp}^{HH}=(({l}_{t}^{{H}^{ind}}+{l}_{t}^{{NH}^{ind}})/{P}_{t}^{prop})$). If the household does not obtain credit in the bank that offers the lowest interest rate, it resubmits the request to another bank on the list that requires a higher interest rate. After receiving the loan, the household buys the property. The value of housing loans granted by the bank is also updated. The value of the household loans obtained is then updated. If the household consists of a marriage, the value of granted loans is halved. If the property is the main residence, the cost of accommodation is also updated. In the case of non-residential loans, the scheme works in an analogous way, with the value of the residential loan being equal to:
After checking the creditworthiness and credit supply of the selected bank, the value of non-residential loans obtained are updated, taking into account the civil status of household members.

$$\begin{array}{c}\hfill {l}_{temp}^{{H}^{HH}}={P}_{{min}_{t}}^{prop}-{\beta}_{15}\times ({\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind.HH}-{(Debt)}_{temp}^{HH}-{(DebtServ)}_{temp}^{HH})\end{array}$$

$$\begin{array}{c}\hfill {(Debt)}_{temp}^{HH}={\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}\left({(pl)}_{it}^{{C}_{q}^{ind}}+(p{l)}_{it}^{{H}_{q}^{ind}}+{\left(pl\right)}_{it}^{N{H}_{q}^{ind}}+{\left(pl\right)}_{it}^{{I}_{q}^{ind}}\right)\end{array}$$

$$\begin{array}{c}\hfill {(DebtServ)}_{temp}^{HH}={\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}\left({R}_{it}^{{C}_{q}^{ind}}+{R}_{it}^{{H}_{q}^{ind}}+{R}_{it}^{{NH}_{q}^{ind}}+{R}_{it}^{{I}_{q}^{ind}}\right)\end{array}$$

$$\begin{array}{c}\hfill {l}_{temp}^{{NH}^{HH}}={\beta}_{13.tc}\times {\{P}_{{min}_{t}}^{prop}-{\beta}_{15}\times ({\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind.HH}-{\left(Debt\right)}_{temp}^{HH}-{\left(DebtServ\right)}_{temp}^{HH})\}.\end{array}$$

Individuals’ records updating module ensures the maintenance of demographic trends observed empirically in the simulation. The heterogeneity of individuals has been taken into account, as has population dynamics.

In the first sub-module the individuals may die with probabilities $({\rho}_{age.gender}$) depending on age (${(Age)}_{t}^{ind}$) and gender (${G}^{ind}=\{0||1\}$). If a person dies, after the submodules Inheritor (M.28) and Inheritance (M.29 & M.30) have been applied, the individual is deleted from the database. This insolvency has a direct impact on the banks in the form of an increase in non-performing loans. In the case of survival of an individual, the program increases the age of the person (${(Age)}_{t}^{ind}++$) and the period since the last change of status on the labour market (${\mathsf{\Psi}}_{t}^{ind}++$) and continues in the sub-module Updating consumer type (M.31).

In this submodule, the heir in the event of death of an individual is determined. First, the age of the deceased person is checked. If the deceased person was an adult (${(Age)}_{t}^{ind}\ge 18$), inheritance may be considered. Then, all members of the households and adults in the households are counted. If an adult over the age of 18 has died, who does not have family, the labor status of this individual is checked (${\Xi}_{t}^{ind}$). If this individual was an entrepreneur (${\Xi}_{t}^{ind}=5$), the number of employees (${\mathrm{L}}_{t}^{firm}$), in the company is checked. If it was a sole proprietorship, then the firm is for sale (${(ForSale)}_{t}^{firm}=1$). Otherwise, one of workers in their company who earned the highest wage in the previous period is selected. If the deceased person was not an entrepreneur, then the algorithm selects an inheritor at random from the group of working adults (${\Xi}_{t}^{ind}\ne 1\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{(Age)}_{t}^{ind}\ge 18$). If a child dies (${(Age)}_{t}^{ind}\le 18$), they do not leave material property, rather the consumer type of the child’s parents changes. If the parents have no more children and if all household members are over 67 years old then we update the consumer type (${(ConsT)}_{t}^{cons}=3$). If both parents were under 67, they are also updated to another consumer type (${(ConsT)}_{t}^{cons}=4$). If the family consists of more than two adults then the consumer type is also updated (${(ConsT)}_{t}^{cons}=6$). If the deceased adult person has a family, then two cases must be differentiated. If they had children, the eldest person in the family is the inheritor and the consumer type does not change (${(ConsT)}_{t}^{cons}=\{5||6\}$). If there were no children, then the spouse is the inheritor and the consumer type changes depending on the age of the spouse $({(ConsT)}_{t}^{cons}=\{1||2\})$. If the deceased adult was a single parent, then the adoption of a child is considered in the model in the module Adoption. The algorithm looks for a new couple or a single individual to be a parent and sum up deposits, ownership of properties and firms. If they own more than two properties, they are designated for sale (${(ForSale)}_{t}^{firm}=1$). We remove the deceased person from the database. We continue to the Inheritance modules (M.29 & M.30).

In this submodule, we pass the deposits and firms to the inheritor. Firstly, savings after deductions of housing loans pending to be paid are given to the inheritor. If these savings are greater than zero (${d}_{t}^{dec.ind}-\left({(pl)}_{t}^{{H}^{ind}}+{(pl)}_{t}^{{NH}^{ind}}\right)>0$), then the deposits of the heir are updated.
The parameter ${t}_{inh}\phantom{\rule{4pt}{0ex}}$ stands for taxes that must be paid. In the model we assumed that consumer loans are not inherited and hence the inflow of non-performing loans of banks (${({NPL}_{{l}^{C}})}_{t}^{b}$) and the probability of default of bank (${(PD)}_{t}^{b}$) are updated.
If individual debts are greater than savings, then the variables are updated separately. In this way it is possible for the heir to inherit the debt from the loan taken in the past.
As the non-performing consumer loans increase, the probability of default of bank (${(PD)}_{t}^{b}$) increases as well. If the deceased person was not the owner of the firm, then we update savings (deposits) only. Otherwise, the inheritor may or may not run the business in the future. The decision on running a business depends on their previous earnings relative to the potential income from business activity.
If the inheritor decides to run the business, the status of entrepreneur (${(Entr)}_{t}^{ind}=1$), the labor status (${\Xi}_{t}^{ind}=5$) and the number of periods since the last change in labor status (${\mathsf{\Psi}}_{t}^{ind}=0$) are updated. The public assistance is ceased (${(sub)}_{t}^{ind}=0$). The inheritor is responsible for paying back the investment loans.
If the inheritor decides to sell, the company is marked for sale (${(ForSale)}_{t}^{firm}=1$). The inflow of non-performing loans is increased by the amount of investment loans that will not be paid. The probability of default of bank (${(PD)}_{t}^{b}$) is also increased in that case.

$$\begin{array}{c}\hfill {d}_{t}^{heir.ind}+=(1-{t}_{inh})\times \left({d}_{t}^{dec.ind}-{\left(pl\right)}_{t}^{{H}^{ind}}-{(pl)}_{t}^{{NH}^{ind}}\right)\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{C}})}_{t}^{b}+={(pl)}_{t}^{{C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {d}_{t}^{heir.ind}+=(1-{t}_{inh})\times {d}_{t}^{dec.ind}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{H}^{heir.ind}}+={(pl)}_{t}^{{H}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{t}^{{H}^{heir.ind}}+={(pl)}_{t}^{{H}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{H}_{q}^{heir.ind}}+={l}_{t}^{{H}_{q}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{H}^{heir.ind}}+={R}_{t}^{{H}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{H}_{q}^{heir.ind}}+={R}_{t}^{{H}_{q}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{NH}^{heir.ind}}+={(pl)}_{t}^{N{H}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{t}^{{NH}^{heir.ind}}+={(pl)}_{t}^{{NH}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{NH}_{q}^{heir.ind}}+={l}_{t}^{{NH}_{q}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{NH}^{heir.ind}}+={R}_{t}^{{NH}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{NH}_{q}^{heir.ind}}+={R}_{t}^{{NH}_{q}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{C}})}_{t}^{b}+={(pl)}_{t}^{{C}^{ind}}.\end{array}$$

$$\begin{array}{c}\hfill {w}_{t}^{inh.ind}+{(sub)}_{t}^{inh.ind}<rndm(0,1)\times {w}_{t}^{dec.ind}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{I}^{heir.ind}}+={(pl)}_{t}^{{I}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{t}^{{I}^{heir.ind}}+={(pl)}_{t}^{{I}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{I}_{q}^{heir.ind}}+={l}_{t}^{{I}_{q}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{I}^{heir.ind}}+={R}_{t}^{{I}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{I}_{q}^{heir.ind}}+={R}_{t}^{{I}_{q}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{I}})}_{t}^{b}+={(pl)}_{t}^{{I}^{ind}}.\end{array}$$

In this module, the number of adults who were in the household of deceased person is checked, as is whether the deceased person rented (${(Own)}_{t}^{HH}=0$) or owned their residence (${(Own)}_{t}^{HH}=1$). If the the deceased individual rented his residence, then the number of households that rents this property needs to decrease (${(\#Rent)}_{t}^{prop}--$). If the deceased person owned their residence and had no mortgage, then the property is marked for sale (${(ForSale)}_{t}^{firm}=1$). However, if the deceased person had a housing loan to buy the property, the bank receives the property and attempts to sell it (${(ForSale)}_{t}^{firm}=1$). The bank looks for any household which sum of deposits (${\sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind.HH}$) is greater than the property price (${P}_{t}^{prop}$). If it is found, then the bank updates the inflow of non-performing loans (${({NPL}_{{l}^{H}})}_{t}^{b},\phantom{\rule{4pt}{0ex}}{({NPL}_{{l}^{NH}})}_{t}^{b})$ and the revenue from selling the property (${({Rev}_{{l}^{H}})}_{t}^{b}$).
where ${\beta}_{22}$ expresses the transaction costs.

$$\begin{array}{c}\hfill {({NPL}_{{l}^{H}})}_{t}^{b}+={(pl)}_{t}^{{H}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {({NPL}_{{l}^{NH}})}_{t}^{b}+={(pl)}_{t}^{{NH}^{dec.ind}}\end{array}$$

$$\begin{array}{c}\hfill {({Rev}_{{l}^{H}})}_{t}^{b}+=(1-{\beta}_{22})\times {P}_{t}^{prop}\end{array}$$

The new owners of the property proportionally update the deposits (${d}_{t}^{ind.HH}$) after the purchase.
If the bank is not able to sell the property, the price (${P}_{t}^{prop}$) is lowered gradually:

$$\begin{array}{c}\hfill {d}_{t}^{ind.HH}-=\frac{1}{{N}^{ind.HH}}\times (1-{\beta}_{22})\times {P}_{t}^{prop}\end{array}$$

$$\begin{array}{c}\hfill {P}_{t}^{prop}=0.95\times {P}_{t-1}^{prop}.\end{array}$$

In this module the consumer type of the household is updated. If the individual reaches the age of 67, then the consumer type of the household the individual belongs to is updated (ie. ${(ConsT)}_{t}^{cons}$=1 if the individual was single, while ${(ConsT)}_{t}^{cons}=3\phantom{\rule{4pt}{0ex}}$ if was married). If the individual become an adult (${(Age)}_{t}^{ind}=18$), then a new household is created. The individual continues to live in the same property. The accommodation cost and the income are computed according to the formulas expressed in the previous modules (M.11, M.12 & M.22).

In this submodule the level of education is updated. If an individual continues to study (${(EducP)}_{t}^{ind}+\phantom{\rule{3.33333pt}{0ex}}+$) and exceeds the number of periods that is needed to complete a particular level of education (i.e., primary school, secondary school, college, university degree, doctoral school), then a variable describing their education level (${(Educ)}_{t}^{ind}++$) is updated.

The individuals continue education with a probability depending on age and gender (${pr}_{age.gender}$). According to this probability, the completed level of education $({(Educ)}_{t}^{ind}$), labour market status (${\Xi}_{t}^{ind}$) of an individual and the number of periods that have passed since the last change of status in the labour market (${\mathsf{\Psi}}_{t}^{ind}++$) are updated. In this module the labor status of individuals that continue education is set to one (${\Xi}_{t}^{ind}$=1).

In this submodule, individuals may divorce. The algorithm checks the civil status of individuals (${\mathsf{\Lambda}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{ind}$). The probability of divorce depends on the age of the spouses (${pr}_{40.age}$). After the divorce, a new household is created for ex-husband and the consumer types (${(ConsT)}_{t}^{cons}$) are adjusted. In the case of divorce, children always stay with the mother. The ex-husband pays the alimony $({(Don)}_{t}^{\left(husb\right).HH})$ which depends on his earnings (${w}_{t}^{ind}$) and the number of children (${(\#child)}_{temp}$).
Both adults remain in the same property hence they both contribute to rent to cover the accommodation cost. The ex-wife is the owner, while the ex-husband lives there temporary. If the marriage had more than two properties, then each of them stays in one of them and the rest is for sale (${(ForSale)}_{t}^{prop}=1$). Their status of the owner (${(Own)}_{t}^{HH}=1$), the variable principal housing (${(PH)}_{t}^{prop}=1$) and the number of families that rent the property (${(\#Rent)}_{t}^{prop}--$) are updated. If the property was purchased by credit, then the amount of loans pending to be paid by ex-wife has to be updated as well.
$$\begin{array}{c}\hfill {l}_{t}^{{NH}^{\left(wife\right).ind}}+={l}_{t}^{{NH}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{l}_{t}^{{NH}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {\left(Don\right)}_{t}^{\left(wife\right).HH}+={\beta}_{39}\times {w}_{t}^{ind}\times {(\#child)}_{temp}\end{array}$$

$$\begin{array}{c}\hfill {(Don)}_{t}^{\left(husb\right).HH}-={\beta}_{39}\times {w}_{t}^{ind}\times {(\#child)}_{temp}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{H}^{\left(wife\right).ind}}+={l}_{t}^{{H}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{l}_{t}^{{H}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{t}^{{H}^{(wife).ind}}+={(pl)}_{t}^{{H}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{(pl)}_{t}^{{H}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{H}_{q}^{\left(wife\right).ind}}+={l}_{t}^{{H}_{q}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{l}_{t}^{{H}_{q}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{H}^{\left(wife\right).ind}}+={R}_{t}^{{H}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{R}_{t}^{{H}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{H}_{q}^{\left(wife\right).ind}}+={R}_{t}^{{H}_{q}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{R}_{t}^{{H}_{q}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{NH}^{\left(wife\right).ind}}+={l}_{t}^{{NH}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{l}_{t}^{{NH}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{t}^{{NH}^{\left(wife\right).ind}}+={(pl)}_{t}^{{NH}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{(pl)}_{t}^{{NH}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{N{H}_{q}^{\left(wife\right).ind}}+={l}_{t}^{N{H}_{q}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{l}_{t}^{N{H}_{q}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{NH}^{\left(wife\right).ind}}+={R}_{t}^{{NH}^{\left(husb\right).ind}},\phantom{\rule{4pt}{0ex}}{R}_{t}^{{NH}^{\left(husb\right).ind}}=0\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{NH}_{q}^{\left(wife\right).ind}}+={R}_{t}^{{NH}_{q}^{(husb).ind}},\phantom{\rule{4pt}{0ex}}{R}_{t}^{{NH}_{q}^{(husb).ind}}=0.\end{array}$$

Each single adult can get married in the model. The probability of getting married depends on civil status, age and gender (${pr}_{civ.st.age.gend}$). In the model, the age difference between partners should not exceed 10 years (${|(Age)}_{t}^{ind1}-{\left(Age\right)}_{t}^{ind2}|<10\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{G}^{ind1}\ne {G}^{ind2}\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{\left(Age\right)}_{t}^{ind1},{\left(Age\right)}_{t}^{ind2}\phantom{\rule{3.33333pt}{0ex}}>\phantom{\rule{3.33333pt}{0ex}}18,\phantom{\rule{4pt}{0ex}}{\mathsf{\Lambda}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{ind}\phantom{\rule{3.33333pt}{0ex}}\ne \phantom{\rule{3.33333pt}{0ex}}2$). In the case of marriage, the marital status of individuals (${\mathsf{\Lambda}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{ind}=2$) as well as the codes identifying the households $({(Id)}^{HH})$ are updated. In addition, the total number of properties and their ownership (${(Own)}_{t}^{HH}$) are updated. One of properties is marked as the principal residence (${(PH)}_{t}^{prop}\phantom{\rule{3.33333pt}{0ex}}=\phantom{\rule{3.33333pt}{0ex}}1$). If the marriage owns more than two properties, they are marked for sale (${(ForSale)}_{t}^{prop}=1$). The algorithm looks for a household-buyer who has sufficient deposits to pay for the property.
When the buyer is found, then deposits are reduced by the amount equal to the sum of prices of J properties.
If the buyer is not found, the price is decreased by 10%. After selling the properties, the marriage can pay back the housing and non-housing loans. If housing loans pending to be paid are greater than the revenue from selling the properties, then the algorithm decrease the amount of housing loans to be paid.
Otherwise, we check whether the individual could also pay back the non-housing loans. In that case, if the non-housing loans pending to be paid are greater than the difference between the revenue from selling the properties and housing loans pending to be paid, then the non-housing loans are decreased.
Then, housing loans pending to be paid are set to zero. If the price for which the properties were sold was greater than the sum of all liabilities then, deposits are updated.
If the wife had children from a previous marriage, then the consumer type does not change. Otherwise, the model checks the age of the individuals. If at least one member of the household is over 67, the consumer type is updated (${(ConsT)}_{t}^{cons}=3$). In the Births sub-module, children are born with the probability depending on age and civil status of the mother (${pr}_{age.st.civil}$). All necessary records are created for a newborn in submodule (M.36).

$$\begin{array}{c}\hfill {\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}{d}_{it}^{ind.HH}-{\displaystyle \sum}_{i=1}^{{N}^{ind.HH}}({l}_{t}^{{H}_{q}^{ind.HH}}+\phantom{\rule{4pt}{0ex}}{R}_{t}^{{H}_{q}^{ind}})>{P}_{t}^{prop}.\end{array}$$

$$\begin{array}{c}\hfill {d}_{it}^{buy.ind.HH}-=\frac{1}{{N}^{ind.HH}}\times {\displaystyle \sum}_{j=1}^{\mathrm{J}}{P}_{jt}^{prop}\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{t}^{{H}^{seller.ind}}-=\frac{1}{{N}^{ind.HH}}\times {\displaystyle \sum}_{j=1}^{\mathrm{J}}{P}_{jt}^{prop}.\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{t}^{{NH}^{seller.ind}}-=\frac{1}{{N}^{ind.HH}}\times {\displaystyle \sum}_{j=1}^{\mathrm{J}}{P}_{jt}^{prop}-{(pl)}_{t}^{{H}^{seller.ind}}.\end{array}$$

$$\begin{array}{c}\hfill {d}_{it}^{seller.ind.HH}+=\frac{1}{{N}^{ind.HH}}\times {\displaystyle \sum}_{j=1}^{\mathrm{J}}{P}_{jt}^{prop}-{\left(pl\right)}_{t}^{{H}^{seller.ind}}-{(pl)}_{t}^{{NH}^{seller.ind}}.\end{array}$$

In this module, decisions are made on whether an adult individual $({(Age)}_{t}^{ind}>18)$ becomes an entrepreneur. If the individual is already an entrepreneur (${(Entr)}_{t}^{ind}=1$), then the program skips this module and continues in the Probability of opening a new firm module (M.38). For the individuals unemployed (${\Xi}_{t}^{ind}=2$), employed in private sector (${\Xi}_{t}^{ind}=3$), inactive (${\Xi}_{t}^{ind}=4$), or employed in the public sector (${\Xi}_{t}^{ind}=5$), the probability of becoming an entrepreneur is computed. The probability depends on the experience in running a business ($({EntrP)}_{t}^{ind}=1$), gender (${G}^{ind}$), age (${(Age)}_{t}^{ind}$), level of education (${(Educ)}_{t}^{ind}$) and the period that has passed since the last change of status on the labour market (${\mathsf{\Psi}}_{t}^{ind})$
If the entrepreneur spirit is high enough, the individual becomes an entrepreneur (${(Entr)}_{t}^{ind}=1$). Otherwise, the program moves to module Updating individual labour status (M.47).

$$\begin{array}{ll}({EntrS)}_{t}^{ind}=& [(\mathrm{max}\{\phantom{\rule{4pt}{0ex}}\mathrm{min}(1,\phantom{\rule{4pt}{0ex}}({EntrS)}_{t-1}^{ind}\times \\ & \times \left({\beta}_{G}{G}^{ind}+{\beta}_{Educ}{\left(Educ\right)}_{t}^{ind}+{\beta}_{EntrP}\left({EntrP)}_{t}^{ind}+{\beta}_{Age}{\left(Age\right)}_{t}^{ind}+{\beta}_{\mathsf{\Psi}}{\mathsf{\Psi}}_{t}^{ind}\right)\right),\phantom{\rule{4pt}{0ex}}{\beta}_{Entr{S}_{max}}\left\}\right].\end{array}$$

In the Firm demography module, we analyse the possibility of entrepreneurs opening new companies in the system. As a part of the first Probability of opening a new firm submodule, the probability of opening a firm in a given industry is determined. This probability depends on previous experience in the industry ($({EntrP)}_{t}^{ind}$), level of education ${((Educ)}_{t}^{ind})$ and age of the entrepreneur (${(Age)}_{t}^{ind}$). Firstly, temporary variables are calculated that are required to calculate the probability of creating a new company in a given sector.
According to a given probability, the entrepreneur will open a new company in the most profitable sector (if $pr<{temp}_{1}$) and then in the second most profitable sector (if $pr<{temp}_{2}$). In this module we use information from the Initialisation module (M.1). If the entrepreneur cannot open up activity in these two sectors, they will start operating in a randomly selected industry.

$$\begin{array}{c}\hfill {temp}_{1}={\gamma \phantom{\rule{3.33333pt}{0ex}}}_{2}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{3}\times ({EntrP)}_{t}^{ind}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{4}\times {\left(Educ\right)}_{t}^{ind}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{5}\times ({\left(Age\right)}_{t}^{ind}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{6})\end{array}$$

$$\begin{array}{c}\hfill {temp}_{2}={\gamma \phantom{\rule{3.33333pt}{0ex}}}_{7}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{8}\times ({EntrP)}_{t}^{ind}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{9}\times {\left(Educ\right)}_{t}^{ind}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{10}\times ({\left(Age\right)}_{t}^{ind}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{11})\end{array}$$

A number of criteria must be met to create a new business. First and foremost, it is necessary to obtain a license. The likelihood of obtaining a license depends on the size of the company compared to the average firm size in the industry and industry-specific parameters. The company’s initial size ${\left(Size\right)}_{temp}$ is drawn from the normal distribution with the expected value $({(AL)}_{t}^{s})$ and the standard deviation of the size of firms (empirically determined) $({(SD)}_{t}^{s})$.

$$\begin{array}{c}\hfill {\left(Size\right)}_{temp}\phantom{\rule{4pt}{0ex}}was\phantom{\rule{4pt}{0ex}}drawn\phantom{\rule{4pt}{0ex}}from\phantom{\rule{4pt}{0ex}}N({(AL)}_{t}^{s},{(SD)}_{t}^{s})\end{array}$$

$$\begin{array}{c}\hfill {(InitSize)}_{temp}^{firm}=\mathrm{max}\{\mathrm{min}\left({\gamma \phantom{\rule{3.33333pt}{0ex}}}_{12}\times {\left(AL\right)}_{t}^{s},\phantom{\rule{4pt}{0ex}}{\left(Size\right)}_{temp}\right)\phantom{\rule{4pt}{0ex}},0\}.\end{array}$$

This module analyses the possibility of opening a company from funds held by the entrepreneur or co-financing the opening of the company from external sources. Large companies can be co-financed by various individuals. In this case, the initial capital of the company is equal to the sum of the contributions of the individuals. The amount depends on the type of household to which the individual belongs. These individuals hold shares in the company. According to the algorithm, the cost of setting up a company depends on the size of the company measured by the number of employees (${(InitSize)}_{temp}^{firm}$), average salaries in the industry ${\overline{W}}_{t}^{s}$, and industry-specific fixed costs specified by the parameter ${\gamma \phantom{\rule{3.33333pt}{0ex}}}_{17.s}$:
The value of the individual’s savings after deducting the charges for other repayments of loans is then calculated. If these funds are greater than the cost of establishing a business, the entrepreneur will allocate funds to set up a business. Consequently, the amount of savings in the entrepreneur’s account is updated. Otherwise, depending on the size of the business, the entrepreneur can apply for bank credit (Bank firm creation funding (M.41.1.) & New firm creation (M.41.1.1)) or look for co-shareholders (Shares (M.41.2)).

$$\begin{array}{c}\hfill {(CostNew)}_{temp}^{firm}={(InitSize)}_{temp}^{firm}\phantom{\rule{4pt}{0ex}}\times {\overline{W}}_{t}^{s}\phantom{\rule{4pt}{0ex}}\times {\gamma \phantom{\rule{3.33333pt}{0ex}}}_{16}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{17.s}.\end{array}$$

The entrepreneur seeks a bank which is both willing to lend funds and that offers a lower interest rate than other banks (${i}_{{l}^{I}}$). In addition, the sectoral exposure requirements are checked ${(CostNew)}_{temp}^{firm}\le {\gamma \phantom{\rule{3.33333pt}{0ex}}}_{sect.exp}$). If the selected bank has the requested funds (${{S}_{t}^{l.{I}^{est}}\ge (CostNew)}_{temp}^{firm}$), creditworthiness is checked. In order to obtain the loan, the following criteria are to be fulfilled:

- (1)
- the leverage ratio needs to be acceptable:$$\begin{array}{c}\hfill {\displaystyle \frac{{(CostNew)}_{temp}^{firm}}{{K}_{init}^{firm}}}<{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{LR.b},\end{array}$$
- (2)
- the financial risk of the business has to be relatively low in comparison to the sectorial risk$$\begin{array}{c}\hfill ({(Risk)}_{t}^{firm}<{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{Risk.b\phantom{\rule{4pt}{0ex}}}\&\&{\phantom{\rule{4pt}{0ex}}(Risk)}_{t}^{firm}<\phantom{\rule{4pt}{0ex}}{\overline{(Risk)}}_{t}^{s}),\end{array}$$
- (3)
- the size of the company has to be at least average for the industry (${L}_{t}^{firm}/{\overline{L}}_{t}^{s}$) and credit history has to be good (${(PD)}_{t}^{firm}<{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{cred.h.b}$).

Banks may set their own thresholds for the proposed criteria. In this way banks compete not only on interest rates but also creditworthiness criteria. Thresholds are an expression of their degree of risk aversion and the adopted strategy of a bank’s activity. If the trader does not get the requested amount in a given bank, they try again to apply for a loan in another bank, starting with the bank that offers the lowest interest rate. In extreme cases, the amount of funding obtained from the bank is reduced, gradually up to the limit below which it would not be possible to open a business in the sector. In the New firm creation(41.1.1) sub-module, records are created for the new firm, and the firm loans of the individual are updated. Maturity of the loan (${\mathrm{M}}^{{I}^{ind}}$) is assigned depending on the amount of loan taken.
The bank’s revenues are updated as well.

$$\begin{array}{c}\hfill {l}_{t}^{{I}^{ind}}+={(CostNew)}_{temp}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {\left(pl\right)}_{t}^{{I}^{ind}}+={\left(CostNew\right)}_{temp}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {l}_{t}^{{I}_{q}^{ind}}+=\frac{{\left(CostNew\right)}_{temp}^{firm}}{{\mathrm{M}}^{{I}^{ind}}}\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{I}^{ind}}+=\frac{1}{{\kappa \phantom{\rule{3.33333pt}{0ex}}}_{4}}\times {({\left(CostNew\right)}_{temp}^{firm}\times (1+0.25\times {i}_{{l}^{I}})}^{{\mathrm{M}}^{{I}^{ind}}}-{\left(CostNew\right)}_{temp}^{firm})\end{array}$$

$$\begin{array}{c}\hfill {R}_{t}^{{I}_{q}^{ind}}+=\frac{{R}_{t}^{{I}^{ind}}}{{\mathrm{M}}^{{I}^{ind}}}\end{array}$$

$$\begin{array}{c}\hfill {({Rev}_{{l}^{I}})}_{t}^{b}+={R}_{t}^{{I}_{q}^{ind}}.\end{array}$$

The Mergers & Acquisitions module analyses the possibility of one company buying another. First, the value of the company on the market (${(MV)}_{t}^{firm}$) is updated, depending on the company’s generated profits relative to average firm profits in the sector (${(RelProf)}_{temp}^{firm}={\mathrm{\Pi}}_{t}^{firm}/({\overline{\pi})}_{t}^{s})$ and the company’s financial risk relative to the average risk in the industry (${(RelRisk)}_{tem}^{firm}={(Risk)}_{t}^{firm}/{\overline{(Risk)}}_{t}^{s}$). The market value of a company is correlated with the likelihood of bankruptcy of a particular company. By default, the maximum value of this variable is 1. The closer this value is to 1, the higher the probability of bankruptcy. If the variable is close to 1, then the probability of the business declaring insolvency increases.

If the business debt (${(Debt)}_{t}^{firm}$) is lower than that specified by the parameter ${\gamma \phantom{\rule{3.33333pt}{0ex}}}_{\pi}$ part of the firm’s profits $({\mathrm{\Pi}}_{t}^{firm})$, the firm was not marked as for sale (${(ForSale)}_{t}^{firm}=0$), the firm debt is lower than that determined by the parameter ${\gamma \phantom{\rule{3.33333pt}{0ex}}}_{LA\_K\phantom{\rule{4pt}{0ex}}}$ part of liquid assets (${(LA)}_{t}^{firm}$) and capital (${K}_{t}^{firm}$), the firm value $({(MV)}_{t}^{firm})$ is greater than that specified by the parameter ${\gamma \phantom{\rule{3.33333pt}{0ex}}}_{MV\phantom{\rule{4pt}{0ex}}}$, a percentage ${\gamma \phantom{\rule{3.33333pt}{0ex}}}_{merg1}$ of firms in the sector is searched for. The company will merge with one of these firms. The company to be merged with must meet several requirements. First, the sum of liquid assets of the firm and the fixed capital of this firm need to be lower than that of the second company.
Secondly, it should be a smaller company, in a sense that the work force of this firm is smaller than the work force of the second company (${L}_{t}^{merged.firm}<{L}_{t}^{firm}$). Next, the market value of the firm should be acceptable (${(MV)}_{t}^{merged.firm}>{{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{MV}\times (MV)}_{t}^{firm}$) and this firm should not be marked for sale (${(ForSale)}_{t}^{firm}=0$). If the merger occurs, then the attributes of the firm and the entrepreneur are updated.
The owner of the firm changes and the corresponding variables such as labor status ($\phantom{\rule{4pt}{0ex}}{\Xi}_{t}^{ind}=5)$, entrepreneurship (${(Entr)}_{t}^{ind}=1$), entrepreneurship in the past (${(EducP)}_{t}^{ind}=1$), periods since the last change on the labor market (${\mathsf{\Psi}}_{t}^{ind}=0$) and the deposits are updated as well.
If the firm wants to merge but there is no company to merge within the set ${\gamma \phantom{\rule{3.33333pt}{0ex}}}_{merg1}$ of firms, the procedure is repeated in the broader set specified by ${\gamma \phantom{\rule{3.33333pt}{0ex}}}_{merg2}.$

$$\begin{array}{c}\hfill {((LA)}_{t}^{merged.firm}+{K}_{t}^{merged.firm})<{((LA)}_{t}^{firm}+{K}_{t}^{firm}).\end{array}$$

$$\begin{array}{c}\hfill {(Debt)}_{t}^{firm}+={(Debt)}_{t}^{merged.firm}+{(MV)}_{t}^{merged.firm}\times {((LA)}_{t}^{merged.firm}+{K}_{t}^{merged.firm})\end{array}$$

$$\begin{array}{c}\hfill {({N}_{est})}_{t}^{firm}+={({N}_{est})}_{t}^{merged.firm}\end{array}$$

$$\begin{array}{c}\hfill {((LA)}_{t}^{firm}+={((LA)}_{t}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {K}_{t}^{firm}+={K}_{t}^{firm}.\end{array}$$

$$\begin{array}{c}\hfill {d}_{t}^{owner.ind}={\gamma \phantom{\rule{3.33333pt}{0ex}}}_{53}\times {(MV)}_{t}^{merged.firm}\times {((LA)}_{t}^{merged.firm}+{K}_{t}^{merged.firm}).\end{array}$$

If a company is successful and its financial risk is below average risk in the industry (${(Risk)}_{t}^{firm}\phantom{\rule{3.33333pt}{0ex}}\le \phantom{\rule{3.33333pt}{0ex}}{\overline{(Risk)}}_{t}^{s}$) and the firm is not marked for sale (${(ForSale)}_{t}^{firm}=0$), then it seeks to acquire another firm. In practice, this company should be relatively small (${L}_{t}^{est}<{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{55}\times {L}_{t}^{est}$), debt should be lower than the one expressed by debt percentage of the firm before acquisition (${(Debt)}_{t}^{firm}<{{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{56}\times (Debt)}_{t}^{firm}$), and this company should be marked for sale (${(ForSale)}_{t}^{firm}=1$). If a company to acquire is found, then the attributes of the firms and the entrepreneur are updated. The entrepreneur is now the co-owner of the firm.

$$\begin{array}{ll}{\left(Debt\right)}_{t}^{firm}& +={\left(Debt\right)}_{t}^{acq.firm}+{(MV)}_{t}^{acq.firm}\times ({\left(LA\right)}_{t}^{acq.firm}+{K}_{t}^{acq.firm}+\\ & -{\left(Debt\right)}_{t}^{acq.firm})\times \sqrt{rndm(0,1)}\end{array}$$

$$\begin{array}{c}\hfill {K}_{t}^{firm}+={K}_{t}^{acq.firm}\end{array}$$

$$\begin{array}{c}\hfill {\left({N}_{est}\right)}_{t}^{firm}+={\left({N}_{est}\right)}_{t}^{acq.firm}\end{array}$$

$$\begin{array}{c}\hfill {(LA)}_{t}^{firm}+={(LA)}_{t}^{acq.firm}\end{array}$$

$$\begin{array}{c}\hfill {L}_{t}^{firm}+={L}_{t}^{acq.firm}.\end{array}$$

This module deals with the opening and closure of companies. If the company was registered more than 1.5 years ago (${(\#Oper)}_{t}^{firm}>6$) and the number of employees is 0, then the company is removed from the system. If the entrepreneur does not own other firms, the value of variables which describe the experience of being an entrepreneur (${(Entr)}_{t}^{ind}=0,\phantom{\rule{4pt}{0ex}}({EntrP)}_{t}^{ind}=1$), status on the labour market (${\Xi}_{t}^{ind}\ne 5$) and the period since the last change of status on the labour market (${\mathsf{\Psi}}_{t}^{ind}=0$) are updated. If the company qualifies for closure, all employees will be first fired, and then the establishments will be closed.

In this sub-module, firms with a strong position can also increase the number of establishments they own. If the company’s financial risk is lower than the average risk in the sector (${(Risk)}_{t}^{firm}<{\overline{(Risk)}}_{t}^{s}$) and the profit per employee $\frac{{\mathrm{\Pi}}_{t}^{firm}}{{(L}_{t}^{firm}+1)}$ is higher than the percentage of the average profit per employee in the sector ${\upsilon}_{2}\times \frac{{\overline{\pi}}_{t}^{s}}{({N}_{t}^{f{irm}_{s}}\times ({\overline{L}}_{t}^{s}+1))}$, then the company can create new establishments.

Within the framework of the model, a stylized labour market has been designed. In the model the parameters ${\alpha}_{57.age.gender-62.age.gender}\phantom{\rule{4pt}{0ex}}$ depend on age and gender. In the module the status on the labour market of all individuals (${\Xi}_{t}^{ind}$) and the time since the last change of status on the labor market (${\mathsf{\Psi}}_{t}^{ind}$) are updated. If the individual is a woman over the age of 55, employed in the private or public sector, she is likely to be unemployed with the probability ${\alpha}_{57.age}.$ If the individual is a man over the age of 55, employed in the private or public sector, he is likely to be unemployed with the probability ${\alpha}_{58.age}$. If the individual is a woman, who is unemployed for more than 2 years, then she becomes inactive with probability ${\alpha}_{59.age}.$ If the individual is a man who is unemployed for more than 2 years, then he becomes inactive with probability ${\alpha}_{62.age}.\phantom{\rule{4pt}{0ex}}$ If a person is inactive on the labour market and is under the age of 55 and their total family income is less than the established threshold, then this person will be registered as an active job seeker, even if only for the purpose of receiving social benefits.

This sub-module updates the variable describing employee skills. These skills depend on age, gender, time elapsed since the last change of status on the labour market and completed education.

$$\begin{array}{c}\hfill {\mathsf{\Theta}}_{t}^{ind}=max\{0;{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{\mathsf{\Psi}}\times {\mathsf{\Psi}}_{t}^{ind}+{{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{Educ}\times (Educ)}_{t}^{ind}+{\gamma \phantom{\rule{3.33333pt}{0ex}}}_{G}\times {G}^{ind}{+\gamma \phantom{\rule{3.33333pt}{0ex}}}_{\Xi}\times {\Xi}_{t}^{ind}{+\gamma \phantom{\rule{3.33333pt}{0ex}}}_{Age}\times {(Age)}_{t}^{ind}\}.\end{array}$$

This sub-module carries one from the Firm growth module. In this sub-module a decision is made to reduce or increase the number of employees. First, the number of employees to be fired (${L}_{t}^{{FI}^{est}}$) and hired in the establishment (${L}_{t}^{{HI}^{est}}$) is compared. Employees with the lowest working skills are fired. If the number of employees to be hired is greater than the number of employees to be fired, then employees are searched for according to their location (using NUTS1-4 codes: ${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{1}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{2}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{3}},\phantom{\rule{4pt}{0ex}}{\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{4}}$). The model assumes that employees living closer to the firm are beneficial to the company.

The final module updates the remaining agent records that have not been updated in previous modules. Loans and deposits of individuals, households, companies and, above all, banks are settled. Non-performing loans in the period are also counted.

Individuals from the Labor market modules (M.47–M.49) are carried on into this sub-module. If individuals have just become unemployed (${\Xi}_{t}^{ind}=2\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{\mathsf{\Psi}}_{t}^{ind}=0$), they receive unemployment benefits (${{(sub)}_{t}^{ind}=\delta \phantom{\rule{3.33333pt}{0ex}}}_{1}$) and their earnings from previous employment (${w}_{t}^{ind}=0$) are equal to zero. If individuals have become unemployed more than one quarter ago (${\Xi}_{t}^{ind}=2\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{\mathsf{\Psi}}_{t}^{ind}>1$), then they receive lower benefits (${{(sub)}_{t}^{ind}=\delta \phantom{\rule{3.33333pt}{0ex}}}_{2},\phantom{\rule{4pt}{0ex}}{\delta \phantom{\rule{3.33333pt}{0ex}}}_{2}<{\delta \phantom{\rule{3.33333pt}{0ex}}}_{1}$). If a person is employed in the private sector (${\Xi}_{t}^{ind}=3$), then no social benefits are to be paid (${(sub)}_{t}^{ind}=0$) and the earnings are calculated according to the formula that depends on age (${(Age)}_{t}^{ind}$), gender (${G}^{ind}$), average wage per employee in the sector $\frac{{\overline{W}}_{t}^{s}}{{\overline{L}}_{t}^{s}}$ and a random factor.
If the person is 67 years old and the subsidy was equal to 0, then the subsidy depending on average wage in the sector, gender and values of parameters is computed. If the person is inactive, then the gender and age of the individual are checked. If individuals are older than 55 (${G}^{ind}=1\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{(Age)}_{t}^{ind}>\phantom{\rule{3.33333pt}{0ex}}55$), and had positive wage (${w}_{t}^{ind}>0$), they may retire early. The subsidy depending on gender and previous wage is computed, and the wage is set to zero (${w}_{t}^{ind}=0,\phantom{\rule{4pt}{0ex}}{{(sub)}_{t}^{ind}=\delta \phantom{\rule{3.33333pt}{0ex}}}_{2}\times {w}_{t}^{ind}\phantom{\rule{4pt}{0ex}}$ for women and ${{(sub)}_{t}^{ind}=\delta \phantom{\rule{3.33333pt}{0ex}}}_{2}\times {w}_{t}^{ind}$ for man). If the person in question runs a business and the profits of the firm are positive (${\mathrm{\Pi}}_{t}^{firm}>0$), then for each of the companies they run, the portion of the profit paid to dividends is calculated; this is equal to the remuneration of the owner(s).
If the total family income is below the subsistence level (below ${\delta \phantom{\rule{3.33333pt}{0ex}}}_{3}$), the public assistance is provided (${(sub)}_{t}^{ind}={\delta \phantom{\rule{3.33333pt}{0ex}}}_{4}$)

$$\begin{array}{c}\hfill {w}_{t}^{ind}=\frac{{\overline{W}}_{t}^{s}}{{\overline{L}}_{t}^{s}}\times ({\delta \phantom{\rule{3.33333pt}{0ex}}}_{6}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{7}\times {G}^{ind})\times ({\delta \phantom{\rule{3.33333pt}{0ex}}}_{8}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{9}\times {\left(Age\right)}_{t}^{ind})\times (rndm(0.04,0.06)).\end{array}$$

$$\begin{array}{c}\hfill {(Divid)}_{temp}+={\mathrm{\Pi}}_{t}^{firm}\times {\delta \phantom{\rule{3.33333pt}{0ex}}}_{14}\times rndm(0,0.02)\end{array}$$

$$\begin{array}{c}\hfill {w}_{t}^{ind}+={(Divid)}_{temp}\end{array}$$

$$\begin{array}{c}\hfill {(sub)}_{t}^{ind}=0\end{array}$$

$$\begin{array}{c}\hfill {(Debt)}_{t}^{firm}+={(Divid)}_{temp}.\end{array}$$

The submodules Updating establishment & firm records first change the status of new establishments to experienced ones (${(New)}_{t}^{est}--$) and wages of these establishments are rested from the liquidity assets (${(LA)}_{t}^{est}-={W}_{t}^{est}$) and then set to zero (${W}_{t}^{est}=0$). Then we compute the cost of wages (${W}_{t}^{est}$+=${w}_{t}^{ind}$) and the total costs of the establishments.
Then the costs are paid from the liquid assets. If the liquid assets of the firm are negative (${(LA)}_{t}^{est}<0$), the establishment has liquidity shortage. We first check whether the firm is able to move sources from one establishment to the other one. If the firm owns more than one establishment and the liquidity of the firm and establishment are positive (${({N}_{est})}_{t}^{firm}>1\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{(\left(LA\right)}_{t}^{est}+{(LA)}_{t}^{firm})>0$), one of the establishments is closed (${({N}_{est})}_{t}^{firm}--$) and liquidity debts of this establishment are paid (${(LA)}_{t}^{firm}-={\left(LA\right)}_{t}^{est}$), and the value of default is updated ($({PD)}_{t}^{est}++\phantom{\rule{4pt}{0ex}}$). The firm is at risk of default, but still has not defaulted (${(PD)}_{t}^{firm}$ increases). Otherwise, if the firm consists of only one establishment that has serious liquidity shortage, the firm defaults ${((PD)}_{t}^{firm}=1$). The non-performing loans are updated (${({NPL}_{{l}^{I}})}_{t}^{b}+={(pl)}_{t}^{{I}^{ind}}$). If the owner of this firm does not own any other firm, then the status on the labor market (${\Xi}_{t}^{ind}=2$), the periods since the last change of the status on the labor market (${\mathsf{\Psi}}_{t}^{ind}=0$) and the variable expressing experience in being an entrepreneur (${(Entr)}_{t}^{ind}=0$, $({EntrP)}_{t}^{ind}=1$) are updated. In this sub-module, the sales per employee are computed (${(SE)}_{t}^{est}=\frac{{(SE)}_{t}^{est}}{{L}_{t}^{est}}$) and the liquidity assets and fixed capital are updated according to generated profits (or loses). If the profits per employee are sufficiently high (i.e., if $\frac{{\mathrm{\Pi}}_{t}^{firm}}{({L}_{t}^{firm}+1)}>{\delta \phantom{\rule{3.33333pt}{0ex}}}_{21}$), then the liquid assets and the fixed capital are updated.
Otherwise, only fixed capital is updated.
If the liquid assets per employee are sufficiently high (i.e., if $\frac{{\left(LA\right)}_{t}^{firm}}{({L}_{t}^{firm}+1)>{\delta \phantom{\rule{3.33333pt}{0ex}}}_{25}}$), then part of liquid assets can be used to pay back the debts. If the firm’s debt is higher than the liquid assets, then the firm’s debt and liquid assets are updated.
Otherwise, the debt is paid in full.
In the worst case scenario, the firm is accumulating debt and the corresponding variables are updated.
At the end of this sub-module, lump sum property tax is updated (${t}_{pr}$). In the Updating firm records sub-module, the age of the firm (${(\#Oper)}_{t}^{firm}++$) and the financial risk are updated.
The values of a firm’s fixed capital, liquidity assets, work force, firm profit and tax to be paid are the sum of respective values of variables of firms’ establishments.

$$\begin{array}{c}\hfill {(TC)}_{t}^{est}+={{\delta \phantom{\rule{3.33333pt}{0ex}}}_{16}\times (Inp)}_{t}^{est}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{16}\times ({(Debt)}_{t}^{firm}/{(\#Oper)}_{t}^{firm})+{t}_{pr}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{18.s}\times {Y}_{t}^{est}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{19.s}\times {L}_{t}^{est}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{20}\times {W}_{t}^{est}\end{array}$$

$$\begin{array}{c}\hfill {\left(LA\right)}_{t}^{firm}+=\left({\delta \phantom{\rule{3.33333pt}{0ex}}}_{22}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{23}\right)\times {K}_{t}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {K}_{t}^{firm}=\left({1+\delta \phantom{\rule{3.33333pt}{0ex}}}_{22}{-\delta \phantom{\rule{3.33333pt}{0ex}}}_{23}\right)\times {K}_{t}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {K}_{t}^{firm}=\left(1{-\delta \phantom{\rule{3.33333pt}{0ex}}}_{23}\right)\times {K}_{t}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {(Debt)}_{t}^{firm}-={\left(LA\right)}_{t}^{firm}-({L}_{t}^{firm}+1)\times {\delta \phantom{\rule{3.33333pt}{0ex}}}_{25}\end{array}$$

$$\begin{array}{c}\hfill {\left(LA\right)}_{t}^{firm}=({L}_{t}^{firm}+1)\times {\delta \phantom{\rule{3.33333pt}{0ex}}}_{25}\end{array}$$

$$\begin{array}{c}\hfill {\left(LA\right)}_{t}^{firm}-={(Debt)}_{t}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {(Debt)}_{t}^{firm}=0.\end{array}$$

$$\begin{array}{c}\hfill {(Debt)}_{t}^{firm}+=\left({L}_{t}^{firm}+1\right)\times {\delta \phantom{\rule{3.33333pt}{0ex}}}_{26}-{\left(LA\right)}_{t}^{firm}\end{array}$$

$$\begin{array}{c}\hfill {\left(LA\right)}_{t}^{firm}=({L}_{t}^{firm}+1)\times {\delta \phantom{\rule{3.33333pt}{0ex}}}_{26}.\end{array}$$

$$\begin{array}{c}\hfill {\left(Risk\right)}_{t}^{firm}={\delta \phantom{\rule{3.33333pt}{0ex}}}_{29.s}+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{30}\times \left(\frac{1}{{L}_{t}^{firm}+1}\right)+{\delta \phantom{\rule{3.33333pt}{0ex}}}_{30}\times \left(\frac{{L}_{t}^{firm}}{{(Debt)}_{t}^{firm}}\right).\end{array}$$

This module recalculates average values for sectors that become benchmarks for agents’ decisions. The values of the quality and average price of each sector are updated (${{(Ql)}_{t-1}^{s}=(Ql)}_{t}^{s},\phantom{\rule{4pt}{0ex}}{P}_{t-1}^{s}={P}_{t}^{s}$). Then, the profit in the sector and number of firms in the sector are computed as a sum of firms’ profits and the sum of firms. The average financial risk is computed as well. Then, the values of average sales in the sector, price in the sector, quality, average work force of the establishments in the sector, percentage of establishments that import and export as well as average wage in the sector are updated.

This submodule computes how much has already been paid back from the loan, how much is due and how much interest was paid and is due. This is performed for all types of credit: consumer loans (${l}_{t}^{{C}^{ind}}-={l}_{t}^{{C}_{q}^{ind}}$, ${\left(pl\right)}_{t}^{{C}^{ind}}-={l}_{t}^{{C}_{q}^{ind}}$, ${R}_{t}^{{C}^{ind}}-={R}_{t}^{{C}_{q}^{ind}}$), real estate housing (${l}_{t}^{{H}^{ind}}-={l}_{t}^{{H}_{q}^{ind}}$, ${(pl)}_{t}^{{H}^{ind}}-={l}_{t}^{{H}_{q}^{ind}}$, ${R}_{t}^{{H}^{ind}}-={R}_{t}^{{H}_{q}^{ind}}$) and non-housing loans (${l}_{t}^{{NH}^{ind}}-={l}_{t}^{N{H}_{q}^{ind}},\phantom{\rule{4pt}{0ex}}{\left(pl\right)}_{t}^{{NH}^{ind}}-={l}_{t}^{N{H}_{q}^{ind}}$, ${R}_{t}^{{NH}^{ind}}-={R}_{t}^{{NH}_{q}^{ind}}$), and firm investment loans (${l}_{t}^{{I}^{ind}}-={l}_{t}^{{I}_{q}^{ind}}$, ${\left(pl\right)}_{t}^{{I}^{ind}}-={l}_{t}^{{I}_{q}^{ind}}$, ${R}_{t}^{{I}^{ind}}-={R}_{t}^{{I}_{q}^{ind}}$). The same is computed for establishments paying back short-term loans (${l}_{t}^{{SH}^{est}}-={l}_{t}^{S{H}_{q}^{est}},\phantom{\rule{4pt}{0ex}}{\left(pl\right)}_{t}^{{SH}^{est}}-={l}_{t}^{S{H}_{q}^{est}},\phantom{\rule{4pt}{0ex}}{R}_{t}^{{SH}^{est}}-={R}_{t}^{{SH}_{q}^{est}}$).

This submodule computes how much supply was used to give new credits in this iteration. For this purpose, the value of supply from the Initialisation module (M.1) and the value of supply after all updates (module M.55) is used. The amount of loans of each type which have been granted is computed.
Equity is updated in the next module, after computing the profits and costs of banks’ activity.

$$\begin{array}{c}\hfill {l}_{temp}^{C.granted.b}={S}_{temp}^{{l.C}^{ind}}-{S}_{t}^{{l.C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{temp}^{H.granted.b}={S}_{temp}^{{l.H}^{ind}}-{S}_{t}^{{l.H}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{temp}^{NH.granted.b}={S}_{temp}^{{l.NH}^{ind}}-{S}_{t}^{{NH}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{temp}^{I.granted.b}={S}_{temp}^{{l.I}^{ind}}-{S}_{t}^{l.{I}^{est}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{temp}^{SH.granted.b}={S}_{temp}^{{l.SH}^{ind}}-{S}_{t}^{l.{SH}^{est}}\end{array}$$

$$\begin{array}{c}\hfill {l}_{temp}^{sum.granted.b}={l}_{temp}^{C.granted.b}+{l}_{temp}^{H.granted.b}+{l}_{temp}^{NH.granted.b}+{l}_{temp}^{I.granted.b}+{l}_{temp}^{SH.granted.b}\end{array}$$

$$\begin{array}{c}\hfill (p{l)}_{temp}^{C.granted}+={(pl)}_{t}^{{C}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill (p{l)}_{temp}^{H.granted}+={(pl)}_{t}^{{H}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill (p{l)}_{temp}^{NH.granted}+={(pl)}_{t}^{{NH}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill (p{l)}_{temp}^{I.granted}+={(pl)}_{t}^{{I}^{ind}}\end{array}$$

$$\begin{array}{c}\hfill (p{l)}_{temp}^{I.granted}+={(pl)}_{t}^{{SH}^{est}}\end{array}$$

$$\begin{array}{c}\hfill {(pl)}_{temp}^{sum.granted}=(p{l)}_{temp}^{C.granted}+(p{l)}_{temp}^{H.granted}+(p{l)}_{temp}^{NH.granted}+(p{l)}_{temp}^{I.granted}+(p{l)}_{temp}^{SH.granted}\end{array}$$

$$\begin{array}{c}\hfill {(NPL)}_{temp}^{sum}={({NPL}_{{l}^{C}})}_{t}^{b}+{({NPL}_{{l}^{H}})}_{t}^{b}+{({NPL}_{{l}^{NH}})}_{t}^{b}+{({NPL}_{{l}^{I}})}_{t}^{b}+{({NPL}_{{l}^{SH}})}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill {(NPL)}_{temp}^{ratio}={\displaystyle \frac{{(NPL)}_{temp}^{sum}}{{(pl)}_{temp}^{sum.granted}}}\end{array}$$

$$\begin{array}{c}\hfill {(NPL)}_{temp}^{ratio.{l}^{C}}={\displaystyle \frac{{({NPL}_{{l}^{C}})}_{t}^{b}}{{(pl)}_{temp}^{sum.granted}}}\end{array}$$

$$\begin{array}{c}\hfill {(NPL)}_{temp}^{ratio.{l}^{NH}}={\displaystyle \frac{({({NPL}_{{l}^{H}})}_{t}^{b}}{{(pl)}_{temp}^{sum.granted}}}\end{array}$$

$$\begin{array}{c}\hfill {(NPL)}_{temp}^{ratio.{l}^{NH}}={\displaystyle \frac{{({NPL}_{{l}^{NH}})}_{t}^{b}}{{(pl)}_{temp}^{sum.granted}}}\end{array}$$

$$\begin{array}{c}\hfill {(NPL)}_{temp}^{ratio.{l}^{I}}={\displaystyle \frac{{({NPL}_{{l}^{I}})}_{t}^{b}}{{(pl)}_{temp}^{sum.granted}}}\end{array}$$

$$\begin{array}{c}\hfill {(NPL)}_{temp}^{ratio.{l}^{SH}}={\displaystyle \frac{{({NPL}_{{l}^{SH}})}_{t}^{b}}{{(pl)}_{temp}^{sum.granted}}}\end{array}$$

$$\begin{array}{c}\hfill {d}_{temp}^{ind}+={d}_{t}^{ind}\end{array}$$

$$\begin{array}{c}\hfill {d}_{temp}^{firm}+={(LA)}_{t}^{est}\end{array}$$

$$\begin{array}{c}\hfill {d}_{t}^{b}={d}_{temp}^{ind}+{d}_{temp}^{firm}.\end{array}$$

This submodule updates the equity by adding the profits generated in this period and subtracting costs associated with the banks’ activity.
Also considered is the possibility of the banks’ default. If the following value of temporal variable is below zero, the bank defaults. In practice, the bank can default when it has not enough equity or in the case of withdrawal of deposits or accumulation of non-performing loans.

$$\begin{array}{c}\hfill {({Rev}^{b})}_{temp}^{sum}=\phantom{\rule{4pt}{0ex}}{({Rev}_{{l}^{C}})}_{t}^{b}+{({Rev}_{{l}^{H}})}_{t}^{b}+{({Rev}_{{l}^{NH}})}_{t}^{b}+{({Rev}_{{l}^{I}})}_{t}^{b}+{({Rev}_{{l}^{SH}})}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill {(Cost)}_{temp}^{b}\phantom{\rule{4pt}{0ex}}draw\phantom{\rule{4pt}{0ex}}from\phantom{\rule{4pt}{0ex}}N({(AvC)}_{t}^{b},{(SdC)}_{t}^{b})\end{array}$$

$$\begin{array}{c}\hfill {E}_{t}^{b}+={({Rev}^{b})}_{temp}^{sum}-{\left(Cost\right)}_{temp}^{b}-{i}_{d}\times {d}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill {(Default)}_{temp}^{b}={E}_{t}^{b}+{d}_{t}^{b}+{({Rev}^{b})}_{temp}^{sum}-{i}_{d}\times {d}_{t}^{b}-{(NPL)}_{temp}^{sum}.\end{array}$$

This submodule analyses the regulatory requirements and the supply side decisions. Definitions of macroprudential ratios have been adapted from Popoyan et al. (2017). Firstly, the value of most liquid assets held by the bank (cash) as a percentage of all loans granted to the entities in the model is approximated.
We also compute the quantity of loans less the most liquid assets held.
Next, the quantity of liquid assets demanded from the central bank is approximated.
The liquid assets from the central bank are only demanded when LCR is lower than ${\phi}_{LCR.min}$. The computation of risk weighted assets and the approximation of TIER 1 equity allows the value of capital adequacy ratio according to Basel III to be obtained.
The model also computes the value of bank leverage ratio, as a ratio of equity TIER 1 and total assets, as well as high quality liquid assets, expected cash inflow and outflow to be able to compute the liquidity coverage ratio.
Then, the decisions about the supply of credit are made:
If the capital requirements are not met, the supply is set to zero (${({S}^{b})}_{temp}=0$) and the value of variable $\phantom{\rule{4pt}{0ex}}({\left(PD\right)}_{t}^{b}=0.5)$ is updated to emphasise that this bank is at threat of default and the riskiness of the bank’s activity increases. Next, it is checked if the liquidity requirement is met. If so, the bank does not have to recur to the central bank. Otherwise $\left({\left({LCR}^{b}\right)}_{temp}<{\phi}_{min.LCR}\times {d}_{t}^{b}\right),$ bank deposits are increased by the resources obtained from the central bank.
Finally, the leverage ratio requirement is checked. If the leverage ratio is lower than the value specified by the parameter (${({LR}^{b})}_{temp}\le {\phi}_{13}$), the supply is set to zero (${({S}^{b})}_{temp}=0$) and the value of the variable expressing the probability of default ${(\left(PD\right)}_{t}^{b}=0.5)$ is updated to emphasise that this bank is at threat of default and the riskiness of the bank’s activity increases.

$$\begin{array}{c}\hfill {(Appr.Cash)}_{temp}^{b}={\phi}_{1}\times {l}_{temp}^{sum.granted.b}\end{array}$$

$$\begin{array}{c}\hfill {\mathsf{\Theta}\phantom{\rule{3.33333pt}{0ex}}}_{temp}^{b}={{l}_{temp}^{sum.granted.b}-(Appr.Cash)}_{temp}^{b}\end{array}$$

$$\begin{array}{c}\hfill {(LiqDemCB)}_{temp}={\phi}_{LCR.min}\times {d}_{t}^{b}-{B}_{t}^{b}-{\left(Res\right)}_{t}^{b}-{\phi}_{3}\times {(Appr.Cash)}_{temp}^{b}\end{array}$$

$$\begin{array}{c}\hfill {(RWA)}_{temp}={(pl)}_{temp}^{sum.granted}\times {\delta \phantom{\rule{3.33333pt}{0ex}}}_{RW}\end{array}$$

$$\begin{array}{c}\hfill {({E}_{T1}^{b})}_{temp}={E}_{t}^{b}\times {\delta \phantom{\rule{3.33333pt}{0ex}}}_{T1}\end{array}$$

$$\begin{array}{c}\hfill {({CAR}^{b})}_{temp}=\frac{{({E}_{T1}^{b})}_{temp}}{{(RWA)}_{temp}}\end{array}$$

$$\begin{array}{c}\hfill {({LR}^{b})}_{temp}=\frac{{({E}_{T1}^{b})}_{temp}}{({l}_{temp}^{sum.granted.b}+{B}_{t}^{b}+{\left(Res\right)}_{t}^{b}+{\phi}_{3}\times {(Appr.Cash)}_{temp}^{b})}\end{array}$$

$$\begin{array}{c}\hfill {({HQLA}^{b})}_{temp}={\left(Res\right)}_{t}^{b}+{(Appr.Cash)}_{temp}^{b}+\mathrm{min}\{0.85;0.75\times ({\left(Res\right)}_{t}^{b}+{(Appr.Cash)}_{temp}^{b})\}\end{array}$$

$$\begin{array}{c}\hfill {({E(CashOutflow)}^{b})}_{temp}={\phi}_{4}\phantom{\rule{4pt}{0ex}}+{\phi}_{5}\times {d}_{t}^{b}\phantom{\rule{4pt}{0ex}}+{\phi}_{6}\times {(LiqDemCB)}_{temp}\end{array}$$

$$\begin{array}{c}\hfill {({E(CashInflow)}^{b})}_{temp}={\phi}_{7}\phantom{\rule{4pt}{0ex}}-{\phi}_{8}\phantom{\rule{4pt}{0ex}}+{\phi}_{9}\times {(Appr.Cash)}_{temp}^{b}\phantom{\rule{4pt}{0ex}}+{\phi}_{10}\times {B}_{t}^{b}\phantom{\rule{4pt}{0ex}}+{\phi}_{11}\times {\left(Res\right)}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill {({NCOF}^{b})}_{temp}={({E(CashOutflow)}^{b})}_{temp}-{({E(CashInflow)}^{b})}_{temp}\end{array}$$

$$\begin{array}{c}\hfill {({LCR}^{b})}_{temp}=\frac{{({HQLA}^{b})}_{temp}}{{({NCOF}^{b})}_{temp}}\end{array}$$

$$\begin{array}{c}\hfill {({S}^{b})}_{temp}=\frac{{E}^{{b}_{t}}}{{\phi}_{min.c.req}}-\phantom{\rule{4pt}{0ex}}{(pl)}_{temp}^{sum.granted}\end{array}$$

$$\begin{array}{c}\hfill {d}_{t}^{b}+\phantom{\rule{4pt}{0ex}}={(LiqDemCB)}_{temp}\end{array}$$

Next, each bank needs to compute the supply of each type of loan to the market, taking into account the profitability of each and the non-performing loans ratios. There are two procedures that can be initiated in the system. The first one is initiated if the values of parameters ${\mu}_{1},\phantom{\rule{4pt}{0ex}}{\mu}_{2},\phantom{\rule{4pt}{0ex}}{\mu}_{3},\phantom{\rule{4pt}{0ex}}{\mu}_{4},\phantom{\rule{4pt}{0ex}}{\mu}_{5}$, are not equal to zero. It is implicitly assumed that the banks are committed to providing a supply of credit of each type and all banks are universal. In the consequence of application of the first strategy, groups of banks that pursue similar strategies on the market are obtained.

At the beginning, the following auxiliary variables are computed:
These auxiliary variables help us to understand how much has been earned and lost from the granted loans of each type. Then, the following ratios are computed:
The ratios are ordered from highest to the lowest. According to the ratios, it is possible to indicate the most profitable and less profitable types of loans. In the first procedure, it is assumed that the regulator introduced the maximum sectorial exposures, that is, ${\mu}_{1},\phantom{\rule{4pt}{0ex}}{\mu}_{2},\phantom{\rule{4pt}{0ex}}{\mu}_{3},\phantom{\rule{4pt}{0ex}}{\mu}_{4},\phantom{\rule{4pt}{0ex}}{\mu}_{5}$, are fixed by the regulator. In practice, banks invest the maximum allowed by the regulator in the most profitable type of loans according to them. In the second procedure, it is assumed that the regulator introduced only one recommendation; that the exposure to any loan cannot be higher than 35%, that is ${\mu}_{i}\phantom{\rule{4pt}{0ex}}\le $ 0.35 for $i\in \{1,2,3,4,5\}$. The auxiliary assumption needed states that all weights have to sum up to 1: ${\mu}_{1}+\phantom{\rule{4pt}{0ex}}{\mu}_{2}+\phantom{\rule{4pt}{0ex}}{\mu}_{3}+\phantom{\rule{4pt}{0ex}}{\mu}_{4}+\phantom{\rule{4pt}{0ex}}{\mu}_{5}=1.$

$$\begin{array}{c}\hfill ({SumForRatio)}_{temp}^{{l.C}^{ind}}={S}_{temp}^{{l.C}^{ind}}+{\left({Rev}_{{l}^{C}}\right)}_{t}^{b}-{({NPL}_{{l}^{C}})}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill ({SumForRatio)}_{temp}^{{l.H}^{ind}}={S}_{temp}^{{l.H}^{ind}}+{({Rev}_{{l}^{H}})}_{t}^{b}-{({NPL}_{{l}^{H}})}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill ({SumForRatio)}_{temp}^{{l.NH}^{ind}}={S}_{temp}^{{l.NH}^{ind}}+{({Rev}_{{l}^{NH}})}_{t}^{b}-{({NPL}_{{l}^{NH}})}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill ({SumForRatio)}_{temp}^{{l.I}^{ind}}={S}_{temp}^{{l.I}^{ind}}+{({Rev}_{{l}^{I}})}_{t}^{b}-{({NPL}_{{l}^{I}})}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill ({SumForRatio)}_{temp}^{{l.SH}^{est}}={S}_{temp}^{{l.SH}^{est}}+{({Rev}_{{l}^{SH}})}_{t}^{b}-{({NPL}_{{l}^{SH}})}_{t}^{b}\end{array}$$

$$\begin{array}{c}\hfill ({Sum1ForRatio)}_{temp}^{{l.C}^{ind}}={\displaystyle \frac{({SumForRatio)}_{temp}^{{l.C}^{ind}}}{{S}_{t}^{{l.C}^{ind}}}}\end{array}$$

$$\begin{array}{c}\hfill ({Sum1ForRatio)}_{temp}^{{l.H}^{ind}}={\displaystyle \frac{({SumForRatio)}_{temp}^{{l.H}^{ind}}}{{S}_{t}^{{l.H}^{ind}}}}\end{array}$$

$$\begin{array}{c}\hfill ({Sum1ForRatio)}_{temp}^{{l.NH}^{ind}}={\displaystyle \frac{({SumForRatio)}_{temp}^{{l.NH}^{ind}}}{{S}_{t}^{{NH}^{ind}}}}\end{array}$$

$$\begin{array}{c}\hfill ({Sum1ForRatio)}_{temp}^{{l.I}^{ind}}={\displaystyle \frac{({SumForRatio)}_{temp}^{{l.I}^{ind}}}{{S}_{t}^{l.{I}^{est}}}}\end{array}$$

$$\begin{array}{c}\hfill ({Sum1ForRatio)}_{temp}^{{l.SH}^{est}}={\displaystyle \frac{({SumForRatio)}_{temp}^{{l.SH}^{est}}}{{S}_{t}^{l.{SH}^{est}}}}\end{array}$$

In this method, ${\mu}_{1}$ corresponds always to the first ratio, ${\mu}_{2}$ corresponds always to the second ratio, ${\mu}_{3}$ corresponds always to the third ratio, ${\mu}_{4}$ corresponds always to the fourth ratio and, ${\mu}_{5}$ corresponds always to the fifth ratio. The highest ratio is checked, and then the value of ${\mu}_{i}$, is drawn from the corresponding interval of the highest allowed values, ${\mu}_{i}\in $ (0:30; 0:35]. Then, the second best, ${\mu}_{j}$ is drawn from the interval ${\mu}_{j}\phantom{\rule{4pt}{0ex}}\in \phantom{\rule{4pt}{0ex}}$ (${\mu}_{i}-0.06$; ${\mu}_{i}$). Analogically, the third and the fourth best, ie. ${\mu}_{k}$ is drawn from the interval ${\mu}_{k}\in \phantom{\rule{4pt}{0ex}}\left({\mu}_{j}-0.06;\phantom{\rule{4pt}{0ex}}{\mu}_{j}\right),\phantom{\rule{4pt}{0ex}}{\mu}_{l}\in \phantom{\rule{4pt}{0ex}}\left({\mu}_{k}-0.06;\phantom{\rule{4pt}{0ex}}{\mu}_{k}\right).$ The fifth one is computed from the restriction that states that all weights have to sum up to one. In this procedure, each bank has a different ordering of ratios and in addition weights are obtained in a stochastic procedure.

This sub-module computes the value of interest rates for next iteration. If the values of perception indicators are equal to zero then the same empirical interest rates from the database in the cycle can be used. Otherwise, the indicators of perception to change the values of interest rates in the first iteration are used and then random values of perception indicators from the distribution are used. The perception of risk is different on the ON (${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}^{{ind}^{1}}$) and longer-maturity markets (SW, 1M, 3M) (respectively ${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}^{{ind}^{2}}$, ${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}^{{ind}^{3}}$,${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}^{{ind}^{4}}$). The parameter ${\mathsf{\zeta}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{ind}$ expresses the value of perception of uncertainty indicator.

$$\begin{array}{c}\hfill \phantom{\rule{4pt}{0ex}}{\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{1}}=0\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{2}}=0\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{3}}=0\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{4}}=0\phantom{\rule{4pt}{0ex}}\&\&\phantom{\rule{4pt}{0ex}}{{\mathsf{\zeta}\phantom{\rule{3.33333pt}{0ex}}}_{t}}^{ind}=0.\end{array}$$

At $t=0$, the simulation uses empirical data. In Figure 2 the household income according to the percentile has been presented as well as the approximation of wealth has been shown.

Based on empirical data, it is possible to calculate the approximation of the degree of income and wealth inequality in the sample at $t=0$, which has been compared with results of simulations of wealth and income distributions in counterfactual scenarios (at $t>0$).

Typically, the degree of inequality is calculated based on the Gini coefficient [105,106], and the Lorenz curve [107]. This section presents the results of the calculation of the basic Gini coefficient and the further studies on income and wealth inequality. Based on the sample, both the Lorenz curve and the income Gini coefficient were determined from the data on a quarterly and annual basis. The Gini coefficient for income distribution calculated on the basis of the quarterly sample data is equal to 0.3943179 (39.43%). In the case of calculations on annual figures, the coefficient value is slightly different, 0.3945987 (39.46%). If we include the corrections for unbiasedness, the value is 0.3947129 (39.37%).

These values differ slightly from the Gini coefficient for income distributions reported in the 2008 Report on Household Wealth and Debt, 39.4% versus 38.4%. This is due to the adoption of a different procedure of over-sampling of most affluent households. In addition, Grejcz and Żołkiewski [108] present the coefficient as 39.2%. At the same time, the authors emphasise that the procedure of oversampling of the most affluent households makes the value of Gini coefficient higher in comparison to the ones published by OECD, 35.5% or World Bank in 2014, 32.08%. In literature, other values of Gini coefficients for income distributions, computed using different samples, have been presented: 32.6% [109], 30.7% [110], 28.5% [111]. Accordingly, the Gini coefficient for wealth is equal to 0.6004731 (60.04%). The obtained results are relatively similar to the ones presented in the NBP [112] report 57.9%, and Grejcz and Żołkiewski [108] 58.7%.

According to Eurostat, Gini coefficient for income distribution in Poland in 2014 and 2015, were respectively 30.8% and 30.6%. The average Gini coefficient in the European Union for 28 countries was 30.9% in 2014 and 31% in 2015. A similar Gini coefficient for income distribution, suggesting a similar level of inequality, was reported in countries such as Croatia, 30.2% in 2014 and 2015, Ireland, 31.1% in 2014 and 29.8% in 2015, Germany, 30.7% in 2014 and 30.1% in 2015, and Great Britain, 31.6% in 2014 and 32.4% in 2015. The reported value of Gini coefficient of wealth for euro area by Grejcz and Żołkiewski [108] was 68.6%. In the case of the Gini coefficient for wealth distribution, similar results to the one for Poland were obtained in countries such as Malta, Belgium and Italy [113,114]. Interestingly, Gini coefficients for income and wealth of countries geographically and socially closer to Poland differ significantly from values reported for Poland.

However, as Chen [105] notes, “not all inequality curves yielding the same Gini coefficient are unequal in the same way”. This observation is important not only for comparisons between countries but also for monitoring changes in inequalities in a given country when applying or analysing policies in a particular counterfactual scenario. Using agent-based simulation, we can analyse how the Gini coefficients change between iterations as a consequence of the introduction of specific policies. Furthermore, we can also describe changes in inequalities using more accurate measures of asymmetry and measures of spatial inequality.

Among the most useful measures in identifying patterns of inequality are the Lorenz asymmetry coefficient [115,116,117], and radial triangular measures derived from the Lorenz asymmetry coefficient expressed in polar coordinates. The Lorenz asymmetry coefficient (LAC; abbrev. S) is defined as:
where the functions F and L are defined as for the Lorenz curve, and $\mu $ is the mean. Based on an ordered set of data $({x}_{1},{x}_{2},\dots {x}_{m},{x}_{m+1},\dots ,{x}_{n})$, we can compute statistics S in the following way
Damgaard and Weiner [115] show that Lorenz’s asymmetry coefficient allows us to notice that although two Lorenz curves allow in practice the same Gini coefficient to be obtained, their shapes are different, which translates into other patterns of inequality. If the LAC is less than one, the inequality is related to the presence of relatively much poorer units. If the LAC is greater than one then the inequality is related to the existence of extremely rich individual entities. For the purposes of further discussion, the point at which the first derivative of the Lorenz curve is equal to 1 in the interval $(0,1)$, it can be denoted, similarly to Chen [105], $[\mu ,f(\mu )]$.

$$\begin{array}{c}\hfill S=F(\mu )+L(\mu )\end{array}$$

$$\begin{array}{c}\hfill \delta \phantom{\rule{3.33333pt}{0ex}}={\displaystyle \frac{\mu -{x}_{m}}{{x}_{m+1}-{x}_{m}}}\end{array}$$

$$\begin{array}{c}\hfill F(\mu )={\displaystyle \frac{m+\delta}{n}}\end{array}$$

$$\begin{array}{c}\hfill L(\mu )={\displaystyle \frac{{L}_{m}+\delta \phantom{\rule{3.33333pt}{0ex}}{x}_{m+1}}{{L}_{n}}}.\end{array}$$

When calculating Lorenz’s asymmetry coefficient for income distribution based on quarterly data, a result of 0.9790896 is obtained. For annual data, this is 0.9788734. Similarly, for wealth distribution it is 0.942073944. Intuitively, if the value of the Lorenz coefficient is less than 1, the point $[\mu ,f(\mu )]$ is below and to the left of the symmetry axis. In fact, this case describes the situation in Poland, although the value does not differ significantly from the value of 1 corresponding to the point on the axis of symmetry. For the income distribution, the point $[\mu ,f(\mu )]=(0.63;0.35)$. This deals with the first of the two discussed situations. The income inequality in Poland is related to the relatively large number of poor agents. For wealth distribution, the point is equal $(0.68;0.26)$ which is for the first case. Indeed, the wealth inequality is Poland is related to the relatively much poorer units.

The lack of access to disaggregated income and wealth data for countries such as Croatia, Ireland, Germany or Great Britain makes it impossible to compare patterns of inequality in these countries. However, it is still possible to compute Gini coefficients for Poland in different counterfactual scenarios. In the case of subtle changes in inequality in one country, it may be helpful not only to calculate the LAC but also to describe Lorenz’s asymmetry with polar coordinates and to calculate the additional measure of adjusted azimuthal asymmetry (AAA) (cf. Chen [105]).

In this new approach the location of a point $[\mu ,f(\mu )]$ relative to the point $(\frac{1}{2},\frac{1}{2})$, a point dividing the line of equality in half can be described. In fact, $[\mu ,f(\mu )]$ can be designated according to its radial distance from $(\frac{1}{2},\frac{1}{2})$ and according to the azimuthal angle formed by that radius, relative to the line of symmetry. According to convention, they can be denoted accordingly $\rho $ and $\theta $. For the graphical explanation of $\rho $ and $\theta $ based on Chen [105], see: Figure 3. Both enhance the interpretation of Lorenz asymmetry coefficient. The maximum radial distance of $[\mu ,f(\mu )]$ from $(\frac{1}{2},\frac{1}{2})$ is $\frac{1}{\sqrt{2}}$ and the azimuthal angle formed by the axis of symmetry and the line segment connecting $(\frac{1}{2},\frac{1}{2})$ to $[\mu ,f(\mu )]$ falls within the range of +/−$\frac{\pi}{2}$.

The radial distance $\rho $ measures the concavity of the Lorenz curve and it is expressed by the formula:
Azimuthal angle $\theta $ measures the distance of $[\mu ,f(\mu )]$ from the axis of symmetry in precise angular terms. It is expressed by the formula:
It adds precision and intuitive geometric appreciation to the Lorenz asymmetry coefficient. “Whereas the primary use of S has been binary negative values lie to the left of the axis of symmetry, while positive uses lie to the right $\theta $ locates $[\mu ,f(\mu )]$ with precision within the unit triangle” [105] Note that S, $\rho $ and $\theta $ are constrained by the Gini coefficient. In practice, for a given value G, we have specified boundaries on the values S, $\rho $ and $\theta \phantom{\rule{3.33333pt}{0ex}}$. For any Gini coefficient G, the minimum value of S is G itself. The maximum value is $2-G$.

$$\begin{array}{c}\hfill \rho =\sqrt{{(\mu -\frac{1}{2})}^{2}+{(f(\mu )-\frac{1}{2})}^{2}.}\end{array}$$

$$\begin{array}{c}\hfill \theta \phantom{\rule{3.33333pt}{0ex}}=arcsin(\frac{S-1}{\rho \sqrt{2}}).\end{array}$$

For $t=0$ during the simulation, the following results are obtained for income distribution:
The distance from ($\frac{1}{2},\frac{1}{2}$) to the orthogonal intercept along the line of symmetry is 0.19886. The maximum $\theta $ given the value of Gini coefficient for quarterly data is equal to 0.99369. The adjusted azimuthal asymmetry coefficient for $t=0$ is equal to:
Accordingly, for the wealth distribution, the following is obtained:
The distance from ($\frac{1}{2},\frac{1}{2}$) to the orthogonal intercept along the line of symmetry is 0.3049. The maximum $\theta $ given the value of Gini coefficient for quarterly data is equal to 0.5880. The adjusted azimuthal asymmetry coefficient for $t=0$ is equal to:
As Chen [105] states, “adjusted azimuthal asymmetry promises a two-fold advantage over the unadorned Lorenz asymmetry coefficient. First, the asymmetry is more intuitively and more accurately expressed in angular terms than as the sum of two Cartesian coordinates. Second, because adjusted azimuthal asymmetry accounts for the maximum angular distance from the axis of symmetry for a particular value of G, it expresses a sense of proportionality that raw $\theta $, to say nothing of S, cannot”.

$$\begin{array}{c}\hfill \rho =0.19908,\theta \phantom{\rule{3.33333pt}{0ex}}=-0.07434,t={\displaystyle \frac{\theta}{\pi /2}}=-0.04733.\end{array}$$

$$\begin{array}{c}\hfill AAA=\frac{\theta}{{\theta}_{max}}=-0.07481.\end{array}$$

$$\begin{array}{c}\hfill \rho =0.30767,\theta \phantom{\rule{3.33333pt}{0ex}}=-0.13353,t={\displaystyle \frac{\theta}{\pi /2}}=-0.08500.\end{array}$$

$$\begin{array}{c}\hfill AAA=\frac{\theta}{{\theta}_{max}}=-0.22783.\end{array}$$

Although the spatial analysis is based on basic Theil index (TI), the generalised entropy index (that the Theil index is a special case of) can be started at. The generalised entropy index is defined as:
where N is the number of individuals or households, ${y}_{i}$ is the income of entity i, $\alpha $ is the weight given to distances between incomes at different parts of the income distribution. The generalised entropy index has been proposed as a better measure of income inequality with regard to Gini coefficient due to the fact that it is an additively decomposable inequality measure [118].

$$GE(\alpha )=\left\{\begin{array}{ll}{\displaystyle \frac{1}{N\alpha (\alpha -1)}}{\displaystyle \sum _{i=1}^{N}}[{({\displaystyle \frac{{y}_{i}}{\overline{y}}})}^{\alpha}-1]& \alpha \ne 0,1\\ {\displaystyle \frac{1}{N}}{\displaystyle \sum _{i=1}^{N}}{\displaystyle \frac{{y}_{i}}{\overline{y}}}ln{\displaystyle \frac{{y}_{i}}{\overline{y}}}& \alpha =1\\ -{\displaystyle \frac{1}{N}}{\displaystyle \sum _{i=1}^{N}}ln{\displaystyle \frac{{y}_{i}}{\overline{y}}}& \alpha \phantom{\rule{3.33333pt}{0ex}}=0\end{array}\right.$$

If it is assumed that $\alpha \phantom{\rule{3.33333pt}{0ex}}=1$, that is $GE(1)$, the TI is obtained. One of the advantages of the TI is that it is a weighted average of inequality within subgroups, plus inequality between those subgroups. For example, inequality within Poland is the average inequality within each region, weighted by region’s income, plus inequality between regions. We can express the decomposition formally. If for the TI the population is divided into k subgroups and ${s}_{i}$ is the income share of group i, ${T}_{{T}_{i}}$ is the Theil index for that subgroup, and ${\overline{x}}_{i}$ is the average income in group i, then then the TI is expressed by the formula:
The TI allows us to analyse the relative importance of spatial dimension of inequality, that is, the regional inequality [119].

$$\begin{array}{c}\hfill {T}_{T}={\displaystyle \sum}_{i=1}^{k}{s}_{i}{T}_{{T}_{i}}+{\displaystyle \sum}_{i=1}^{k}{s}_{i}ln\frac{{\overline{x}}_{i}}{\overline{x}}.\end{array}$$

For time $t=0$ during the simulation, based on empirical data of income and wealth, the entropy measure (EM) and TI for Poland is computed. We obtain respectively $EM=0.2721004$ and $TI=0.2836961$ for income, and $EM=0.7599967$ and $TI=0.6753153$ for wealth. The decomposition of TI allows us to analyse the spatial inequality in Poland. The results of measures of spatial inequality are not reported for confidentiality reasons. The authors cannot present which spatial codes 1-4 represent which region and districts in Central Statistical Office but it is feasible to present the data and visualise changes in spatial inequality in each counterfactual simulation using maps.

The generalised entropy index can also be transformed into a subclass of the Atkinson index (AI) with $\u03f5=1-\alpha \phantom{\rule{3.33333pt}{0ex}}$ for $0\le \alpha \phantom{\rule{3.33333pt}{0ex}}<1$, defined as:
where $\epsilon $ is an inequality aversion parameter. When $\epsilon $ approaches 0, it becomes more sensitive to changes in the upper end of the income distribution. Then, there is no aversion to inequality; no social utility is gained by complete redistribution. The higher $\epsilon $, the more AI becomes sensitive to changes at the lower end of the income distribution. At the same time, more social utility can be gained from the redistribution as aversion to inequality is higher. Relatively low values of AI indicate a more equal distribution than higher values, given a particular degree of risk aversion. The computation of AI for the empirical distribution of income for Poland allows us to obtain the result of 0.1314228. The AI for the empirical distribution of wealth is equal to 0.3438987. A number of other measures of concentration and inequality have also been calculated to investigate the sources of income inequality in Poland. The Herfindahl concentration index (HHI) is equal 0.0005451883, while the Rosenbluth concentration index (RI) is 0.0004778672. The values of additional measures of wealth inequality are equal to 0.001255462 in the case of HHI and 0.4313275 in the case of RI.

$${A}_{\epsilon}({y}_{1},\dots ,{y}_{N})=\left\{\begin{array}{ll}1-\frac{1}{\mu}{(\frac{1}{N}{\displaystyle \sum _{i=1}^{N}}{y}_{i}^{1-\epsilon})}^{\frac{1}{1-\epsilon}}& \mathrm{for}0\le \epsilon \ne 1\\ 1-\frac{1}{\mu}{({\displaystyle \mathsf{\prod}_{i=1}^{N}}{y}_{i})}^{\frac{1}{N}}& \mathrm{for}\epsilon =1\end{array}\right.,$$

The distributions of debt service to income (DSTI), debt to income (DTI), loan to value for housing loans (LTV ${}_{H}$) and debt to income (DTA) at $t=0$ are analysed, and then the changes in the empirical distribution of these ratios at $t>0$ are presented in Appendix D. The percentage of households that have DSTI ≥ $30\%$ ($6\%$) and $40\%$ ($3.5\%$), as well as DTI ≥ 3 ($3.6\%$) and $4.5$ ($1.7\%$) is computed. In the sample, 101 504 individuals have a total of 137 216 consumer loans. None of the individuals have more than 5 consumer loans. On average, individual customers have been charged statistically with 1.4 of consumer loans. In the sample, 43 008 housing loans were still to be repaid.

Using this agent-based simulation, it is possible to analyse the behaviour of a heterogeneous economy within certain counterfactual scenarios and the effects of public policies, especially stabilising and distributional effects of macroprudential policies. Firstly, the scenario is analysed in which the main mechanisms described by H. Minsky in ‘Stabilizing unstable economy’ (1986) [44] and in ‘Financial Instability Hypothesis’ (1992) [45] are simulated. Under the second scenario, the behaviour of the system is investigated, assuming the use of macroprudential policies to mitigate financial risk and stabilise an unstable economy. Then, the macroprudential policy stance which would best allow for the stabilization of heterogeneous economy is analysed, as is the distributional effects of these policies.

According to Reference [44], ‘capitalist economies exhibit inflations and debt deflations which seem to have the potential to spin out of control’. The economies are unstable by nature (this instability, in the most general terms, was mostly related to industrial structure and finance). In this statement Minsky refereed to the Kindleberger’s definition of self-sustaining disequilibrium from the 1970s. The capitalist economy is conditionally coherent. Instead of accepting the state of equilibrium, the focus should rather be on periods of tranquillity, apparent stability, which, in essence, are destabilising.

The neoclassical synthesis tries to explain how a decentralized economy achieves coherence and coordination in production and distribution (in other words, how market mechanisms lead to a sustained, stable-price, full-employment equilibrium). In opposition, the Minsky theory focuses on capital development of an economy and the impact of financial institutions’ activity on production and distribution. The optimum that is derived from the neoclassical decentralized market processes ‘rules out interpersonal comparisons of well-being and ignores the inequity of the initial distribution of resources and thus of income’. As Minsky stated, ‘inasmuch as our aim is to indicate how we can do better than we have, and as the best is often the enemy of the good, we can forget about the optimum [in neoclassical terms]. Even though a tendency toward coherence exists because of the processes that determine production and consumption in market economics, the processes of a market economy can set off interactions that disrupt coherence’ [44].

Minsky’s theory can be interpreted in two ways. In Keynesian terms, it should be understood in terms of accumulation of capital in the economy. In Knightian terms, it should rather be interpreted as a problem of allocating resources under risk and uncertainty. The paper refers to the first interpretation. In Extensions, the second interpretation is referred to. Hence, the role of risk perception and uncertainty in generation and amplification of risk within the system is analysed [42].

We begin with interpretations of the instability hypothesis in Keynesian terms. Minsky’s theory refers to the general theory of Keynes from the 1930s. Nonetheless, in ‘Stabilizing an unstable economy’, the process of capital accumulation described by Keynes is accompanied by an exchange of current money for the future. At the heart of this theory are not only capital stock and investment but primarily cash flows. Any attempt to model the instability hypothesis must therefore be stock-flow consistent. In reference to the Minsky theory, in the simulation, three types of stylized cash flows are developed: income, balance sheet and portfolio. The income cash flow refers to all payments in the production and sale of inputs and final goods, thus also the one in the supplier searching and purchase modules. The balance sheet cash flow refers to repayment of debts. The third type of cash flow occurs due to transactions in which capital and financial assets are acquired by a new agent. Money in cash form is not analysed explicitly in the model, but the general idea of money and settlements has been taken into account in the model. As Minsky noted, ‘money is created in the process of financing investment and positions in capital assets. An increase in the quantity of money first finances either an increase in the demand for investment output or an increase in the demand for items in the stock of capital or financial assets. As money is created, borrowers from banks enter upon commitments to repay money to the lending banks. In its origins in the banking process, money is part of a network of cash-flow commitments, a network that for the business side of the economy ultimately rests upon the gross profits, appropriately defined, that firms earn’ [44].

The current money is used to purchase inputs that are used in the production of investment and consumption goods. The purchase of inputs can be funded by the firm from the liquid assets and capital. Otherwise, external funding can be obtained. Financial institutions on the market generate profits from lending funds. ‘The financing terms affect the prices of capital assets, the effective demand for investment, and the supply price of investment outputs’ [44]. Firms, establishments and individuals are obliged to repay debt, that is, principal and interest rates, within designated deadlines. In Minsky’s basic theory, the focus was on investment. The government budget, the behaviour of consumption and the path of wages were secondary. To make the model more realistic and ensure it can be applied in modern policy making, all the above-mentioned elements were included. Similarly, the flow of money described by Minsky included only loans to firms, while in the simulation, loans to individuals and households were also added. The flow of money in Minsky’s theory, similarly to the simulation, has the following two directions. Individuals make deposits to banks and banks lend money to firms and individuals. In a later period, firms and individuals return funds to banks and banks to depositories.

In this theory the cash flows are influenced by the expected future profits; the flow of money from companies to banks takes place after the realisation of real profits. These expectations need not be always consistent with the final realisation of profits.

Funds can be obtained through negotiation, in which risk perception and uncertainty as well as expectations play an important role. Firms willing to obtain money for carrying out their activity interpret financial results and the economic situation in an enthusiastic way, and in fact often create overly optimistic expectations. While bankers are inherently conservative, though profit-seeking, they are more restrictive in assessing potential gains from a deal. Despite being more restrictive, bankers are also aware that investment in innovation and new products, services and industries is the most profitable. Consequently, their propensity to finance projects from the most dynamic and profitable sectors is usually greater than the projects from other industries, even if the riskiness of the project is higher than average.

Minsky’s theory incorporates elements of Kalecki-Levy theory, according to which the structure of aggregate demand determines profits. The profit expectations depend on the expected level of investment in the future and actual returns on investment. Investments continue on the assumption of both entrepreneurs and bankers that investment will also take place in the future. In order to increase investment, the agents borrow additional funds, frequently assuming unrealistic returns in the future.

According to Minsky, there are three types of agents that are characterised by their relation between income and debt. ‘Hedge financing units are those which can fulfil all of their contractual payment obligations by their cash flows. (...) Speculative finance units need to roll over their liabilities, [that is,] issue new debt to meet commitments on maturing debt. (...) For Ponzi units, the cash flows from operations are not sufficient to fulfil either the repayment of principle or the interest due on outstanding debts by their cash flows from operations. Such units can sell assets or borrow. Borrowing to pay interest or selling assets to pay interest on common stock lowers the equity of a unit, even as it increases liabilities and the prior commitment of future incomes. A unit that Ponzi finances lowers the margin of safety that it offers the holders of its debts’ [44]. The higher the leverage ratio of firms, the higher the probability of defaulting on debt. Therefore, the reduction of collateral required and credit rating requirements in this scenario leads to an increase in the percentage of speculative and Ponzi agents. Changes in creditworthiness requirements also affect the percentage of hedging, speculative and Ponzi-type agents in the economy. The higher the level of speculators and Ponzi-type agents, the greater the probability of a crisis.

Investment boom increases aggregate demand and spending through a multiplier effect and sales increase. Profits increase with increasing investment, encouraging further investment. In this way, the instability of the system is strengthened until the percentage of speculative investors increases significantly. In the case of prolonged prosperity, assuming that no prudential policies have been applied, the economy becomes unstable, due to the increasing number of speculative and Ponzi-type agents.

Minsky’s instability hypothesis is a study about the extent to which debt affects the behaviour of the system and how the level of debt is considered to be adequate in terms of dynamics of the system. According to this theory, there is no need for external shock for the crisis to occur. The crisis is generated endogenously by agents taking too much risk and by the desire by entrepreneurs and bankers to obtain ever-increasing profits. At the same time, this situation also has consequences for individuals and households. In the event of an increase in insolvencies, banks may default and thus depositors would lose the funds (the case in which by increasing uncertainty individuals decide to withdraw deposits is analysed in Extensions, see: [8]). In addition, the situation on the labour market determines changes in the income and wealth of households.

According to Minsky’s theory, increase in investment ‘would never trickle down to the poor and would tend to increase inequality by favouring the workers with the highest skills working in industries with the greatest pricing power’ [44]. In the simulation, this mechanism was modelled. Firms hire individuals according to their work skills and in industries with the greatest pricing power. Consequently, it leads to inequality. The changes in inequality can be measured using the Gini coefficient as well as other measures of asymmetry and spatial inequalities.

The dynamics of the real estate market is also changing. The increased percentage of job seekers is influencing their shift to cheaper properties and partly ineligible mortgage loan repayment, which again puts banks in a difficult position. Banks are in possession of properties for which there is no demand, and their prices are gradually lowered in order to find a buyer.

Two main components of the theory are the two-price system and the lender’s and borrower’s risk, both derived from theories of Kalecki and Keynes.

The first price system concerns current output prices, that is, costs and mark-ups, that need to be set at a level that will generate profits for the firm from the sale of consumer goods, investment goods, and goods and services purchased by the government in public contracts. If, in the analysis, the external fund increase is also taken into account, the supply price of capital plus the interest rate and lender’s risk must also be considered.

The second pricing system refers to assets. Assets are expected to generate cash flow in the future. These flows are not known and their estimation depends on subjective expectations. How much is able to be paid for such a financial asset depends on the amount of external finance required. The more the borrower becomes indebted, the greater the risk of insolvency; in this sense the price of the asset includes the borrower’s risk. Investments occur when demand price exceeds the supply price of assets. Prices include collateral. After the crisis, usually larger collateral are required, in the expansion period, they are lowered significantly.

As Minsky [44] states, ‘the costs of financing the production of investment is a cost that enters the supply price of output like the costs of labour and purchased inputs. The fact that a firm has to borrow to pay wages raises the effective costs by the interest payments on the borrowings’. ‘The decision to invest therefore involves a supply function of investment, which depends upon labour costs and short-term interest rates, a demand function for investment, which is derived from the price of capital assets, and the anticipated structure and conditions of financing. Whereas the structure of balance sheets reflects the mix of internal funds (gross retained earnings) and the external funds (bonds and equity issues) actually used, the investment decision is based upon expected flows of internal and external funds’ [44].

In the first scenario, the role and impact of financial institutions on production and distribution of income and wealth in the economy is simulated. As Minsky pointed out, according to neoclassical assumptions, the initial distribution of income and wealth did not matter. Neoclassical models ignore the impact of policies on income and wealth distributions ex post. The inclusion of ex ante heterogeneity was not relevant to the analysis of outcome ex post. In contrast, in the simulated scenario, we show that the processes of a market economy do ‘set off interactions that disrupt coherence’, and that incorporation of heterogeneity ex ante into the model makes it possible to observe changes in distributions ex post, including income and wealth distributions.

In accordance with Minsky’s hypothesis, in the database and model design, the focus was put not solely on heterogeneity in capital stock and on different investment decisions but also on balance sheet changes and cash flows.

In the scenario, firms operate in eight different sectors through establishments. In the first iteration, the most profitable sector is the first sector, thus it attracts the highest percentage of new investors. Other sectors attract a smaller percentage of new businesses. During first iterations we observe fluctuations in the relative profitability of sectors, related to business fluctuations, that is, the effect of the business cycle. In the initial iterations, only stock fluctuations related to intrinsic dynamics of the economy are observed, while in further iterations, it is observed that increased stock fluctuations and a cease in production is experienced by a higher percentage of establishments. The number of firms in each of sectors decreased over a year due to both higher rate of bankruptcies and higher concentration on the market, see: Figure A6 (on the right) in Appendix D. At $t=0$ there are 18727 establishments in the database. At $t=1$, 14112 establishments from the database at $t=0$ continue operating on the market. 4615 establishments ceased to produce, while 9887 new establishments were attracted by the market due to higher relative profitability of selected sectors. At $t=2$, 15727 establishments from $t=1$ operate on the market, while 2773 new establishments are created. In total, 18500 establishments are in operation. At $t=3$, 15357 establishments from $t=2$ operate on the market but only 1546 new establishments are established due to deterioration of market conditions. In total, a lower number of establishments (16,903) with respect to $t=0$ operate on the market. Some firms go bankrupt, while others cease their activity in selected establishments that are operating in less profitable sectors. At $t=4$, 15,357 establishments stay on the market and 1491 new establishments are created. In total, 16848 establishments continue operation.

In next iterations, there are higher levels of debt and leverage and increased financial risk in the sectors that were the most profitable in the previous periods. The risk spreading between sectors was visualised in Figure A5 (on the left and on the right side) and Figure A6 (on the left). Over a year, the higher number of firms’ bankruptcy with respect to the previous periods was observed, indicating the gradual endogenous generation of the crisis. Occasionally, though gradually more frequently, firms had problems finding a supplier, which is related to the cessation of business activity by selected establishments, and thus the interruption of network of transactions established between establishments and suppliers. The data could be analysed for further iterations than four (one year) but the goal was to show that a crisis can emerge endogenously in a relatively short period of time, such as 1–4 quarters, as it was the case during the financial crisis (Q2 2008–Q2 2009).

The problem of searching and matching the suppliers in the supply chain module gains importance. The time required to searching for supplier is increased due to the fact that new transaction relations are established with suppliers in further territorial units than previously.

When the uncertainty on the market increases and indicators of profitability and riskiness deteriorate, a lower percentage of firms is eligible for a loan. Establishments lose creditworthiness and are forced to restrict production, which in turn worsens economic conditions. At $t=1$, $62.5\%$ of establishments were checked for creditworthiness in the module Consumer credit admissibility 1, while $37.5\%$ in Consumer credit admissibility 2. In the following iterations, these values were respectively: $48.61\%$ and $51.39\%$ at $t=2$, $55\%$ and $45\%$ at $t=3$, and $57.5\%$ and $42.5\%$ at $t=4$. The firms and establishments’ conditions are also closely related to the problems of specific industries and fluctuations in the economy.

Expectations of lower profits lead to a reduction in the flow of money from companies to banks and from banks to companies, worsening the state of the economy. Banks are on the one hand aware of the higher risk related to granting loans to companies that qualify for the liquidity problem procedure, on the other hand it allows them to earn a premium. Overall, however, they provide loans for shorter periods, which is related to the general uncertainty in the market.

In the simulation cycle under first scenario, the number of companies with higher debt and higher leverage gradually increases. Using the simulation, changes can be observed in the distribution of the firms’ debt and leverage, rather than just analysing growth of the overall average debt and leverage. However, as the crisis becomes more severe, more firms with excessive debt and leverage go bankrupt or cease their activities in selected establishments; see: Table A11 in Appendix D.

The initial boom also encourages households to increase consumption, which in turn increases their overall debt, also affecting the value of debt service to income (DSTI), debt to income (DTI), debt to assets (DTA) and loan to value (LTV) ratios, see: Figure A12, Figure A13, Figure A14, Figure A15 and Figure A16. After the first iteration, the percentages of households that have DSTI ≥ 30% equal to 4.7%, and DSTI ≥ 40% equal to 2.7%, while the percentage of households with DTI ≥ 3 equal to 3% and DTI ≥ 4.5 equal to 1.3%. After the second iteration, the percentage of households with DSTI ≥ 30% was equal to 3.6%, and DSTI ≥ 40% equal to 2.2%, while the percentage of households with DTI ≥ 3 equal to 2.1% and with DTI ≥ 4.5 equal to 0.9%. After the third iteration, the percentage of households with DSTI ≥ 30% is equal to 4.6%, and with DSTI 40% ≥ 3.2%, while those with DTI ≥ 3 is equal to 1.9% and with DTI ≥ 4.5 equal to 0.9%. After one year, the percentage of households with DSTI ≥ 30% was equal to 5.04%, and with DSTI ≥ 40% was equal to 3.5%, while with DTI ≥ 3 this percentage was equal to 2.2% and with DTI ≥ 4.5 the percentage was equal to 1.1%. The percentage of households with respective values of DSTI and DTI at $t>0$ are lower than at $t=0$. There are two reasons that explain this pattern. Firstly, households with very excessive debt default are removed by the system. Secondly, highly indebted households will not apply for any new loans and they pay back part of the debt. Nonetheless, as soon as their creditworthiness improves due to loan repayment, they are attracted by the market via mechanisms described by Minsky and the ratios start to deteriorate. Changes in investment and external financing directly affect the market imbalances. Individuals with lower qualifications and level of education experience a gradually deteriorating situation on average.

After a year the Gini coefficient for income distribution is equal to 39.9% and for wealth distribution is 60.8%. After two years, the values are 41.1% and 61.3%, respectively. The LAC is equal to 0.96901 and 0.93896 after four quarters. The point $[\mu ,f(\mu )]=(0.63;0.33)$ for income, while it is equal $(0.66;0.26)$ the case of wealth. The adjusted azimuthal asymmetry (AAA) is equal to $-0.07541$ for income and $-0.21341$ for wealth.

Due to endogenous changes in the decisions of agents and their interactions, the dynamics of the markets and economy also changes. In particular, the dynamics of the labour and real estate markets change. Higher mortgages and a difficult situation on the labour market affect the dynamics of the real estate market. More properties are marked for sale and their price is reduced accordingly. On average, the prices of properties decreased by 2% in one year. It is possible to analyse a decrease in prices in each spatial unit, for example, region, however the results are not reported for confidentiality reasons.

With the deterioration of a favourable economic situation, the number of insolvencies and the NPLs ratios of banks increased; see: Appendix D (Figure A7 (on the right) and Figure A9 and Figure A10 (on the left and right). Higher non-performing loans affect the supply of credit in subsequent iterations. In the model it is possible to use two methods of determining the supply. If the first one is used, banks adopt similar strategies in groups. If the second is used, there may be a greater degree in the heterogeneity of strategies. In both cases, these patterns were observed. The model allows the analysis of differences in non-performing loans according to the loan type which thus reflects another aspect of heterogeneity. Using simulation, we can also analyse the changes in profits (Figure A8 (on the left)), equity (Figure A8 (on the right)) or the fulfilment with the capital and liquidity requirements which were set on too low levels (Figure A11 (on the left) and Figure A11 (on the right)).

In the second scenario, the behaviour of the economy is simulated, assuming the implementation of macroprudential policy aimed at stabilising the unstable economy. All banks set the capital requirements set by the regulator as well as apply the recommendations with respect to debt to income (DTI), debt service to income (DSTI), debt to assets (DTA), loan to value (LTV) ratios and leverage ratio (LR). In the economy, the activity of companies is conducted in the eight sectors grouping NACE industries. Among the analysed sectors, the most attractive for potential entities is the third sector, while the relatively least profitable for investors is the eight sector. In the case of any industry, there is no significant decrease in relative profitability. In first scenario, it was observed that the role of some of the sectors, that is, real estate sector, increased sharply, and then was significantly reduced. In the second scenario, no sudden discontinuity of production or increasing number of bankruptcies were observed. There are were no significant changes in product prices.

The expectations are relatively much more consistent in time than in the case of the first scenario. In this scenario, these expectations are only slightly different than those formed in the previous period and adapt to the fluctuations of the economy. Stock fluctuations are consistent with the dynamics of the economy. There is no stock accumulation or stop to production and sales of stored goods. In this scenario, the leverage level is moderate. Only in the case of a small percentage of establishments was production stopped completely.

In this scenario there are no searching-matching problems between the establishments in the search for suppliers. Quality-to-price ratio of establishment in relation to quality-to-price ratio in a given sector is the appropriate determinant of the supplier’s search decision. In most cases, it is possible to find a supplier in a given spatial unit that has a sufficient quantity of produced and stored goods. The search for a supplier in the unit that exceeded the basic spatial unit is moderate and corresponds to normal time market dynamics. The additional costs generated by transportation of inputs for establishments’ production of goods were also moderate.

Most firms have adequate liquid assets and adequate creditworthiness. Additional funds will be used for further investment. A very low percentage of establishments were eligible for the creditworthiness check in connection with transitional liquidity problems. Transient problems of establishments on the market are related to temporary economic fluctuations in industries, as well as market dynamics. In this scenario, banks have adopted similar credit requirements for less risk-prone companies. However, banks differ in credit requirements for more risk-prone businesses, especially firms with temporary liquidity or financial problems. The tightening of the criteria has countered the financial crisis. Of particular importance was the observation of return on assets (ROA), return on equity (ROE), financial risk and credit history of companies.

In the case of a low number of establishments, a readjustment of quantity was required, and the final purchase of the inputs was lower than the intended one. Banks providing loans for the purchase of inputs were characterised by different risk aversion and strategies on the market. In some cases, the network effects have been maintained. The establishments applied for a loan in a matched bank, thus maintaining a transaction link (edges in the network). For other transactions, there was a change of the loan-granting bank. When searching for a bank that will grant short-term credit for the purchase of inputs, the companies were mainly driven by the interest rate and the supply of credit.

In the model it is possible to use two methods of determining the supply. If the first one is used, banks adopt similar strategies in groups. If the second one is used, a greater degree of heterogeneity of strategies is observed. In the first case, network effects associated with transaction relationships in the market have been maintained. Individuals choose banks to apply for a loan according to the interest rates on consumer loans offered by banks. Granting a loan also depended on credit supply and sectoral exposure requirements. Some banks have exhausted the supply of consumer loans, which means that according to the strategy defined for a given period, the funds were spent on other activities such as granting short-term and long-term (investment) loans to companies, and residential and non-residential loans to individuals.

Within the second method, during the year the same number of individuals applied for a loan at the matched banks; a very high percentage of these applications were successful. In this case, network effects associated with transaction relationships in the market were maintained. The supply of consumer loans and sectoral requirements limited the number of loans granted.

In both cases there were also no searching-matching problems between consumers and suppliers of goods. Also, the quality-to-price ratio in relation to quality-to-price ratio in a given sector is the appropriate determinant of the supplier’s search decision. In most cases, it has been possible to find a supplier in a given spatial unit that had a sufficient quantity of produced and stored goods. In some cases, the search for suppliers exceeded the basic spatial unit, generating a modest cost of goods transportation. It did not generate an excessive burden on households.

Demand of establishments and households was complemented by demand from the government, through public procurement. The establishments that signed the public contracts produce high-quality products. These establishments were also part of the largest companies on the market.

In the case of households within ‘Housing stress!’, the cost of accommodation, whether in the case of servicing a housing loan or renting, proved to be excessive. These households changed their residence to a cheaper property. The dynamics of the housing market was not excessive and was consistent with household income fluctuations. In the case of a very low percentage of households, their insolvency was observed, as was an increase of NPLs in the banks by the value of their loans. The prices of properties fluctuate on the market as a whole but the prices remain relatively stable within a determined region.

Using the simulation, it is also possible to compute which percentage of households purchased a new property in cash and which have applied for a residential or non-residential loan. Demographic trends were fully preserved in the scenario. The probability of survival or death has been specified according to Central Statistical Office data. As a consequence of the death of individuals, inheritors gained additional deposits. Most companies were taken over by the heirs, while in cases of negligible value the inheritance was rejected. In some cases, the deceased was the owner of the property charged with the loan. These properties were taken over by the bank and were resold at a lower value. In the case of survivors, the tendencies of completed education by individuals were also maintained.

Some companies were not created despite starting the company opening process. Some did not obtain a business license, and in some cases, funds were not sufficient to run a business. Credit applications are a special case in which the entrepreneurs compared the interest charged by the banks. The banks also checked whether the supply side restriction was fulfilled and whether the sectoral exposure did not exceed the requirements. Sectoral exposures have made it possible to limit potentially excessive credit growth in the most profitable sectors at any given moment, including in the real estate sector, which normally expands dynamically during prosperity. The larger companies were funded with contributions from entrepreneurs. There was an increase in average goodwill points during an expansive phase of a business cycle. At the same time, the structure on the market changed, with some activities ceasing and other new activities being created. New establishments were mostly opened in sectors with high or moderate risk. Changes in the number and structure of firms on the market corresponded to the usual dynamics of the economy. There was no increased concentration of capital, business clustering, excessive bankruptcies or escalation of reductions of labour force in already operating establishments.

An analysis of the distributions describing the attributes of firms and establishments does not allow the identification of situations typical of financial or economic crises and symptoms of overheating of the economy. In this scenario, a significant increase in the risk of activity of firms and establishments on the market was not observed, nor was the strong growth of the economy and the increased financial risk of a particular industry. The average risk to the business activity in the market was moderate.

The lack of concentration of financial risk in a given industry is largely due to the introduction of regulations for maximum exposure to a given industry. The situation of banks is stable. For the first and the second procedure of supply determination, the NPL ratios were moderate. Liquidity requirements are met in the case of most banks. Capital requirements were fulfilled at the level of 8%, introduced by bank regulator. None of the banks declared insolvency. A very low percentage of individuals declared insolvency as a result of net savings at a negative level. The NPL ratios and the growth (inflow) of NPLs of banks was modest.

The stabilising effects of macroprudential policies for the economy and the financial system is significant, however the effect on reducing inequality is ambiguous. The richest agents on the market seem to remain unaffected by the introduction of the policies. In extreme cases, the rich get richer. After one year, the Gini coefficient for income distributions was equal to 39.7% and 60.6% for wealth. After two years, the values were 40.1% and 60.9%, respectively. The Lorenz Asymmetry Coefficient (LAC) was equal to 0.97672 and 94782 respectively. The point $[\mu ,f(\mu )]=(0.62;0.36)$ for income, while it is equal $(0.67;0.26)$ for wealth. The adjusted azimuthal asymmetry (AAA) is equal to $-0.07541$ in the case of income and $-0.21341$ in the case of wealth. The results do not differ significantly in the next four iterations.

Thus far, the possibility of stabilising an unstable economy using macroprudential policy has been analysed. Simulation has allowed analysis of the degree to which macroprudential policies influence the distribution of variables, including the distribution of income or the distribution of wealth, allowing a fuller welfare analysis. However, the main question is which policy combination to choose from, utilising possible combinations of tools to stabilise the economy and financial system, as well as to ensure a more homogeneous distribution of wealth and income. Optimal choice is understood here to mean the method of choosing the most advantageous combination of macroprudential tools (from the point of view of social well-being). In contrast to the social planner approach, the abstract concept of Bentham’s social utility is not focused on; rather there is focus on the stability of the economic and financial system and the measures of welfare that quantify changes in income and wealth distributions.

Based on the scenarios, it can be concluded that the use of a combination of macroprudential tools (appropriately calibrated) may lead to stabilisation of the system. Nonetheless, this combination of policies was not optimal in a sense that the statistical equilibrium was achieved at a level which does not guarantee a sufficient reduction of inequality in the system. The optimal policies would be the ones which enable a decrease in inequality in the system (to an acceptable level). The results were shown to be robust by carrying out the Monte Carlo procedure. The exact results for the Polish system (including optimal combination of macroprudential tools) are not reported here due to confidentiality of individual banks’ and firms’ data. The simulation can, however, be performed using data available from the National Bank of Poland, which would allow plausible results to be obtained. The results in the scenarios are mostly illustrative to the new methodology developed.

The paper has analysed the stabilising effects of macroprudential policies on a heterogeneous economy using an agent-based approach. The presented simulation is a novel application of agent-based approach in systemic risk modelling. The model constitutes an alternative to the ‘3D’ model with three layers of default that is widely-used by experts of the European Systemic Risk Board and the European Central Bank. The main advantage of the ABM model with respect to the ‘3D’ model is the possibility to carry out counterfactual simulations within the framework of fully heterogeneous agents.

The simulation results show the stabilising effects of binding macroprudential policies on the unstable heterogeneous economy. However, in opposition to mainstream literature, the use of macroprudential policies as an alternative to redistribution policies does not always lead to the same results if heterogeneity is assumed in the model. Even if the shape of the income and wealth distributions could be smoothed for most percentiles, the macroprudential policies do not affect the richest individuals in the desired way; the richest get even richer with respect to the rest of society. In general, the macroprudential policies and regulation should counteract the negative effects of the crisis, including the impact of the crisis on society (distributional effects). Nonetheless, this paper shows that suboptimal or non-binding macroprudential policies in the economy with heterogeneous agents ex ante and ex post do not remove the all negative distributional effects. Poor calibration of macroprudential policies would not only counteract the endogenous generation of the crisis in Minsky’s sense but would also lead to higher inequality. This finding is consistent with the ECB studies of P. Hartmann [120] on the distibutional effects of macroprudential policies and the possible interactions between social policies and macroprudential policies. This view was also supported by van der Heuvel [13] and Claessens [121]. Moreover, the policy recommendations and results of welfare analysis obtained from the DSGE models with homogeneous agents may be in practice very misleading for central bankers.

Conceptualization, J.K.-M. and M.P.; methodology, J.K.-M. and M.P.; software, J.K.-M.; validation, J.K.-M. and M.P.; formal analysis, J.K.-M. and M.P.; investigation, J.K.-M. and M.P.; resources, J.K.-M. and M.P.; data curation, J.K.-M. and M.P.; writing—original draft preparation, J.K.-M. and M.P.; writing—review and editing, J.K.-M. and M.P.; visualization, J.K.-M.; supervision, M.P.; project administration, J.K.-M. and M.P.; funding acquisition, J.K.-M. and M.P. All authors have read and agreed to the published version of the manuscript.

The research of J. Kaszowska-Mojsa was partially funded by the National Science Centre (2013/09/N/HS4/03740) and the Polish-U.S. Fulbright Commission. The research of M. Pipień was supported by the research grant no. 2017/25/B/HS4/02529, financed by the National Science Centre, Poland.

We would like to thank Alberto Russo and Silvano Cincotti for valuable comments during the seminars “Agent Based Modelling in Macroeconomics” on 8 May 2015, and “Agent-based Macroeconomics: Endogenous credit-driven business cycles in Eurace” on 4 October 2017 at the National Bank of Poland. We also would like to thank James M. Chen for valuable comments on inequality measures. The model code and pseudocodes can be found on: https://www.comses.net/codebase-release/9b39dc1c-506e-4a02-b2ca-56b9c50738e4/.

The authors declare no conflict of interest.

The following abbreviations are used in this manuscript:

AAA | Adjusted Azimuthal Asymmetry |

ABM | Agent-Based Modelling |

AI | Atkinson Index |

BZGD | Household Wealth and Debt Survey |

CAR | Capital Adequacy Ratio |

CEE | Central and Eastern Europe |

CPA | Classification of Products by Activity |

CRISIS | Complexity Research Initiative for Systemic Instabilities |

DSGE(-3D) | Dynamic Stochastic General Equilibrium Model (with 3 layers of default) |

DTA | Debt to Assets Ratio |

DSTI | Debt Service to Income Ratio |

DTI | Debt to Income Ratio |

ECB | European Central Bank |

EM | Entropy Measure |

ESRB | European Systemic Risk Board |

EU | European Union |

EURACE | A Massively Parallel Agent-Based Model of the European Economy |

FX | Foreign Currency |

GE($\alpha $) | Generalised Entropy Index |

GUS | Central Statistical Office |

HHI | Herfindahl Concentration Index |

IMF-FSB-BIS | International Monetary Funds-Financial Stability Board-Bank for International Settlements |

LAC | Lorenz Asymmetry Coefficient |

LCR | Liquidity Coverage Ratio |

LE | Large Exposures |

LR | Real Business Cycle |

LTV | Loan to Value Ratio |

LTV ${}_{H}$ | Loan to Value Ratio (only for mortgages) |

MOSIPS | Modeling and Simulation of the Impact of Public Policies on SMEs (FP7) |

NBP | National Bank of Poland |

NPLs | Non-performing loans |

NUTS (1–4) | Nomenclature of Territorial Units for Statistics |

PFSA | Polish Financial Stability Authority |

PKD (NACE) | Statistical Classification of Economic Activities in the European Community |

RBC | Real Business Cycle |

RI | Rosenbluth Concentration Index |

ROA | Return on Assets |

ROE | Return on Equity |

TI | Theil index |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{ind}\phantom{\rule{4pt}{0ex}}$ | Individual ID (code identifying individuals) | Int. | ≥0 |

${(Id)}^{HH.(ind)}$ | Identification code of household to which the individual belongs to | Int. | ≥0 |

$({Id)}^{est.(ind)}$ | Identification code of establishment in which the individual works | Int. | ≥0 |

${(Age)}_{t}^{ind}$ | Age of individual at time t | Double | ≥0 |

${(Educ)}_{t}^{ind}$ | Level of education completed by the individual at time t | Int | $\in \left\{1,2,3,4,5,6,7,8\right\}$ |

${(EducP)}_{t}^{ind}$ | Periods of education | Int. | |

${(Entr)}_{t}^{ind}$ | The variable determining whether an individual is an entrepreneur at time t | Boolean | $\in \left\{0,1\right\}$ |

$({EntrP)}_{t}^{ind}$ | The variable determining whether an individual was an entrepreneur in the past | Boolean | $\in \left\{0,1\right\}$ |

$({EntrS)}_{t}^{ind}$ | The probability of becoming an entrepreneur in the future (expectations) | Double | $\in \u23290,1\u232a$ |

${G}^{ind}$ | Gender of an individual | Boolean | $\in \left\{0,1\right\}$ |

${Id}_{{d}_{t}}^{bank.(ind)}$ | Bank matched to the individual in which deposits (savings) are hold at time t | Int. | ≥0 |

${d}_{t}^{ind}$ | Deposits (savings and current account funds) on bank account of individual at time t | Double | ≥0 |

${Id}_{{l}_{t}^{C}}^{bank.\left(ind\right)}$ | Bank matched to the individual in which wants to take a consumer loan at first at time t | Int. | ≥0 |

${l}_{t}^{{C}^{ind}}$ | The amount of consumer loan taken at time t | Double | ≥0 |

${(pl)}_{t}^{{C}^{ind}}$ | The sum of liabilities to the bank for outstanding consumer loans that have to be repaid in the given iteration | Double | ≥0 |

${\mathrm{M}}^{{C}^{ind}}$ | The maturity of consumer loan in quarters | Double | ≥0 |

${l}_{t}^{{C}_{q}^{ind}}$ | Consumer loans taken by an individual (quarterly payments at time t) | Double | ≥0 |

${R}_{t}^{{C}^{ind}}$ | Interest to be paid from the total amount of consumer loans | Double | ≥0 |

${R}_{t}^{{C}_{q}^{ind}}$ | Interest to be paid from the total amount of consumer loans in a quarter | Double | ≥0 |

${Id}_{{l}_{t}^{H}}^{bank.\left(ind\right)}$ | Bank matched to the individual in which wants to take a housing loan at first at time t | Int. | ≥0 |

${l}_{t}^{{H}^{ind}}$ | The amount of housing loan taken at time t | Double | ≥0 |

${(pl)}_{t}^{{H}^{ind}}$ | The sum of liabilities to the bank for outstanding housing loans that have to be repaid in the given iteration | Double | ≥0 |

${\mathrm{M}}^{{H}^{ind}}$ | The maturity of housing loan in quarters | Double | ≥0 |

${l}_{t}^{{H}_{q}^{ind}}$ | Housing loans taken by an individual (quarterly payments at time t) | Double | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

${R}_{t}^{{H}^{ind}}$ | Interest to be paid from the total amount of housing loans | Double | ≥0 |

${R}_{t}^{{H}_{q}^{ind}}$ | Interest to be paid from the total amount of housing loans in a quarter | Double | ≥0 |

${Id}_{{l}_{t}^{NH}}^{bank.\left(ind\right)}$ | Bank matched to the individual in which wants to take a non-housing loan at first at time t | Int. | ≥0 |

${l}_{t}^{{NH}^{ind}}$ | The amount of non-housing loan taken at time t | Double | ≥0 |

${(pl)}_{t}^{{NH}^{ind}}$ | The sum of liabilities to the bank for outstanding non-housing loans that have to be repaid in the given iteration | Double | ≥0 |

${\mathrm{M}}^{{NH}^{ind}}$ | The maturity of non-housing loan in quarters | Double | ≥0 |

${l}_{t}^{N{H}_{q}^{ind}}$ | Non-housing loans taken by an individual (quarterly payments at time t) | Double | ≥0 |

${R}_{t}^{{NH}^{ind}}$ | Interest to be paid from the total amount of non-housing loans (at time $t)$ | Double | ≥0 |

${R}_{t}^{{NH}_{q}^{ind}}$ | Interest to be paid from the total amount of non-housing loans in a quarter (at time $t)$ | Double | ≥0 |

${Id}_{{l}_{t}^{I}}^{bank.\left(ind\right)}$ | Bank matched to the individual in which wants to take an investment loan at first at time t | Int. | ≥0 |

${l}_{t}^{{I}^{ind}}$ | Investment loans taken by an individual to invest in a firm that he owns or co-owns (at time $t)$ | Double | ≥0 |

${(pl)}_{t}^{{I}^{ind}}$ | The sum of liabilities to the bank for outstanding investment loans that have to be repaid in the given iteration | Double | ≥0 |

${\mathrm{M}}^{{I}^{ind}}$ | Maturity of investment loan | Int. | ≥0 |

${l}_{t}^{{I}_{q}^{ind}}$ | Investment loans taken by an individual (quarterly payments at time t) | Double | ≥0 |

${R}_{t}^{{I}^{ind}}$ | Interest to be paid from the total amount of investment loans (at time $t)$ | Double | ≥0 |

${R}_{t}^{{I}_{q}^{ind}}$ | Interest to be paid from the total amount of investment loans in a quarter (at time t) | Double | ≥0 |

${PD}_{t}^{ind}$ | Probability of default of individual at time t | Double | $\in \u23290,1\u232a$ |

${y}_{t}^{ind}$ | Income of an individual at time t | Double | ≥0 |

${w}_{t}^{ind}$ | Wage of an individual at time t | Double | ≥0 |

${(sub)}_{t}^{ind}$ | Public assistance for an individual at time t | Double | ≥0 |

${\psi}_{t}^{ind}$ | Shares of an individual in large and medium-sized companies at time t | Double | ≥0 |

${\Xi}_{t}^{ind}$ | Status on the labour market of individual at time t | Int. | $\in \left\{1,2,3,4,5\right\}$ |

${\mathsf{\Psi}}_{t}^{ind}$ | Number of periods since the last change of status on the labor market in quarters (at time $t)$ | Int. | ≥0 |

${\mathsf{\Theta}}_{t}^{ind}$ | Variable determining the skills of workers | Double | $\in \u23290,1\u232a$ |

${\mathsf{\Lambda}}_{t}^{ind}$ | Status civil | Int. | $\in \left\{1,2,3,4\right\}$ |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{1}}$ | Spatial code 1 (NUTS1) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{2}}$ | Spatial code 2 (NUTS2) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{3}}$ | Spatial code 3 (NUTS3) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{4}}$ | Spatial code 4 (NUTS4) | Int. | ≥0 |

${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{1}}$ | Perception of risk indicator (ON market) | Double | $\in \u23290,1\u232a$ |

${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{2}}$ | Perception of risk indicator (SW) | Double | $\in \u23290,1\u232a$ |

${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{3}}$ | Perception of risk indicator (1M) | Double | $\in \u23290,1\u232a$ |

${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{{ind}^{4}}$ | Perception of risk indicator (3M) | Double | $\in \u23290,1\u232a$ |

${{\zeta \phantom{\rule{3.33333pt}{0ex}}}_{t}}^{ind}$ | Perception of uncertainty indicator | Double | $\in \u23290,1\u232a$ |

Variable | Explanation | Type | Restr. |
---|---|---|---|

${(Id)}^{HH}$ | Household ID | Int. | ≥0 |

${h}_{t}^{HH}$ | The cost of living in own property or renting a property by the household at time t | Double | ≥0 |

${s}_{t}^{HH}$ | The net savings of households (temporal variable) at time t | Double | ≥0 |

${(Don)}_{t}^{HH}$ | Donations at time t | Double | ≥0 |

${(DSTI)}_{t}^{HH}$ | Debt service to income at time t | Double | ≥0 |

${(DTA)}_{t}^{HH}$ | Debt to assets at time t | Double | ≥0 |

${(DTI)}_{t}^{HH}$ | Debt to income at time t | Double | ≥0 |

${(LTV)}_{t}^{HH}$ | Loan to value (for housing loans) at time t | Double | ≥0 |

${ID}_{t}^{prop1.(HH)}$ | Property id (the property in which the household lives) at time t | Double | ≥0 |

${ID}_{t}^{prop2.(HH)}$ | Property id (this second property can be rented by other households or can be for sale) | Double | ≥0 |

${(Rent)}_{{RE}_{t}}^{HH}$ | Household income from renting property at time t | Double | ≥0 |

${(Own)}_{t}^{HH}$ | Status of the owner at time t | Boolean | $\in \left\{0,1\right\}$ |

${y}_{t}^{HH}$ | Total household income at time t | Double | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{firm}$ | Firm ID | Int. | ≥0 |

$({Id)}^{s}$ | Sector ID in which the establishments of the firm operate | Int. | ≥0 |

${(PD)}_{t}^{firm}$ | The probability of default of a firm based on credit history | Double | $\in \u23290,1\u232a$ |

${(Risk)}_{t}^{firm}$ | The financial risk of the company | Double | $\in \u23290,1\u232a$ |

${(\#Oper)}_{t}^{firm}$ | Number of periods that a firm operates on the market | Int. | ≥0 |

${(Debt)}_{t}^{firm}$ | Debt of the company | Double | ≥0 |

${(MV)}_{t}^{firm}$ | The value of the firm in monetary terms | Double | ≥0 |

${\mathrm{\Pi}}_{t}^{firm}$ | Profits generated by the firm | Double | ≥0 |

${(ForSale)}_{t}^{firm}$ | Variable determining whether a firm has been marked for sale | Boolean | $\in \{0,1\}$ |

${K}_{t}^{firm}$ | Fixed capital of a firm | Double | ≥0 |

$({Id)}^{ind.(firm)}$ | Codes identifying business owner | Int. | ≥0 |

${(LA)}_{t}^{firm}$ | Liquid assets of a firm | Double | ≥0 |

${({N}_{est})}_{t}^{firm}$ | Number of establishments of a firm in all sectors | Int. | ≥0 |

${t}_{profit}$ | Taxes on profits | Double | ≥0 |

${L}_{t}^{firm}$ | Number of employees of a firm | Int. | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{est}$ | Establishment ID | Int. | ≥0 |

$({{Id}_{{l}^{SH}})}^{b}$ | ID of bank that granted short-term loan to establishment | Int. | ≥0 |

${(TC)}_{t}^{est}$ | Costs of the establishment at time t | Double | ≥0 |

${(TC)}_{t-1}^{est}$ | Cost of the establishment at time $t-1$ | Double | ≥0 |

$({PD)}_{t}^{est}$ | Probability of default of establishment at time t | Double | $\in \u23290,1\u232a$ |

${Q}_{t}^{{d}_{est}}$ | Demand for a good or service provided by the establishment at time t | Double | ≥0 |

${(New)}_{t}^{est}$ | Variable determining whether the establishment has been recently created | Boolean | $\in \left\{0,1\right\}$ |

$E\left({Q}_{t}^{{d}_{est}}\right)$ | Expected demand for a good or service | Double | ≥0 |

${(ExpImp)}_{t}^{est}$ | Variable determining whether the establishment exports, imports or both | Double | $\in \left\{0,1,2,3\right\}$ |

$({Id)}^{firm(.est)}$ | The code identifying the business which premises belongs to | Int. | ≥0 |

${K}_{t}^{est}$ | Fixed capital | Double | ≥0 |

${(Inp)}_{t}^{est}$ | Quantity of inputs required in the production of final goods expressed in monetary terms | Double | ≥0 |

${R}_{t}^{{SH}^{est}}$ | Interest on short-term firm loans to be paid | Double | ≥0 |

${R}_{t}^{{SH}_{q}^{est}}$ | Interest on short-term firm loans to be paid quarterly | Double | ≥0 |

${A}_{t}^{est}$ | Know-how (technology) | Double | ≥0 |

${(LA)}_{t}^{est}$ | Liquid assets of an establishment | Double | |

${\mathsf{\varsigma}\phantom{\rule{3.33333pt}{0ex}}}_{t}^{est}$ | Perception indicator of establishment | Double | $\in \u23290,1\u232a$ |

${{\zeta \phantom{\rule{3.33333pt}{0ex}}}_{t}}^{est}$ | Indicator of perception of uncertainty on the market | Double | $\in \u23290,1\u232a$ |

${P}_{t}^{est}$ | Price of goods produced by the establishment at time t | Double | ≥0 |

${P}_{t-1}^{est}$ | Price of goods produced by the establishment in the previous period ($t-1)$ | Double | ≥0 |

${Y}_{t}^{est}$ | Production | Double | ≥0 |

${q}_{t}^{est.buy.(s)}$ | The quantity of goods purchased from the supplier from sector s | Double | ≥0 |

${l}_{t}^{{SH}^{est}}$ | Loans taken by establishment to purchase inputs | Double | ≥0 |

${\mathrm{M}}^{{SH}^{est}}$ | Maturity of short-term loans | Int. | ≥0 |

${l}_{t}^{S{H}_{q}^{est}}$ | Loans taken by establishments to purchase inputs (quarterly) | Double | ≥0 |

${(Ql)}_{t}^{est}$ | Quality of products at time t | Double | $\in \u23290,1\u232a$ |

${(Ql)}_{t-1}^{est}$ | Quality of products at time $t-1$ | Double | $\in \u23290,1\u232a$ |

${(SE)}_{t}^{est}$ | Sales per employee (expressed in monetary terms) | Double | ≥0 |

${(Sl)}_{t}^{est}$ | Sales expressed in monetary terms | Double | ≥0 |

$({Id)}^{s.(est)}$ | Sector ID | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{1}}$ | Spatial code – level 1 (NUTS1) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{2}}$ | Spatial code – level 2 (NUTS2) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{3}}$ | Spatial code – level 3 (NUTS3) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{est}^{4}}$ | Spatial code – level 4 (NUTS4) | Int. | ≥0 |

${Inv}_{t}^{est}$ | Inventories (stock) | Double | ≥0 |

${Inv}_{{opt}_{t}}^{est}$ | Optimal stock of goods stored in the current period | Double | ≥0 |

${t}_{pr}$ | Property tax | Double | ≥0 |

${W}_{t}^{est}$ | The cost associated with the payment of wages by the premises | Double | ≥0 |

${L}_{t}^{est}$ | Total labor force (number of employees) of the premises | Double | ≥0 |

${L}_{t}^{{FI}^{est}}$ | Number of employees (labor force) to be fired in the current period | Double | ≥0 |

${L}_{t}^{{HI}^{est}}$ | Number of employees (labor force) to be hired in the current period | Double | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{b}$ | Bank ID | Int. | ≥0 |

${B}_{t}^{b}$ | Bonds | Double | ≥0 |

${(CT)}_{t}^{b}$ | Operating costs | Double | ≥0 |

${(PD)}_{t}^{b}$ | The probability of default of the bank | Double | $\in \left\{0,0.5,\phantom{\rule{4pt}{0ex}}1\right\}$ |

${d}_{t}^{b}$ | Deposits of the bank | Double | ≥0 |

${(Rev)}_{t}^{b}$ | Revenues of the bank | Double | ≥0 |

${(AvC)}_{t}^{b}$ | Average costs of banking operating in the sample | Double | ≥0 |

${(SdC)}_{t}^{b}$ | Standard deviation of costs of banks operating in the sample | Double | ≥0 |

${E}_{t}^{b}$ | Capital | Double | ≥0 |

${i}_{{l}^{C}}$ | Interest rate on consumer loans | Double | ≥0 |

${i}_{d}$ | Interest rate on deposits | Double | ≥0 |

${i}_{{l}^{I}}$ | Interest rate on loans for investment purposes | Double | ≥0 |

${i}_{{l}^{SH}}$ | Interest rate on loans for the purchase of inputs | Double | ≥0 |

${i}_{{l}^{H}}$ | Interest rate on mortgages | Double | ≥0 |

${i}_{{l}^{NH}}$ | Interest rate on non-housing loans (on the pledge of real estate) | Double | ≥0 |

${(\#pd)}_{t}^{b}$ | Number of insolvencies of agents that had loans in this bank | Double | ≥0 |

${({NPL}_{{l}^{SH}})}_{t}^{b}$ | Net inflow of non-performing loans (for short term loans) | Double | $\in \u23290,1\u232a$ |

${({NPL}_{{l}^{I}})}_{t}^{b}$ | Net inflow of non-performing loans (for investment loans) | Double | $\in \u23290,1\u232a$ |

${({NPL}_{{l}^{C}})}_{t}^{b}$ | Net inflow of non-performing loans (for consumer loans) | Double | $\in \u23290,1\u232a$ |

${({NPL}_{{l}^{H}})}_{t}^{b}$ | Net inflow of non-performing loans (for mortgages) | Double | $\in \u23290,1\u232a$ |

${({NPL}_{{l}^{NH}})}_{t}^{b}$ | Net inflow of non-performing loans (for non-housing loans) | Double | $\in \u23290,1\u232a$ |

${({Rev}_{{l}^{C}})}_{t}^{b}$ | Revenues from granting consumer loans | Double | ≥0 |

${({Rev}_{{l}^{SH}})}_{t}^{b}$ | Revenues from granting short term loans for firms | Double | ≥0 |

${({Rev}_{{l}^{I}})}_{t}^{b}$ | Revenues from granting investment loans | Double | ≥0 |

${({Rev}_{{l}^{H}})}_{t}^{b}$ | Revenues from granting mortgages | Double | ≥0 |

${({Rev}_{{l}^{NH}})}_{t}^{b}$ | Revenues from granting non-housing loans | Double | ≥0 |

${S}_{t}^{{l.C}^{ind}}$ | Supply for consumer loans | Double | ≥0 |

${S}_{t}^{l.{I}^{est}}$ | Supply for firm investment loans | Double | ≥0 |

${S}_{t}^{l.{SH}^{est}}$ | Supply for short term loans for firms | Double | ≥0 |

${S}_{t}^{{l.H}^{ind}}$ | Supply for mortgages | Double | ≥0 |

${S}_{t}^{{NH}^{ind}}$ | Supply for non-housing loans | Double | ≥0 |

${i}_{Bid3M}$ | Interest rate WIBID3M | Double | ≥0 |

${i}_{OR3M}$ | Interest rate WIBOR3M | Double | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{s}$ | Sector ID | Int. | ≥0 |

${\overline{\pi}}_{t}^{s}$ | Average profitability of firms in the sector s | Double | ≥0 |

${\overline{(Risk)}}_{t}^{s}$ | Average financial risk of the industry (sector) | Double | $\in \u23290,1\u232a$ |

${(Sl)}_{t}^{s}$ | The average sales of goods in firms in a given industry | Double | ≥0 |

${\overline{L}}_{t}^{s}$ | Average work force of establishments in the industry | Double | ≥0 |

${\overline{W}}_{t}^{s}$ | Average wage in industry (sector) | Double | ≥0 |

${(\%Exp)}_{t}^{s}$ | Percentage of establishments that import to other industries | Double | ≥0 |

${(\%Imp)}_{t}^{s}$ | Percentage of establishments that exports from other industries | Double | ≥0 |

${P}_{t}^{s}$ | Average price of good or service in a given industry at time t | Double | ≥0 |

${P}_{t-1}^{s}$ | Average price of goods or services in a given industry at time $t-1$ | Double | ≥0 |

${\mathrm{\Pi}}_{t}^{s}$ | Total profit from the business of establishments in a given industry | Double | ≥0 |

${(Ql)}_{t}^{s}$ | The average quality of a good or service in a sector in the current period | Double | ≥0 |

${(Ql)}_{t-1}^{s}$ | The average quality of a good or service in a sector in the previous period | Double | ≥0 |

${(AL)}_{t}^{s}$ | Average size of a firm in a given industry (sector) | Double | ≥0 |

${(SD)}_{t}^{s}$ | Standard deviation of the size of firms in the sector | Double | ≥0 |

${N}_{t}^{f{irm}_{s}}$ | Number of firms operating in the industry | Int. | ≥0 |

${t}_{VAT}$ | Value added tax | Double | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{prop}$ | Property ID | Int. | ≥0 |

$({Id)}^{HH.(prop)}$ | Household ID | Int. | ≥0 |

${(\#Rent)}_{t}^{prop}$ | Number of households that rent the property at time t | Int. | ≥0 |

${(PH)}_{t}^{prop}$ | Principal housing | Boolean | $\in \left\{0,1\right\}$ |

${P}_{t}^{prop}$ | Property price | Double | ≥0 |

${(ForSale)}_{t}^{prop}$ | Property for sale | Boolean | $\in \left\{0,1\right\}$ |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{1}}$ | Spatial code level 1 (NUTS1) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{2}}$ | Spatial code level 2 (NUTS2) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{3}}$ | Spatial code level 3 (NUTS3) | Int. | ≥0 |

${\vartheta \phantom{\rule{3.33333pt}{0ex}}}_{t}^{{prop}^{4}}$ | Spatial code level 4 (NUTS4) | Int. | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{HH.(cons)}$ | Household ID | Int. | ≥0 |

${(ConsT)}_{t}^{(cons)}$ | Consumer type | Int. | $\in \left\{1,2,3,4,5,6\right\}$ |

$({Id)}^{(cons)}$ | Consumer ID | Int. | ≥0 |

$({Id)}^{s.(cons)}$ | Sector ID | Int. | ≥0 |

$({Id)}^{sup.(cons)}$ | Supplier ID | Int. | ≥0 |

${Q}_{t}^{HH.(cons)}$ | The quantity of goods that a household will buy from suppliers in all sectors at time t | Double | ≥0 |

Variable | Explanation | Type | Restr. |
---|---|---|---|

$({Id)}^{est.(sup)}$ | Establishment ID | Int. | ≥0 |

${Q}_{t}^{buy.est}$ | Quantity of inputs to be purchased by establishment at time t | Double | ≥0 |

$({Id)}^{s.(sup)}$ | Sector ID | Int. | ≥0 |

$({Id)}^{sup}$ | Supplier ID | Int. | ≥0 |

At the start of the simulation, the attributes of individuals, households, and consumers, as well as some attributes of properties were calibrated on the basis of data from the Household Wealth and Debt Survey from 2014 [112]. This first study on household wealth and indebtedness in Poland was conducted between January, 20 and February 28, 2014, on a sample of 7000 households residing in the country. The study was conducted through direct interviews. The test sample was generated by a two-stage random sampling scheme, where the first stage of sampling was stratified; the census units were randomly selected from the layers, and the second stage of household sampling was randomised. The stratification was based on the following criteria: province, size of the spatial unit (6 categories) and wealth (on a scale of 1–4). In the applied scheme, procedures of over-sampling of the most affluent households and imputation of missing observations were applied [122]. The completion ratio of the surveys was approximately 49.4%.

Based on the information from the Household Wealth and Debt Survey sample, the distributions of agent’s attributes were approximated. In the model 971 520 individuals were distinguished at $t=0$. There are 509 056 ($0.52\%$) women and 462 464 ($0.48\%$) men in the database. The distributions of sex and age were compared with the data from ‘Population. Size and structure of population and vital statistics in Poland by territorial division as of 31 December 2014’ [123], and ‘Size and structure of population by age groups in 1989–2016’ [124], provided by the Central Statistical Office (GUS). To ensure the proper dynamics of the model, data from ‘Marriages contracted and dissolved in 1970–2015’ [125], ‘Births in 1970–2015’ (GUS) [126] and ‘Demographic Yearbook of Poland 2015’ [127] were also used. In addition, data from life expectancy tables of 2014 provided by GUS were used [128]. Data was supplemented by ‘Education in the school year 2014/2015’ (GUS) [129]. Supplementary data on labour market and wages was used from ‘Yearbook of Labour Statistics, 2015’ (GUS) [130]. In addition, information from ‘Social assistance. Child and Family services’ (GUS) [131] was used. In the model, at $t=0$, 442,240 households were distinguished. Each household is described by a joint distribution of attributes. BZDG data was supplemented by the data from ‘Household budget survey in 2014’ (GUS) [109] in order to obtain distributions. To each household a specific type of consumer has been assigned, which determines expenditures. There are therefore 442,240 × 8 (industries) × 6 (consumer types) = 21,227,520 data-points (records) in the Table Consumers database.

The values of variables of firms and establishments were approximated on the basis of GUS reporting forms of enterprises for 2014 [132]. In order to approximate inputs from different sectors and demand for final goods as well as direct product input coefficients and direct import input coefficients, information from input-output tables for 2010, provided by the Central Statistical Office [133], was used. The distributions of variables have not been reported for confidentiality reasons.

The sectors in the model correspond to the branches of economy used in the input-output table at basic prices for domestic output for 2010, provided by GUS (2014) [133]. The classification used in the table corresponds to products and intermediate consumption (CPA 2008). Data from input-output tables was used to approximate the flows between sectors in the model. Each industry is described by the average values of variables that were approximated using the data from Central Statistical Office forms. The classification of industries (PKD (NACE) 2007) was matched with the classification of sectors used in the input-output tables. PKD 2007 is more disaggregated than the classification used in the published input-output tables. PKD-2007 is fully methodologically, conceptually, in the scope and coding system (up to fourth digit) coherent and compatible with the classification NACE Revision 2. In the input-output tables the Classification of Products by Activity (CPA) was used. Some of PKD sectors were aggregated into one group in input-output tables for confidentiality reasons. A total number of 73 sectors were analysed, excluding sectors 04 (Coal and lignite), 08 (Tobacco products), 66 (Public administration and defence services; compulsory social security services) and 77 (Services of households as employers of domestic personnel & Undifferentiated goods and services produced by private households for own use). The suppliers for establishments have been matched based on input-output tables. The model expresses the network structure of relations between companies in the economy. For confidentiality reasons, the system was simulated with eight sectors, grouping certain industries.

The model included 14 major banks in the market. The interest rates for these representative banks came from new MIR interest rate statistics [134]. Different interest rates were used for deposits, consumer credit, housing loans and non-residential loans. The distinction between flows and stocks was also taken into account. The interest rates for each bank were not reported for confidentiality reasons. The behavioural aspects of banking decisions while checking the creditworthiness, such as levels of LTV or DTI, and sectoral exposures and concentration limits, have been approximated using the PFSA Recommendations S, T and C, as well the Banking Code. In the future, it will be possible to use the PFSA surveys. The data from the surveys has not yet been accessible for confidentiality reasons.

All decision rules are obtained as a result of prior econometric analyses. In addition, expert knowledge about the functioning of markets and economic agents on the Polish markets were used. Parameter values were obtained after a thorough analysis of statistical data obtained from the National Bank of Poland and the Central Statistical Office and partly correspond to the values adopted in macro-models in the literature (e.g., labour elasticity, capital elasticity, relative quality elasticity and, know-how elasticity in the production function). The most important added value of the analysis is the linking of information obtained from the Central Statistical Office database on firms and the publicly available input-output table at basic prices for domestic output. All parameters assumed in modules 6–8, selected parameters in 14 & 19–20 were obtained directly using the procedure developed by Santos & Kaszowska (in the MOSIPS FP7 project), based on input-output table data. In order to obtain the parameters in demographic, education and labour market modules, Central Statistical Office and Household Wealth and Debt Survey data were used (especially, modules 27–36, 47–50). The parameters in modules 38–40, 42–46, 50–52 were calibrated based on Central Statistical Office data on enterprises.

The group of ‘parameters’ in the model includes not only the values of estimated or calibrated parameters of a functional form of decision rules, but also parameters that can be adjusted by the user to develop scenarios and to carry out a counterfactual simulation on the state of the economy and financial sector as well as macroprudential policies. For instance, in module 3 it was assumed that the level of leverage and financial risk that is acceptable by the companies in each of the industries to produce goods and services. Similarly, the levels of screening ratios of banks (e.g., ROA, ROE, acceptable financial risk of the applicant or the industry etc.) and macroprudential ratios can be assumed. Alternatively, the experts of the National Bank of Poland can use confidential data from the surveys about the banks’ policies and stance, and/or the calibration based on the ESRB recommendations.

Value | $\mathit{t}=0$ | $\mathit{t}=3$ |
---|---|---|

Less than 0.1 | 0.1099 | 0.0081 |

0.1–0.2 | 0.0994 | 0.7886 |

0.2–0.4 | 0.3740 | 0.0946 |

0.4–0.6 | 0.2149 | 0.0469 |

0.6–0.8 | 0.0713 | 0.0174 |

More than 0.8 | 0.1305 | 0.0444 |

1 | 1 |

- Gai, P. Systemic Risk: The Dynamics of Modern Financial Systems; Oxford University Press: Oxford, UK, 2013; pp. 1–123. ISBN 9780199544493. [Google Scholar]
- Kaszowska, J.; Santos, J.L. The role of risk perception in systemic risk generation and amplification: An agent-based approach. ACRN J. Financ. Risk Perspect.
**2014**, 3, 146–170. [Google Scholar] - Barkauskaite, A.; Lakstutiene, A.; Witkowska, J. Measurement of Systemic Risk in a Common European Union Risk-Based Deposit Insurance System: Formal Necessity or Value-Adding Process? Risks
**2018**, 6, 137. [Google Scholar] [CrossRef] - Kaszowska, J.; Santos, J.L. Systemic Risk Modeling: Agent-based Modeling Foundations and Validation. In Systemic Actions in Complex Scenario; Fabó, E., Chen, J., Eds.; Cambridge Scholars Publishing: Cambridge, UK, 2017; pp. 218–243. ISBN 10:1-5275-0006-3. [Google Scholar]
- Galati, G.; Moessner, R. What do we know about the effects of macroprudential policies? Economica
**2018**, 85, 735–770. [Google Scholar] [CrossRef] - Zhang, X.; Li, F.; Li, Z.; Xu, Y. Macroprudential Policy, Credit Cycle, and Bank Risk-Taking. Sustainability
**2018**, 10, 3620. [Google Scholar] [CrossRef] - Elements of Effective Macroprudential Policies. Lessons from International Experience; Jointly publised by IMF-FSB-BIS; 2016; pp. 1–16. Available online: https://www.bis.org/publ/othp26.pdf (accessed on 5 January 2020).
- Kaszowska, J. Systemic Risk in Space and Time. Forthcoming.
- Christiano, L.; Eichenbaum, M.; Trabandt, M. On DSGE models. J. Econ. Perspect
**2018**, 32, 113–140. [Google Scholar] [CrossRef] - Hitaj, A.; Mateus, C.; Peri, I. Lambda Value at Risk and Regulatory Capital: A Dynamic Approach to Tail Risk. Risks
**2018**, 6, 17. [Google Scholar] [CrossRef] - Repullo, R. Capital Requirements, Market Power, and Risk-Taking in Banking. J. Financ. Intermed.
**2004**, 13, 156–182. [Google Scholar] [CrossRef] - Repullo, R.; Suarez, J. The Procyclical Effects of Bank Capital Regulation. Rev. Financ. Stud.
**2013**, 26, 454–490. [Google Scholar] [CrossRef] - van den Heuvel, S. The welfare cost of bank capital requirements. J. Monet. Econ.
**2008**, 55, 298–320. [Google Scholar] [CrossRef] - Drehmann, M.; Borio, C.; Tsatsaronis, K. Anchoring countercyclical capital buffers: The role of credit aggregates. BIS Work. Pap.
**2011**, 335, 1–33. [Google Scholar] - Drehmann, M.; Borio, C.; Gambacorta, L.; Jimenez, G.; Trucharte, C. Countercyclical Capital Buffers: Exploring Options. BIS Work. Pap.
**2010**, 317, 1–57. [Google Scholar] [CrossRef] - Kowalik, M. Countercyclical capital regulation: Should bank regulators use rules or discretion. Econ. Rev.
**2011**, 96, 59–80. [Google Scholar] - Repullo, R.; Saurina, S. The Countercyclical Capital Buffer of Basel III. A Critical Assessment. CEMFI Work. Pap.
**2011**, 1102, 11–29. [Google Scholar] - Kiema, I.; Jokivuolle, E. Does a leverage ratio requirement increase bank stability? J. Bank. Finance
**2014**, 39, 240–254. [Google Scholar] [CrossRef] - Bernanke, B.; Gertler, M.; Gilchrist, S. The financial accelerator in a quantitative business cycle framework. In Handbook of Macroeconomics; Taylor, J., Woodford, M., Eds.; Elsevier: North-Holland, The Netherlands, 1999; pp. 1341–1393. ISBN 978-0-444-50158-5. [Google Scholar]
- Choi, W.; Cook, D. Liability dollarization and the bank balance sheet channel. J. Int. Econ.
**2004**, 64, 247–275. [Google Scholar] [CrossRef] - Clerc, L.; Derviz, A.; Mendicino, C.; Moyen, S.; Nikolov, K.; Stracca, L.; Suarez, J.; Vardoulakis, A. Capital regulation in a macroeconomic model with three layers of default. ECB Work. Pap.
**2015**, 1827, 1–58. [Google Scholar] [CrossRef] - Gertler, M.; Karadi, P. A model of unconventional monetary policy. J. Monet. Econ.
**2011**, 58, 17–34. [Google Scholar] [CrossRef] - Gertler, M.; Kiyotaki, N. Financial Intermediation and Credit Policy in Business Cycle Analysis. In Handbook of Monetary Economics; Friedman, B., Woodford, M., Eds.; Elsevier: North-Holland, The Netherlands, 2010; Volume 3, pp. 547–599. ISBN 978-0-444-53470-5. [Google Scholar]
- Gertler, M.; Kiyotaki, N.; Queralto, A. Financial Crises, Bank Risk Exposure, and Government Financial Policy. J. Monet. Econ.
**2012**, 59, S17–S34. [Google Scholar] [CrossRef] - Iacoviello, M. House Prices, Borrowing Constraints, and Monetary Policy in the Business Cycle. Am. Econ. Rev.
**2005**, 95, 739–764. [Google Scholar] [CrossRef] - Caballero, R. Macroeconomics after the Crisis: Time to Deal with the Pretense-of-Knowledge Syndrome. J. Econ. Perspect
**2010**, 24, 85–102. [Google Scholar] [CrossRef] - Korinek, A. Thoughts on DSGE Macroeconomics: Matching the Moment, But Missing the Point? Paper for the 2015 Conference: ‘A Just Society’ Honoring J. Stiglitz’s 50 Years of Teaching. Available online: http://dx.doi.org/10.2139/ssrn.3022009 (accessed on 7 January 2020).
- Nuño, G. Constrained Social Optimum with Heterogeneous Agents in Continuous Time. ECB Work. Pap.
**2014**, 1608, 1–19. [Google Scholar] - Aoki, K.; Benigno, G.; Kiyotaki, N. Monetary and Financial Policies in Emerging Markets. Mimeo, Princeton University 2016. Available online: https://www.princeton.edu/~kiyotaki/papers/ABKBankModel10-16-2018_GB.pdf (accessed on 11 January 2020).
- Smets, F.; Wouters, R. An Estimated Stochastic Dynamic General Equilibrium Model of the Euro Area. J. Eur. Econ. Assoc.
**2003**, 1, 1123–1175. [Google Scholar] [CrossRef] - Christiano, L.; Trabandt, M.; Walentin, K. Introducing financial frictions and unemployment into a small open economy model. J. Econ. Dyn. Control
**2011**, 35, 1999–2041. [Google Scholar] [CrossRef] - Adolfson, M.; Laséen, S.; Lindé, J.; Svensson, L. Monetary policy trade-off in an estimated open-economy DSGE model. J. Econ. Dyn. Control
**2014**, 42, 33–49. [Google Scholar] [CrossRef] - Christiano, L.; Trabandt, M.; Walentin, K. DSGE Models for Monetary Policy Analysis. In Handbook of Monetary Economics; Friedman, B., Woodford, M., Eds.; Elsevier: North-Holland, The Netherlands, 2010; Volume 3A, pp. 285–367. ISBN 978-0-444-53238-1. [Google Scholar]
- Greenwald, B.; Stiglitz, J. Financial Market Imperfections and Business Cycles. Q. J. Econ.
**1993**, 108, 77–114. [Google Scholar] [CrossRef] - Kiyotaki, N.; Moore, J. Credit cycles. J. Polit. Econ.
**1997**, 105, 211–248. [Google Scholar] [CrossRef] - Meh, C.; Moran, K. The role of bank capital in the propagation of shocks. J. Econ. Dyn. Control
**2010**, 34, 555–576. [Google Scholar] [CrossRef] - Galati, G.; Moessner, R. Macroprudential policy—A literature review. J. Econ. Surv.
**2013**, 27, 846–878. [Google Scholar] [CrossRef] - Hanson, S.; Kashyap, A.; Stein, J. A Macroprudential Approach to Financial Regulation. J. Econ. Perspect
**2011**, 25, 3–28. [Google Scholar] [CrossRef] - Osiński, J.; Seal, K.; Hoogduin, L. Macroprudential and Microprudential Policies: Toward Cohabitation; IMF Staff Discussion Note; International Monetary Fund: Washington, DC, USA, 2013; pp. 4–28. [Google Scholar]
- Assenza, T.; Delli Gatti, D.; Gallegati, M. Financial Instability and Agents’ Heterogeneity: A Post Minskyan Research Agenda. In The Elgar Companion to Hyman Minsky; Papadimitriou, D., Wray, L., Eds.; Edward Elgar: Cheltenham, UK, 2010; pp. 182–205. ISBN 978-1-84720-849-1. [Google Scholar]
- Delli Gatti, D. Financial Instability After Minsky: Heterogeneity, Agent-based Models, and Credit Networks. INET Paper 2012. Available online: https://www.ineteconomics.org/research/research-papers/financial-instability-after-minskyheterogeneity-agent-based-models-and-credit-networks (accessed on 8 January 2020).
- Kaszowska, J.; Santos, J.L. Rola percepcji ryzyka i niepewności w ocenie ryzyka systemowego. Podejście symulacyjne ABM (The role of risk and uncertainty perception in systemic risk assessment. An Agent-based Simulation). Ekonomista
**2017**, 4, 369–399. Available online: http://www.ekonomista.info.pl/?rok=2017&nr=4&lang=0&menu=0&t=1 (accessed on 5 January 2020). - Knight, F. Risk. In Uncertainty and Profit; Houghton Miffin: Boston, MA, USA; New York, NY, USA, 1921; pp. 1–253. [Google Scholar]
- Minsky, H. Stabilizing an Unstable Economy; Yale University Press: New Haven, CT, USA, 1986; pp. 1–385. [Google Scholar]
- Minsky, H. The financial instability hypothesis. Levy Econ. Inst. Bard Coll. Work. Pap.
**1992**, 74, 1–10. [Google Scholar] [CrossRef] - Brunnermeier, M.; Eisenbach, T.; Sannikov, Y. Macroeconomics with Financial Frictions: A Survey. In Advances in Economics and Econometrics: Tenth World Congress. Econometric Society Monographs; Acemoglu, D., Arellano, M., Dekel, E., Eds.; Cambridge University Press: Cambridge, UK, 2013; pp. 3–94. ISBN 9781139060028. [Google Scholar]
- Brunnermeier, M.; Sannikov, Y. A Macroeconomic Model with a Financial Sector. Am. Econ. Rev
**2014**, 104, 379–421. [Google Scholar] [CrossRef] - Brzoza-Brzezina, M.; Kolasa, M.; Makarski, K. The anatomy of standard DSGE models with financial frictions. J. Econ. Dyn. Control
**2013**, 37, 32–51. [Google Scholar] [CrossRef] - Bianchi, J. Credit Externalities: Macroeconomic Effects and Policy Implications. Am. Econ. Rev
**2010**, 100, 398–402. [Google Scholar] [CrossRef] - Bianchi, J. Overborrowing and Systemic Externalities in the Business Cycle. Am. Econ. Rev
**2011**, 101, 3400–3426. [Google Scholar] [CrossRef] - Bianchi, J.; Mendoza, E. Overborrowing, Financial Crises and Macroprudential Taxes. NBER Work. Pap.
**2010**, 16091, 1–60. [Google Scholar] - Farhi, E.; Werning, I. A Theory of Macroprudential Policies in the Presence of Nominal Rigidities. Econometrica
**2016**, 84, 1645–1704. [Google Scholar] [CrossRef] - An, G.; Fitrzpatrick, B.; Christley, S.; Federico, P.; Kanarek, A.; Miller Neilan, R.; Oremland, M.; Salinas, R.; Laubenbacher, R.; Lenhart, S. Optimization and Control of Agent-Based Models in Biology: A Perspective. Bull. Math. Biol.
**2017**, 79, 63–87. [Google Scholar] [CrossRef] - Gilli, M.; Winker, P. A global optimization heuristics for estimating agent-based models. Comput. Stat. Data Anal.
**2003**, 42, 299–312. [Google Scholar] [CrossRef] - Oremland, M. Optimization and Optimal Control of Agent-Based Models. Master’s Thesis, Virginia Polytechnic Institute and State University, Blacksburg, VI, USA, 3 May 2011. [Google Scholar]
- Oremland, M.; Laubenbacher, R. Optimization of Agent-Based Models: Scaling Methods and Heuristic Algorithms. J. Artif. Soc. Soc. Simul.
**2014**, 17, 1–16. [Google Scholar] [CrossRef] - Costa, C.; Werning, I. On the optimality of the Friedman Rule with Heterogeneous Agents and Nonlinear Income Tax. J. Polit. Econ.
**2008**, 116, 82–112. [Google Scholar] [CrossRef] - Koloch, G. Optymalny Poziom Inflacji W Gospodarce Heterogenicznej (The Optimal Level of Inflation in A Heterogeneous-Agent Economy). Ph.D. Thesis, Warsaw School of Economics, Warsaw, Poland, 2013. [Google Scholar]
- Brzoza-Brzezina, M.; Kolasa, M.; Makarski, K. Monetary policy in a non-representative agent economy: A Survey. J. Econ. Surv.
**2013**, 27, 641–669. [Google Scholar] [CrossRef] - Fabretti, A. A Markov Chain approach to ABM calibration. In Proceedings of the Social Simulation Conference 2014, Barcelona, Spain, 1–5 September 2014; pp. 404–408. [Google Scholar]
- Grazzini, J.; Richiardi, M. Estimation of Ergodic Agent-Based Models by Simulated Minimum Distance. J. Econ. Dyn. Control
**2015**, 51, 148–165. [Google Scholar] [CrossRef] - Grazzini, J.; Richiardi, M.; Tsionas, M. Bayesian Estimation of Agent-based Models. J. Econ. Dyn. Control
**2017**, 77, 26–47. [Google Scholar] [CrossRef] - Chen, S.-H. Varieties of agents in agent-based computational economics: A historical and an interdisciplinary perspective. J. Econ. Dyn. Control
**2012**, 36, 1–25. [Google Scholar] [CrossRef] - Landini, S.; Gallegati, M.; Stiglitz, J. Economies with heterogeneous interacting learning agents. J. Econ. Interact. Coord.
**2015**, 10, 91–118. [Google Scholar] [CrossRef] - Hommes, C. Heterogeneous Agent Models in Economics and Finance. In Handbook of Computational Economics; Tesfatsion, L., Judd, K., Eds.; Elsevier: North-Holland, The Netherlands, 2006; pp. 1109–1186. ISBN 978-0-444-64131-1. [Google Scholar]
- Hommes, C. The heterogeneous expectations hypothesis: Some evidence from the lab. J. Econ. Dyn. Control
**2011**, 35, 1–24. [Google Scholar] [CrossRef] - Hommes, C. Behavioral Rationality and Heterogeneous Expectations in Complex Economic Systems; Cambridge University Press: Cambridge, UK, 2013; pp. 1–251. ISBN 9781139094276. [Google Scholar]
- Deissenberg, C.; van Der Hoog, S.; Dawid, H. EURACE: A Massively Parallel Agent-Based Model of the European Economy. Appl. Math. Comput.
**2008**, 204, 541–552. [Google Scholar] [CrossRef] - Gencer, M.; Ozel, B. EURACE Project Description. Available online: https://ecomod.net/sites/default/files/document-conference/ecomod2010/1316.pdf (accessed on 8 January 2020).
- Pablo Martí, F.; Santos, J.L.; Kaszowska, J. An Agent-Based Model of Population Dynamics for the European Regions. Emerg. Complex. Organ.
**2015**, 17, 1–19. [Google Scholar] [CrossRef] - Caiani, A.; Godin, A.; Caverzasi, E.; Gallegati, M.; Kinsella, S.; Stiglitz, J. Agent Based-Stock Flow Consistent Macroeconomics: Towards a Benchmark Model. J. Econ. Dyn. Control
**2016**, 69, 375–408. [Google Scholar] [CrossRef] - van der Hoog, S. The Limits to Credit Growth: Mitigation Policies and Macroprudential Regulations to Foster Macrofinancial Stability and Sustainable Debt. Bielef. Work. Pap. Econ. Manag.
**2015**, 8, 1–32. [Google Scholar] [CrossRef] - Baptista, R.; Farmer, J.D.; Hinterschweiger, M.; Low, K.; Tang, D.; Uluc, A. Macroprudential policy in an agent-based model of the UK housing market. Bank Engl. Staff Work. Pap.
**2016**, 619, 3–50. [Google Scholar] [CrossRef] - Cincotti, S.; Raberto, M.; Teglio, A. Macroprudential Policies in an Agent-Based Artificial Economy. Revue de l’OFCE
**2012**, 124, 205–234. [Google Scholar] [CrossRef] - Fagiolo, G.; Roventini, A. Macroeconomic Policy in DSGE and Agent-Based Models Redux: New Developments and Challenges Ahead. J. Artif. Soc. Soc. Simul.
**2017**, 20, 1–37. [Google Scholar] [CrossRef] - Popoyan, L.; Napoletano, M.; Roventini, A. Taming macroeconomic instability: Monetary and macroprudential policy interactions in an agent-based model. J. Econ. Behav. Organ.
**2017**, 134, 117–140. [Google Scholar] [CrossRef] - Choi, Y. Masked Instability: Within-Sector Financial Risk in the Presence of Wealth Inequality. Risks
**2018**, 6, 65. [Google Scholar] [CrossRef] - Ashraf, Q.; Gershman, B.; Howitt, P. Banks, market organization, and macroeconomic performance: An agent-based computational analysis. J. Econ. Behav. Organ
**2017**, 135, 143–180. [Google Scholar] [CrossRef] - Aymanns, C.; Farmer, J.D. The dynamics of the leverage cycle. J. Econ. Dyn. Control
**2015**, 50, 155–179. [Google Scholar] [CrossRef] - Battiston, S.; Delli Gatti, D.; Gallegati, B.; Greenwald, B.; Stiglitz, J. Liaisons dangereuses: Increasing connectivity, risk sharing, and systemic risk. J. Econ. Dyn. Control
**2012**, 36, 8, 1121–1141. [Google Scholar] [CrossRef] - Da Silva, M.; Lima, G. Combining monetary policy and prudential regulation: An agent-based modeling approach. J. Econ. Interact. Coord.
**2017**. [Google Scholar] [CrossRef] - Delli Gatti, D.; Di Guilmi, C.; Gaffao, G.; Giulioni, G.; Gallegati, M.; Palestrini, A. A new approach to business fluctuations: Heterogeneous interacting agents scaling laws and financial fragility. J. Econ. Behav. Organ.
**2005**, 54, 489–512. [Google Scholar] [CrossRef] - Delli Gatti, D.; Gallegati, M.; Greenwald, B.; Russo, A.; Stiglitz, J. The financial accelerator in an evolving credit network. J. Econ. Dyn. Control
**2010**, 34, 1627–1650. [Google Scholar] [CrossRef] - Dosi, G.; Fagiolo, G.; Roventini, A. Schumpeter meeting Keynes: A policy-friendly model of endogenous growth and business cycles. J. Econ. Dyn. Control
**2010**, 34, 1748–1767. [Google Scholar] [CrossRef] - Dosi, G.; Fagiolo, G.; Napoletano, M.; Roventini, A. Income distribution, credit and fiscal policies in an agent-based keynesian model. J. Econ. Dyn. Control
**2013**, 37, 1598–1625. [Google Scholar] [CrossRef] - Dosi, G.; Fagiolo, G.; Napoletano, M.; Roventini, A.; Treibich, T. Fiscal and monetary policies in complex envolving economies. J. Econ. Dyn. Control
**2015**, 52, 166–189. [Google Scholar] [CrossRef] - Gai, P.; Haldane, A.; Kapadia, S. Complexity, concentration and contagion. J. Monet. Econ.
**2011**, 58, 453–470. [Google Scholar] [CrossRef] - Geanakoplos, J.; Axtell, R.; Farmer, J.D.; Howitt, P.; Conlee, B.; Goldstein, J.; Hendrey, M.; Palmer, N.; Yang, C. Getting at Systemic Risk via an Agent-Based Model of the Housing Market. Am. Econ. Rev
**2012**, 102, 53–58. [Google Scholar] [CrossRef] - Klimek, P.; Poledna, S.; Farmer, J.D.; Thurner, S. To bail-out or to bail-in? Answers from an agent-based model. J. Econ. Dyn. Control
**2015**, 50, 144–154. [Google Scholar] [CrossRef] - Krug, S. The interaction between monetary and macroprudential policy: Should central banks >> lean against the wind<< to foster macroprudential stability? Econ. Open-Access Open-Assess. E-J.
**2018**, 12, 1–69. Available online: http://dx.doi.org/10.5018/economics-ejournal.ja.2018-7 (accessed on 7 January 2020). - Lengnick, M.; Krug, S.; Wohltmann, H. Money creation and financial instability: An agent-based credit network approach. Economics
**2013**, 7, 1–44. Available online: http://dx.doi.org/10.5018/economics-ejournal.ja.2013-32 (accessed on 3 January 2020). [CrossRef] - Napoletano, M.; Roventini, A.; Gaffard, J.L. Time-varying fiscal multipliers in an agent-based model with credit rationing. Economics
**2017**, 19, 1–21. [Google Scholar] - Poledna, S.; Thurner, S.; Farmer, J.D.; Geanakoplos, J. Leverage-induced systemic risk under Basel II and other credit risk policies. J. Bank. Finance
**2014**, 42, 199–212. [Google Scholar] [CrossRef] - Raberto, M.; Teglio, A.; Cincotti, S. Debt, deleveraging and business cycles. Economics
**2012**, 6, 1–49. Available online: http://dx.doi.org/10.5018/economics-ejournal.ja.2012-27 (accessed on 8 January 2020). - Riccetti, L.; Russo, A.; Gallegati, M. Leveraged network-based financial accelerator. J. Econ. Dyn. Control
**2013**, 37, 1626–1640. [Google Scholar] [CrossRef] - Seppecher, P.; Salle, I. Deleveraging crises and deep recessions: A behavioral approach. Appl. Econ.
**2015**, 47, 3771–3790. [Google Scholar] [CrossRef] - Mazzocchetti, A.; Raberto, M.; Teglio, A.; Cincotti, S. Securitisation and Business Cycle: An Agent-Based Perspective. Ind. Corp. Chang.
**2018**, 27, 1091–1121. [Google Scholar] [CrossRef] - Petroni, F.; Ausloos, M.; Rotundo, G. Generating synthetic time series from Bak-Sneppen coevolution models mixtures. Physica A
**2007**, 384, 359–367. [Google Scholar] [CrossRef] - Rotundo, G.; Ausloos, M. Microeconomic co-evolution model for financial technical analysis signals. Physica A
**2007**, 373, 569–585. [Google Scholar] [CrossRef] - Varela, L.M.; Rotundo, G.; Ausloos, M.; Carrete, J. Complex network analysis in socioeconomic models. In Complexity and Geographical Economics; Commendatore, P., Kayam, S., Kubin, I., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; pp. 209–245. [Google Scholar] [CrossRef]
- Varela, L.M.; Rotundo, G. Complex network analysis and nonlinear dynamics. In Complex Networks and Dynamics; Commendatore, P., Matilla-García, M., Varela, L., Cánovas, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2016; pp. 3–25. [Google Scholar] [CrossRef]
- Ausloos, M.; Herbert, D.; Merlone, U. Spatial interactions in agent-based modeling. In Complexity and Geographical Economics; Commendatore, P., Kayam, S., Kubin, I., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; pp. 353–377. ISBN 978-3-319-12804-7. [Google Scholar]
- Boeing, G. The Effects of Inequality, Density, and Heterogeneous Residential Preferences on Urban Displacement and Metropolitan Structure: An Agent-Based Model. Urban Sci.
**2018**, 2, 76. [Google Scholar] [CrossRef] - Richiardi, M.; Leombruni, R.; Saam, N.; Sonnessa, M. A Common Protocol for Agent-Based Social Simulation. J. Artif. Soc. Soc. Simul.
**2006**, 9, 1–22. [Google Scholar] - Chen, J.M. Gini’s Crossbow. Presented at the 81st International Atlantic Economic Society Conference, Lisbon, Portugal, 16–19 March 2016; Available online: http://dx.doi.org/10.2139/ssrn.2608850 (accessed on 8 January 2020).
- Gini, C. Concentration and dependency ratios. Rivista di Politica Economica
**1909**, 87, 769–789. [Google Scholar] - Lorenz, M. Methods of measuring the concentration of wealth. Am. Stat. Assoc. Publ.
**1905**, 9, 209–219. [Google Scholar] [CrossRef] - Grejcz, K.; Żółkiewski, Z. Household wealth in Poland: The results of a new survey of household finance. Bank i Kredyt
**2017**, 48, 295–326. [Google Scholar] - Household Budget Survey in 2014. Available online: https://stat.gov.pl/en/topics/living-conditions/living-conditions/household-budget-survey-in-2014,2,9.html (accessed on 8 January 2020).
- European Union Statistics on Income and Living Conditions (2013). Available online: https://stat.gov.pl/obszary-tematyczne/warunki-zycia/dochody-wydatki-i-warunki-zycia-ludnosci/europejskie-badanie-dochodow-i-warunkow-zycia-eu-silc-w-2013-r-,7,5.html (accessed on 8 January 2020).
- Czapiński, J.; Panek, T. Social diagnosis 2015. Objective and Subjective Quality of Life in Poland. Contemp. Econ.
**2015**, 9, 13–526. Available online: http://www.diagnoza.com/pliki/raporty/Diagnoza_raport_2015.pdf (accessed on 8 January 2020). - Household Wealth and Debt in Poland. Pilot Survey Report 2014. National Bank of Poland Report. Available online: https://www.nbp.pl/en/publikacje/inne/bzgd/bzgd_2014_en.pdf (accessed on 8 January 2020).
- Eurostat, Gini Coefficient of Equivalised Disposable Income—EU-SILC Survey 2013. Available online: https://data.europa.eu/euodp/en/data/dataset/rkeZ1htI2J2YycyRb2rBXg (accessed on 8 January 2020).
- Sierminska, E.; Medgyesi, M. The Distribution of Wealth Between Households; European Commission Report; 2013; pp. 1–30. Available online: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=2ahUKEwjSy9rWiZDnAhWC-yoKHShKDvAQFjACegQIAhAB&url=https%3A%2F%2Fec.europa.eu%2Fsocial%2FBlobServlet%3FdocId%3D11782%26langId%3Den&usg=AOvVaw2GdUJRp0z8WdwunE-joZVp (accessed on 8 January 2020).
- Damgaard, C.; Weiner, J. Describing inequality in plant size or fecundity. Ecology
**2000**, 81, 1139–1142. [Google Scholar] [CrossRef] - Kotz, S.; Johnson, N.L.; Read, C.B. Encyclopedia of Statistical Sciences; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 1983. [Google Scholar]
- Shumway, D.; Koide, R. Size and Reproductive Inequality in Mycorrhizal and Nonmycorrhizal Populations in Abutilon Theophrasti. J. Ecol.
**1995**, 83, 613–620. [Google Scholar] [CrossRef] - Schorrocks, A.F. The Class of Additively Decomposable Inequality Measures. Econometrica
**1980**, 48, 613–625. [Google Scholar] [CrossRef] - Novotný, J. On the measurement of regional inequality: Does spatial dimension of income inequality matter? Ann. Reg. Sci.
**2007**, 41, 563–580. [Google Scholar] [CrossRef] - Hartmann, P. Interactions Between Macroprudential and Other Policies. Presented at the SUERF/National Bank of Poland Conference: Challenges of Interactions between Macroprudential and other Policies, Warsaw, Poland, 15 February 2019. [Google Scholar]
- Claessens, S. Moving forward with macroprudential framework. Presented at the SUERF/National Bank of Poland Conference: Challenges of Interactions between Macroprudential and other Policies, Warsaw, Poland, 15 February 2019. [Google Scholar]
- Household Wealth and Debt in Poland. Methodological Annex to the Pilot Survey 2014, National Bank of Poland Report. Available online: https://www.nbp.pl/en/publikacje/inne/bzgd/bzgd_2014_metodology_en.pdf (accessed on 8 January 2020).
- Population. Size and Structure of Population and Vital Statistics in Poland by Territorial Division. As of December 31, 2014. Available online: https://stat.gov.pl/en/topics/population/population/population-size-and-structure-of-population-and-vital-statistics-in-poland-by-territorial-divison-as-of-december-31-2014,3,13.html (accessed on 8 January 2020).
- Structure of the Population by 2016: Size and Structure of Population by Age Groups in 1989–2016. Available online: https://stat.gov.pl/en/topics/population/population/structure-of-the-population-by-2016,7,1.html (accessed on 8 January 2020).
- Demographic Yearbook of Poland: Marriages Contracted and Dissolved, Central Statistical Office Report; pp. 189–256. Available online: https://stat.gov.pl/files/gfx/portalinformacyjny/pl/defaultaktualnosci/5515/3/11/1/rocznik_demograficzny_2017.pdf (accessed on 8 January 2020).
- Structure of the Population by 2016: Births in 1970–2016. Available online: https://stat.gov.pl/en/topics/population/population/structure-of-the-population-by-2016,7,1.html (accessed on 8 January 2020).
- Demographic Yearbook of Poland 2015. Available online: https://stat.gov.pl/en/topics/statistical-yearbooks/statistical-yearbooks/demographic-yearbook-of-poland-2015,3,9.html (accessed on 8 January 2020).
- Life Expectancy by Age in Poland 1950–2018. Available online: https://stat.gov.pl/en/topics/population/life-expectancy/life-expectancy-in-poland,1,3.html (accessed on 3 January 2020).
- Education in the School Year 2014/2015. Available online: https://stat.gov.pl/en/topics/education/education/education-in-the-school-year-20142015,1,7.html (accessed on 8 January 2020).
- Yearbook of Labour Statistics 2015. Available online: https://stat.gov.pl/en/topics/statistical-yearbooks/statistical-yearbooks/yearbook-of-labour-statistics-2017,10,6.html (accessed on 8 January 2020).
- Social Assistance, Child and Family Services in 2014. Available online: https://stat.gov.pl/en/topics/living-conditions/social-assistance/social-assistance-child-and-family-services-in-2016,1,8.html (accessed on 8 January 2020).
- Activity of Non-Financial Enterprises in 2014. Available online: https://stat.gov.pl/en/topics/economic-activities-finances/activity-of-enterprises-activity-of-companies/activity-of-non-financial-enterprises-in-2014,1,11.html (accessed on 8 January 2020).
- Input—Output Table at Basic Prices in 2010. Available online: https://stat.gov.pl/en/topics/national-accounts/annual-national-accounts/input-output-table-at-basic-prices-in-2010,5,2.html (accessed on 8 January 2020).
- MIR Interest Rate Statistics. National Bank of Poland Page. Available online: https://www.nbp.pl/en/statystyka/oproc/mir_new/manual_mir.pdf or https://www.nbp.pl/homen.aspx?f=/en/statystyka/oproc/oproc.html (accessed on 5 January 2020).

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).