A Heterogeneous Agent Macroeconomic Model for Policy Evaluation: Improving Transparency and Reproducibility

This paper provides a detailed description of the Eurace@Unibi model, which has been developed as a versatile tool for economic policy analysis. The model explicitly incorporates the decentralized interaction of heterogeneous agents across different sectors and regions. The modeling of individual behavior is based on heuristics with empirical microfoundations. Although Eurace@Unibi has been applied successfully to different policy domains, the complexity of the structure of the model, which is similar to other agent-based macroeconomic models, has given rise to concerns about the reproducibility and robustness of the obtained insights. This paper addresses these concerns by describing the exact details of all decision rules, interaction protocols and balance sheets used in the model. Furthermore, we discuss the use of a virtual appliance as a tool allowing third parties to reproduce and verify the simulation results. The paper provides a systematic and extensive sensitivity analysis of the simulation output with respect to a set of key parameters. Particular emphasis is put on the question which parameter constellations give rise to strong economic fluctuations and high frequencies of sudden downturns in economic activity.


Introduction
What is the most fruitful approach for the analysis of macroeconomic research questions? The majority consensus among economists with respect to this challenging question has strongly varied over time and there has always been substantial heterogeneity amongst the profession. During the last decade an increasing number of contributions 1 has employed an agent-based modeling approach to macroeconomic analysis, thereby extending the modeling toolkit in this domain, which is currently dominated by Dynamic Stochastic General Equilibrium (DSGE) models. The potential for an agent-based framework for macroeconomic modeling has been discussed extensively by numerous authors highlighting that models of this type are not only well-suited to capture the aggregate effects of (local) interactions between heterogeneous agents (e.g. Kirman, 2012), of bounded rational behavior, learning and adaptive expectation formation (e.g. Dawid, 2015, Hommes, 2013. It also have proven to be very successful with respect to reproducing empirical stylized facts (see Fagiolo and Roventini, 2012). These properties make agent-based models also potentially appealing for economic policy analysis in different domains (see Howitt, 2012, Dawid and. By their very nature agent-based macroeconomic models are typically larger and more complex than general equilibrium models that rely on representative agents and the assumptions of rational expectations and intertemporally optimal behavior of decision makers. However, also within the domain of agent-based macroeconomic models there is some heterogeneity with respect to the modeling philosophy, the level of abstraction and the resulting complexity of the models. Some authors, such as Richiardi (2016) or Caiani et al. (2015), see an emerging distinction between relatively simple agent-based models which in many respects stay close to (analytically tractable) mainstream equilibrium models 2 and closed-economy bottom-up models in which all the considered sectors of the economy are represented by (locally) interacting individual agents. 3 Whereas this second type of approach might have the advantage that it is based on a consistent modeling approach at the micro level, and can be strongly grounded in empirical observations, it is prone to lead to rather complex and large models. In order to fruitfully employ such large models for the analysis of economic phenomena and policy issues a number of challenges have to be met. In particular, pinning down empirically meaningful parameter constellations as well as systematically testing the robustness of simulation results with respect to parameter variations becomes difficult due to the large dimension of the parameter space and the computational burden associated with running very large numbers of simulation runs. 4 Furthermore, appropriate statistical methods are needed to rigorously establish the effects of parameter-and policy changes. Perhaps more importantly, the mechanisms driving the obtained results should be clearly identified, which is not a trivial task in modeling frameworks characterized by the interplay between different interaction structures and (non-linear) decision rules.
Finally, the burden on readers (and reviewers) to check whether the presented results are indeed correct and can in principle be replicated, tends to be high. Research articles based on large agent-based models typically present the main intuitions, and the logic and assumptions of the model, without truly providing all the details that would be necessary to fully understand all aspects of the emerging dynamics, or to actually allow a full re-implementation of the model from scratch. 5 Even if the source code of the model is available, it remains costly to run the simulation model properly and to reproduce the exact same setup as the analyses presented in the paper. Whereas similar issues certainly apply also to several other very active areas of economic research, e.g. experimental economics 6 or empirical work based on proprietary data, a perceived lack of transparency and reproducibility is a relevant issue and might contribute to viewing agent-based models as 'black-boxes'.
The aim of this paper is to contribute to more transparency and enhancing the reproducibility in this domain of research using the Eurace@Unibi model as an example of a large macroeconomic agent-based model using a bottom-up approach. In the first part of the paper a detailed description of the modeling assumptions, decision rules and interaction structures, as well as the economic rationale behind these modeling choices, is provided, thereby allowing the reader to fully grasp the different forces captured in the model. Such a detailed model description should not only foster a deeper understanding of the observed results but also allow for a clearer comparison with alternative agent-based macroeconomic models and potentially also re-implementations of (parts of) the model. 7 The second part of the paper focuses on the issue of reproducibility of published results and the ability of third parties to work with the model. In particular, we describe how a publicly available ETACE Virtual Appliance (Böhl et al., 2014) allows to run the Eurace@Unibi model with minimal setup costs and to reproduce in a structured way simulation experiments underlying published research papers that have used the Eurace@Unibi model. Furthermore, the potential use of the Virtual Appliance is demonstrated by exploring the effects of variations of key model parameters on dynamic properties of the model using the Virtual Appliance environment. The ETACE Virtual Appliance thus functions as a kind of vehicle to communicate the various implementations of our model, and it also allows others to reproduce and gain confidence in the results obtained. The overall aim of providing such an extensive software environment to the research community is that this heightens the model's transparency, its credibility, and finally also the model's acceptance as a tool for policy analysis.
The Eurace@Unibi model has been designed as a framework for (spatial) economic analysis within various domains of economics and a number of economic policy issues have been examined using (prior versions of) the model. A survey of this work is given in Dawid et al. (2016) and this paper does not report on economic insights obtained in these studies or on any new simulation experiments. Hence, this paper should be seen mainly as a methodological contribution to the growing area of Agent-based Computational Economics (ACE), providing detailed insights into a workhorse model and practical suggestions on how to improve the transparency and reproducibility of ACE research.
The paper is organized as follows. In Section 2 we give an overview of the model 8 before we describe in detail the decision rules for the various agents in Section 3. Section 4 is devoted to a description of the market interaction protocols. In Section 5 we adopt the ETACE Virtual Appliance as a tool for reproducing the simulation output of the Eurace@Unibi model and il-lustrate its application by running experiments on a number of selected parameter variations. Section 6 concludes. We delegated to an Online Appendix all further valuable pieces of information regarding the initialization and parametrization of the model, a lists of all parameters and variables, and the documentation of the C-code functions.
2 Main features and overall structure 2.1 Overall structure The Eurace@Unibi model describes an economy with an investment and a consumption goods sector, and a labor, a financial and a credit market in a regional context. Capital good firms provide investment goods of different vintages and productivities. Consumption good firms combine this capital and labor of varying degrees of general and specific skills to produce horizontally differentiated versions of a consumption good that households purchase. Households' saved income goes into the credit and financial markets through which it is channeled to firms financing the production of goods.
Capital goods of different quality are provided by a capital goods producer with infinite supply. The technological frontier (i.e. the quality of the best currently available capital good) improves over time, where technological change is driven by a stochastic (innovation) process. Firms in the consumption goods sector use different vintages of capital goods combined with labor as inputs. The labor market is populated with workers that have a finite number of general skill levels and acquire specific skills on the job, which they need to fully exploit the technological advantages of the capital employed in the production process. Every time when consumption goods producers invest in new capital goods they decide which quality of capital goods to select, thereby determining the speed by which new technologies spread in the economy. This choice is driven by the comparison between the prices of the available vintages and their expected returns for the firm which depend on the skills of the firm's workforce. The capital good producer charges different prices for the different vintages based on the estimated value of the vintages for the consumption good firms. Consumption goods offered by the different firms are horizontally differentiated. They are sold at local market platforms (called malls), where firms store and offer their products and consumers come to buy goods at posted prices.
Labor market interaction is described by a simple multi-round search-and-matching procedure where firms post vacancies, searching workers apply, firms make offers and workers accept/reject. Wages of workers are determined, on the one hand, by the expectation at the time of hiring the employer has about the level of specific skills of the worker, and, on the other hand, by a base wage variable, which is influenced by the (past) tightness of the labor market and determines the overall level of wages paid by a particular employer.
Banks collect deposits from households and firms and give credits to firms. The interest that firms have to pay depends on the financial situation of the firm, their credit worthiness. The size of the loan might be restricted by the bank's liquidity and risk exposure. There is a financial market where shares of single asset are traded, namely an index bond containing all firms in the economy. The allocation of dividends to households is, therefore, determined by the wealth of households in terms of their stock of index bonds. The dividend per share is simply given by the sum of all dividend payouts by all firms, divided by the number of shares of the index bond. The central bank provides standing facilities for the banks at a given base rate, pays interest on banks' overnight deposits and might provide fiat money to the government.
Firms that are not able to pay the financial commitments declare illiquidity. Furthermore, if at the end of the production cycle the firm has negative net worth insolvency bankruptcy is declared. In both cases it goes out of business, stops all productive activities and all employees loose their jobs. The firm writes off a fraction of its debt with all banks with which it has a loan and stays idle for a certain period before it becomes active again.
The spatial extensions of the markets differ. The capital goods market is global and, therefore, consumption good firms have access to the same technologies. On the consumption goods market demand is determined locally in the sense that all consumers buy at the local mall located in their region. Supply on this market is global because every firm might sell its products in all regional markets of the economy. Labor markets are characterized by spatial frictions, because it is assumed that workers accept jobs only inside their own region. Finally, it is assumed that firms have access to all banks in the economy, i.e. credit markets operate globally.
The choice of the decision rules in the Eurace@Unibi model is based on a systematic attempt to incorporate rules that resemble empirically observable behavior documented in the relevant literature. Concerning households, this means that, for example, empirically identified saving rules are used and purchasing choices are described using models from the Marketing literature with strong empirical support. With respect to firm behavior we follow the 'Management Science Approach', which aims at implementing relatively simple decision rules that match standard procedures of real world firms as described in the corresponding management literature.
In several parts of the Eurace@Unibi model choices of decision makers are described by logit models. These models are well suited to capture decisions where individuals try to maximize some objective function which depends on some variables common to all decision makers and are explicitly represented in the model, as well as on aspects that are idiosyncratic to each decision maker and captured in the model by a stochastic term.
Agent actions can be time-driven or event-based, where the former can follow either subjective or objective time schedules. Furthermore, the economic activities take place on a hierarchy of time-scales: yearly, monthly, weekly and daily activities all take place following calendar-time or subjective agent-time. Agents are activated asynchronously according to their subjective time schedules that is anchored on an individual activation day. These activation days are uniformly randomly distributed among the agents at the start of the simulation, but may change endogenously (e.g., when a household gets re-employed, its subjective month gets synchronized with the activation day of its employer due to wage payments). This modeling approach is supposed to capture the decentralized and typically asynchronous nature of decision making processes and activities of economic agents.

Timing
The basic time unit in the model is one business day. Overall there are calendar driven and eventbased activities. Many decisions, like production choice or hiring of firms, are taken monthly (each month has 20 (working) days) and others, like consumption decisions of households are taken weekly (each week has 5 (working) days). Each agent has a particular day to act once a year/month/week for each decision, where these days to act might differ between agents of the same type. It implies that there is, in general, no synchronization between different actors, although for each type of decision or action the time spans between subsequent days to act are identical for all firms and households, respectively. Synchronization is avoided as it is well known that artificial overshooting effects might arise if decisions, like output determination or pricing, are always taken simultaneously by all individuals. It should, however, be noted that certain activities, like tax collection, are synchronized for institutional reasons. Only few activities in the model are event-based. An example is the application for unemployment benefits when an employee becomes unemployed.

Decision making
In contrast to dynamic stochastic general equilibrium models, where it is assumed that the behavior of all actors is determined by maximization of the own (inter-temporal) objective function using correct expectations about the behavior of the other actors, agent-based simulation models provide explicit constructive rules that describe how different agents take different decisions. Actually, the need to provide such rules is not only based on the basic conviction underlying these models, that in most economic settings actual behavior of decision makers is far apart from inter-temporally optimal behavior under rational expectations. In fact, in most models that incorporate heterogeneity among agents and explicit interaction protocols (e.g. market rules) the characterization of dynamic equilibria is outside the scope of analytical and numerical analysis. Given that need to specify explicit rules for all decisions taken by all actors in an agent-based model the determination and motivation of the implemented rules becomes a major modeling issue. The 'Wilderness of bounded rationality' (Sims, 1980) is a serious concern since a large number of different approaches to model boundedly rational behavior and its adaptation have been put forward in the literature and at this point there is little indication for the emergence of a widely accepted consensus that provides empirically or theoretically well founded concepts for tackling this issue.
The choice of the decision rules in the Eurace@Unibi model is based on a systematic attempt to incorporate rules that resemble empirically observable behavior documented in the relevant literature. Concerning households, this means that, for example, empirically identified saving rules are used and purchasing choices are described using models from the Marketing literature with strong empirical support. With respect to firm behavior we follow the 'Management Science Approach', which aims at implementing relatively simple decision rules that match standard procedures of real world firms as described in the corresponding management literature. Particularly, there is a rich literature on (heuristic) managerial decision rules in many areas of management science. This includes pricing (see e.g. Nagle et al., 2011), production planning (see e.g. Silver et al., 1998) or market selection (see e.g. Wind andMahajan, 1981, Kotler andKeller, 2009). Although, it certainly cannot be assumed that all firms in an economy rely on such standard managerial heuristics, capturing the main features of these heuristics when modeling the firm adds a strong empirical micro foundation to the agent-based model. Generally speaking, this approach implies that a parametrized decision rule is developed for each decision each agent-type has to take. Whereas the parameter values determining the exact form of the rule might differ between individuals and might change over time, it is assumed that all individuals share the same (empirically motivated) structure for each type of rule and that this structure also does not change over time. The concrete implications of the Management Science approach will be illustrated in the following sections, where the different parts of the model are desribed in more detail. A more extensive discussion of the Management Science approach can be found in .

Heterogeneity and aggregation
A main feature of agent-based models is their ability to explicitly account for different types of heterogeneities between individuals and firms, and to study the effects of such heterogeneities on economic dynamics and the effects of economic policies. Along these lines, the Eurace@Unibi framework allows for the consideration of different types of heterogeneity: • Persistent Heterogeneity within Regions: Attributes that describe certain characteristics of agents, that do not change over time, might vary between individuals. In such cases parameters of individuals are determined stochastically according to distributions provided by the model user. Examples of such parameters are general skills of individual workers.
• Persistent Heterogeneity between Regions: The distributions according to which agentparameters are determined might differ between regions in order to describe structural differences between regions. Furthermore, policy measures might differ between regions.
• Initial Heterogeneity (within and between Regions): Variables, that are adjusted endogeneously during the simulation run, might be initialized differently for different agents. The distributions according to which these initial values are drawn might differ between regions in order to capture the effects of different starting conditions of economies on economic dynamics and effects of certain policy measures.
• Emergent Heterogeneity: Typically most of the dynamic variables evolve differently for different individual agents and heterogeneity emerges, even if individuals are initialized homogeneously. The developed framework allows to capture the evolution of the population distribution of the relevant variables both by using statistical indicators and by visualizing the dynamics of a certain variable for all individuals in a set of agents.
Aggregation of individual data is done by the Eurostat agent and follows in principle the procedures used by real world statistical offices.

Implementation issues
The Eurace@Unibi model has been implemented in the Flexible Large-scale Agent Modelling Environment FLAME (Coakley et al., 2012). Several features make this environment particularly appealing as a framework for the analysis of large scale agent-based economic models. It has been particularly designed for use on parallel computers, which is a big advantage when large agent-based models are simulated. FLAME provides a very transparent and clean way to model information flows between agents. The only means to communicate private data between agents are messages, where the data an agent can transmit using a message consists of a list of values of its own state variables (e.g. wealth, income, skills, profits, expectations about certain variables). Messages are added to a centralized message board and the sending agent determines which agents can read the message. Agents check the message boards every iteration in order to collect all the information they are supposed to obtain. Then each agent can use the collected information as input to the decision rules or as the basis for updating some of its own state variables.
Data generation and analysis is a multi-stage process in which considerations of computation time and data storage play an important role. At the simulation design stage (before simulations are actually run), the model analyst can select to output either a complete snapshot in which all variables of all the agents are stored (very data intensive), or to select a subset of agents (for which all variables will be stored). In addition, it is also possible to select a certain frequency at which to output the data, say every n iterations.
At the simulation stage the data is first read out and stored as XML files. Then it gets transformed into a database format. The post-processing is done using statistics packages from the R Project (R Development Core Team, 2008).
A set of general-purpose R scripts have been developed for post-processing the data to automatically generate a complete set of graphs (e.g, time series plots, box plots, scatter plots, and histograms). The plots can be generated at two levels: macro level plots that display aggregate macroeconomic data and disaggregated plots to view individual agent level variables (Gemkow and van der Hoog, 2012). Finally, these scripts allow for the generation of graphs to analyze single simulation runs, Monte Carlo batch runs, or plots for parameter variations.
3 The Model 3.1 The sequence of activities Agent actions can be time-driven or event-based, where the former can follow either subjective or objective time schedules. Furthermore, the economic activities take place on a hierarchy of time-scales: yearly, monthly, weekly and daily activities all take place following calender-time or subjective agent-time, see also the Listings 1 and 2.
Agents are activated asynchronously according to their subjective time schedules that is anchored on an individual activation day. These activation days are uniformly randomly distributed among the agents at the start of the simulation, but may change endogenously (e.g., when a household gets re-employed, its subjective month gets synchronized with the activation day of its employer due to wage payments). The branching of agent activities provides the agents with a high degree of autonomy to initiate their actions independently of the actions of any other agent or central mechanism.
From the model point of view, the mixture of event-based and time-driven actions leads to asynchronous behavior and a mechanism to randomly match the agents on the markets. As such it provides us with a necessary ingredient to model a decentralized market economy.
Each firm proceeds through the following sequence of economic activities: 1. On the firm's idiosyncratic activation day the firm starts its production cycle with production planning. The production plan consists of planned output based on historical observations and the results of market research. Based on the production plan the firm determines its planned input demand for capital and labour.
2. Financial management of the firm. The firm computes the costs of production and the costs for financing its commitments. If the internal resources are insufficient the firm tries to finance externally by requesting credit.
3. Credit market with direct firm bank linkages opens. The banks provide credit by servicing the loan request on a first come first serve basis. The bank decides on the credit conditions for the applying firm (interest rate and amount of credit provided) depending on the firm's financial situation. If the credit request is refused, or not fully accepted, the firm has to reduce its planned production quantity.
4. Bankruptcy of two types. If the firm is credit constrained to the extent that it is not able to pay the financial commitments it becomes illiquid and illiquidity bankruptcy is declared. If at the end of the production cycle revenues are so low that the firm has negative net worth, the firm is insolvent and insolvency bankruptcy is declared. In both cases it goes out of business, stops all productive activities and all employees loose their jobs. The firm writes off a fraction of its debt with all banks with which it has a loan and stays idle for a certain period before it becomes active again. 7. Production takes place on the firm's activation day. After production is completed, the output is distributed to local malls. Firms offer goods at posted prices with price revisions occurring once a year.
8. At the end of the production cycle the firm computes its revenues, and updates its income statement and balance sheet. It pays taxes, dividends, interests and debt installments. It checks if net worth is negative and if so, declares bankruptcy. Otherwise it continues with the next production cycle.
The households' activity sequence is given by: 1. Households receive labour income on the same day that the firm starts its production cycle (wages are paid at the start of the month). Dividend income on index shares is received on the first day of the calender month.
2. After tax payment, households determine their consumption budget for the upcoming month, based on a target wealth to income ratio. Since wealth consists of liquid monetary assets and shares, the consumption decision affects the (planned) asset portfolio. The household first enters the financial market before the consumption goods market opens.
3. Financial market transactions between households consists of trades in index shares. The possibility of rationing and the resulting asset allocation may result in adjustment of the consumption budget.
4. Households go shopping on a weekly basis, selecting among consumption goods offered at their local mall. The consumer tries to spend its monthly budget equally over four weeks. Parts of the weekly budget that are not spent in a given week are rolled over to the consumption budget for the following week.

5.
A household that becomes unemployed starts looking for a new job while receiving unemployment benefits.
In the following sections we describe these activities in detail. Listing 1: Frequency and sequence of firm activities.
The households' activity sequence is given by: Listing 2: Frequency and sequence of household activities.

Households' consumption choice
The consumer collects information about the range of products provided. She receives information about prices and inventories available at the mall. In the Marketing literature it is standard to describe individual consumption decisions using the multi-nominal logit model (see e.g. Malhotra, 1984), and also substantial empirical evidence has been collected concerning the intensity of choice with respect to different product features in different markets (see . Accordingly, we assume that a consumer's decision which good to buy is random, where purchasing probabilities are based on the values attached to the different choices a consumer is aware of. Let G h,t denote the set of products for which there are still positive inventory stocks when consumer h visits the regional market (the mall). Consumer h selects product i ∈ G h,t with a logit probability . (1) A way to interpret this multinomial logit formulation of consumer choice is to assume that the different products are horizontally differentiated and the actual value of the consumption good i for consumer h is given by where h,i,t captures the contribution of non-price characteristics of product i to the value for consumer h in period t. Under appropriate assumptions about the distribution of h,i,t the probability that a consumer choosing the product with the highest value selects product i, is given by (1), see e.g. Ben-Akiva and Lerman (1985). The parameter γ C then measures the importance of the price relative to the other characteristics and therefore can be seen as a measure of the degree of horizontal differentiation between the products offered by the different firms (a large γ C corresponds to a low degree of product differentiation) or as a measure for the intensity of competition between the consumption good firms. Once a consumer has selected a product, she spends her entire weekly consumption budget C h,t /4 on that product, provided there exists sufficient inventory stock at the mall. In case the consumer cannot spend all of his budget on the product of choice, she first spends as much as possible on product i, then removes the product from her list G h,t , updates the logit probabilities, and selects another product in order to spend the rest of her consumption budget. If she is rationed again, she spends as much as possible on the second choice product, and rolls over the remaining budget to the next week and ends the visit to the mall.

Firms' quantity choice
The consumption goods market consists of local malls that are serviced by all consumption goods producing firms to offer their products and visited by all households located in that region for their shopping activities. At these malls each consumption goods producer holds an inventory that is replenished once a month. The delivery volume of an individual firm in each month is the difference between a planned stock and the current inventory level. As will become clear from the description of consumer choice behavior (see Section 3.2.1) actual demand for the product of a firm in a given mall and a given month is stochastic and there are stock-out costs, because consumers intending to buy the product of a firm will move on to buy from a different producer in case the firm's stock at the mall is empty. Therefore, the firm faces a production planning problem with stochastic demand and stock-out cost.
The production planning literature has extensively dealt with problems of this type and there are numerous heuristic decisions rules available in the corresponding managerial literature. The simplest standard heuristic prescribes to generate an estimation of the distribution of demand and choose the planned stock level after delivery such that the (estimated) stock-out probability during the following month equals a given parameter value (which is a function of the stock-out costs, inventory costs and risk attitude of the firm, see, e.g., Silver et al., 1998). Following our general Management Science approach for modelling firm behavior, a heuristic of this type is adopted by the consumption good producers.
Specifically, we assume that the demand generated by households visiting these malls during a month can be estimated byD Here,Ŝ r,t is the estimated market size of the local market r (the real consumption budget of inhabitants of region r) that is ascertained together with the total market sizeŜ t . The local demand estimation in a mall is the relative share of the estimated total demand.Ŝ r,t ,Ŝ t , and the total demand depending on the current price p * ,D i,t (p * ), are estimated on a yearly basis within an elaborated market research procedure. For more details regarding the market research activities the reader is referred to Section 3.2.11. The determination of the planned delivery volumesD i,r,t to each mall is the difference between a critical inventory stock Y i,r,t and the current mall stock S i,r,t , Following the production planning heuristic sketched above, the replenishment level Y i,r,t is set such that the estimated firm's demand is covered with probability χ, where χ is denoted as the service level of the firm. The firm assumes that demand follows a normal distribution and hence the replenishment level can be expressed as whereD i,r,t (p * ) is the expected demand,σ 2 Di,r,t the estimated variance of the demand distribution and q χ the χ-quantile of the standard Gaussian distribution with mean 0 and variance 1.
The sum of the planned delivery volumes for all malls yields the desired output which is the planned production quantity entering the input factor calculation and the financial planning in t.

Firms' demand for labour
Consumption goods producers need physical capital and labor for production. A firm i has a capital stock K i,t that is composed of different vintages of the production technology v with v = 1, ..., V , The accumulation of physical capital by a consumption goods producer follows where δ is the depreciation rate and I v i,t ≥ 0 is the gross investment in vintage v. The production technology in the consumption goods sector is represented by a Leontief type production function with complementarities between the qualities of the different vintages of the investment good and the specific skill level of employees for using these types of technologies. Vintages are deployed for production in descending order by using the best vintage first. For each vintage the effective productivity is determined by the minimum of its productivity and the average level of relevant specific skills of the workers. Accordingly, output for a consumption goods producer is given by where A v is the productivity of vintage v and B i,t denotes the average specific skill level in firms.
Complementarity between the quality of physical capital and worker skills is an empirically well established fact. The fact that the considered production function takes into account the vintage structure of the captial stock and also allows firms to select among different available vintages enables us to capture the effect of workers' skills on the incentives of firms to invest new technologies. Empirical evidence that firms' technology choices are indeed influenced by the skill level of their work force can for example be found in Piva and Vivarelli (2009). An important parameter for the input factor determination is the potential output volume that can technically be produced with the present capital stock of the firm. This feasible output levelQ i,t is computed according tô With respect toQ i,t and the desired output levelQ i,t we have to consider two cases with different implications for the capital demand to be purchased at the capital goods market: 1.Q i,t ≥Q i,t : In that case the desired output can be produced with the current capital stock and no additional investments are necessary. We have I i,t = 0 and the labor input is computed by taking the labor productivity of the last month into account: 2.Q i,t <Q i,t : Here we have positive investments I i,t > 0; the amount depends on the outcome of the vintage choice. If v is the selected vintage, the investment volume is and the labor demand becomesL Depending on whether the firm's labor demand exceeds or falls short of the current workforce the firm has to either hire additional workers or dismiss redundant workers.

Firms' demand for capital: vintage choice
The consumption goods firm chooses from a set of vintages v = 1, ..., V which differ regarding their productivity A v . The decision in which vintage to invest, depends on a comparison of the effective productivities and the corresponding prices. For this decision the complementarity between specific skills and technology, min[A v , B i,t ], plays an important role: due to the inertia of the specific skill adaptation, the advantage of a better vintage with A v > B i,t cannot be fully taken into account immediately, as the productivity gap is only closing over time. Therefore, the firm computes a discounted sum of estimated effective productivities over a fixed time horizon S. The specific skill evolution is estimated for each time step within this period [t, t + S] along the same formula that applies to households for their individual skill adaptation (see (17) in Section 3.2.5) , with the firm's mean general skill level B gen i,t and mean specific skill level B i,t . Formally, we haveÂ where ρ is the discount rate. The estimated adaptation of specific skills followŝ As in other parts of the model, see, e.g. Section 3.2.1, the vintage choice follows a logit specification where probabilities depend on the ratios of effective productivity and pricesǍ The higher is the ratio for a certain vintage, the higher the probability to buy it. Formally, we have for vintage v:

Households' specific skill adaptation
Each worker h has two dimensions of human capital endowments. An exogenously given general skill level b gen h and an endogenously increasing specific skill level b h,t . General skills can be interpreted as formal qualification or general embodied abilities while specific skills are experiences or abilities obtained on-the-job reflecting the productivity of each worker. There exist up to five general skill levels, described by different values of b gen , i.e. b gen ∈ {1, 2, 3, 4, 5}. b gen = 1 is the lowest general skill level and b gen = 5 the highest.
Another distinction is that general skills are observable by firms in the hiring process while specific skills are not. They become observable during the production process.
The acquisition of specific skills in the production is faster for higher general skill levels. Formally, the workers increase the specific skills over time during production by a learning process. The speed of learning depends on the general skill level b gen h of the worker h and the average quality of the technology A i,t used by employer i Here b h,t are the specific skills of worker h in period t and χ(b gen h ) increases with general skills b gen h and 0 < χ(b gen h ) < 1.

Firm's wage offer
If the firms plan to extend the production, i.e. their labor demand is higher than the current workforce (L i,t > L i,t ), they post vacancies and corresponding wage offers. The wage offer has two constituent parts. The first part is the market driven base wage w base i,t . The base wage is paid per unit of specific skill. If the firm cannot fill its vacancies and the number of unfilled vacancies exceed some threshold v > 0 the firm raises the base wage offer by a fraction ϕ base to attract more workers such that The second part is related to the specific skills. Since the specific skills represent the (maximal) productivity of the employees the wage w i,t is higher for higher specific skills. For each of the general-skill groups the firm i offers different wages w O i,t,g in period t. The wage offers are given by whereB i,t,g are the average specific skills of all employees with general skill g in the firm. The underlying assumption of this determination of wage offers is that firms can observe general but not specific skills of job applicants. Therefore they use the average specific skills of all employees with general skill g in the firm in order to estimate the specific skills of an applicant with general skill level g. If the number of applicants is higher than the number of vacancies the firms choose between all applicants with respect to their general skill levels. An applicant with high general skills is more likely to receive a job offer than an applicant with low general skill. The probability that firm i chooses applicant h is determined using a multi-nominal logit model. .
The parameter γ gen steers the influence of the general skill level of an applicant on his probability of being hired. The firm sends as many job offers as it has vacancies to fill. If the number of applicants is lower than the number of vacancies the firm sends job offers to all of the applicants.
In case of downsizing the incumbent workforceL i,t < L i,t , the firm dismisses workers with lowest general skill levels first, because they have generally a lower speed of learning. In order to represent factors which lead to dismissals other than a decreased labor demand (i.e. by on-the-job-search, or through workers quitting their jobs) for a fraction of employees the work contract is randomly separated in each month. The number of such separations is a random variable from the uniform distribution [ , ]. At the end of each month the wages of employees are increased proportional to the (regional) productivity growth (g P rod r,t ). This can be interpreted as a simplified collective wage bargaining.

Households' labor supply
Each worker h offers one unit of labor per month (20 days). If a worker is employed he receives a wage w h,t . If the worker is unemployed he receives unemployment benefits from the government and is actively searching for a new job on a given day with probability P[job search]. This probability is determined by where η month is the number of applications a household is allowed to send per month and η day is the number of maximum applications per day, and 20 is the number of business days per month. These parameters can be used to steer the intensity of search.
An unemployed worker h takes the wage offers posted by searching firms into consideration and compares them with his reservation wage w R h,t . A worker with general skills g will only apply at a firm i that makes a wage offer which is higher than his reservation wage When a worker applies he sends information about his general skill level to the firm. In case the firm is located outside of his place of residence the unemployed worker also takes fixed commuting costs C comm into consideration The level of the reservation wage is determined by the current wage w R h,t = w h,t if the worker is employed, and in case of an unemployed worker by his adjusted past wage. An unemployed worker will reduce his reservation wage with the duration of unemployment. If an unemployed worker did not find a job although he was actively searching he reduces his reservation wage by There exists a lower bound to the reservation wage w R min which is the level of unemployment benefits.
If the unemployed worker receives one or more job offers he accepts the job offer with the highest wage offer. In case he does not receive any job offers he remains unemployed.

Financial management
At the end of the month (the firm specific production cycle) the firm computes its income statement to determine its profits. The firm' s balance sheet and cash flow are shown in Table  1 and 2.
The variable costs of the firm consists of the actual labour costs and a proportion of the total investments that are accounted for in this month. The amortization period of fixed capital investments equals the number of installment periods of a loan Here v t ∈ V stands for the vintage of capital selected at t (see Section 3.2.4) and T L is the duration of the loan. The fixed costs consisting of the irreversible capital expenditures of the previous periods (t − T L , ..., t − 1) that are accounted for in t, plus interest on all outstanding loans over those periods (L b i,t−l ), is given by The monthly realized profit of a consumption goods producer equals the sales revenues (R i,t ) plus interest received on firm's demand deposits (M i,t ) minus production costs in the period that just ended.
Here r d denotes the interest rate for deposits at commercial banks and r b i,t the interest rate firm i has to pay for outstanding loans (see Section 3.4.5).
In case of positive profits, the firm pays taxes and dividends. 9 The net earnings (or losses) are The retained net earnings (or losses) after interests, taxes and dividends are added to a payment account M i,t π ret The actual total expenditures in period t are: Note that the expenditures in (33) differ from the costs taken into account in the profits in eq.(28). In the expenditures the full capital bill is taken into account, whereas in the costs we only include calculatory capital costs that are an amortized proportion of the current investments in this period.

Firm credit demand
At the start of period t + 1, the total liquidity needs to finance the next production cycle consist of the planned production costs, i.e. the wage bill and investments. The firm also has financial commitments carried over from the previous period, such as taxes and dividends on profits, debt principle and interest payments.
The actual liquidity needs that should be financed at the start of period t + 1 are as follows Capital bill Wage bill 9 A slightly altered dividend rule is used if a firm is hoarding cash. If its payment account exceeds a certain threshold levelm that depends on the average revenues over the last four months:m = 0.25 4 τ =1 R f t−τ , the dividend rate is given by d = d · I[Mi,t ≤m] + 1 · I[Mi,t >m]. This rule states that if the payment account of the firm is below the threshold levelm then it pays out the default dividend rate d = 0.70, while if the payment account exceeds the threshold levelm then the firm's dividend payout equals 100% of it's average net earnings over the last four months. This rule was installed in order to prevent firms from hoarding money on their payment account, which led to detrimental economic performance due to the absence of a back-channelling of the profits to households.
Note that this equation contains some unknowns at the time that liquidity needs are determined: the actual price of capital and the wages are unknown. The firm assumes p v i,t+1 = p v i,t and w i,t+1 =w i,t , the average wage of the firm.
This implies that the actual expenditures in (33) may differ from the liquidity needs determined by (35). If so, the firm may have a liquidity crisis if it turns out that capital or wages are more expensive than expected. In such a case the firm rescales production to fit its available liquidity.
The payment account is used as primary source to cover all expenses. If a firm does not have sufficient internal financial resources, it first depletes the payment account before resorting to external financing on the credit market. This follows the Pecking Order theory (Liesz, 2005) in which firms finance their expenditures according to a hierarchy of risk, using the least risky form of financing before more risky forms are employed.
The demand for bank loans is the remaining part of the total liquidity needs that cannot be financed internally from the payment account.

Inflow Outflow
Total expenses

Production
Once the financial management has finished and the financial commitments (i.e. taxes, interests and debt repayments, and dividends) have been paid, the firm reevaluates the financial resources available to cover all planned production expenses. If the available resources are not sufficient to cover the planned output, the firm downscales the planned output level such that the production costs can be financed with the residual funds. Thereafter, the firm enters the factor markets: first the labor market and then the capital goods market. Firm's activities in the labor market depend on its labor demand and the current size of the labor force (see Section 3.2.6). If the labor demand exceeds the current number of employees the firm has to hire more workers. If the firm needs less workers than its current workforce the firm dismisses workers.
The structure of the labor market allows for frictions so that even if there is persistent unemployment firms' labor demand is not necessarily satisfied completely. When a firm is not able to fill all its vacancies it has to adapt the production quantity to the level that can be produced with the available labor force. Moreover, we assume that the capital good is offered at infinitely elastic supply. Thus, the firm is never rationed in the capital goods market.
The actual production quantity Q i,t is determined according to the Leontief production function defined in (9). Output is distributed among the malls in proportion to the planned delivery volumesD i,r,t . The delivery volume to mall r is

Pricing decision
Consumption goods producers set the price of their products once a year. This relatively long period between two price changes of an individual firm is consistent with survey data for US firms (Blinder, 1991) and for firms located in the Euro area (Fabiani et al., 2006). Our pricing rule is inspired by the setting described in Nagle et al. (2011, ch.7), a standard volume on strategic pricing. They define the price setting as a three-stage process with a preliminary segment pricing stage, an optimization stage and the final implementation stage. Due to the highly stylized modeling of the consumption goods firms in our model, we can abstract from the first and the last stage and let the pricing decision depend on the optimization stage only. Firms seek for a profit-maximizing price taking into account the trade-off between price, sales and costs. However, due to the stochastic and complex nature of the model and the arising uncertainty of future developments this optimization procedure can only maximize the estimated profit of the firm.
In order to estimate possible impacts of price changes on the sales and the costs and finally on its profitability, the firm has to collect and process manifold information. The firm passes a sequence of activities: 1. A market analysis for gathering information that allows estimating how demand responds to price changes.
2. An output analysis for drafting a preliminary production plan for a range of prices. These plans take into account the demand estimates as well as the inventory policy of the firm.
3. A cost analysis for each of the preliminary output plans including an estimate of the factor prices.

A profit analysis which leads to the final pricing decision.
We turn to each of the activities now, explaining them in detail.
Market analysis An important aspect for the profit estimate of different candidate prices is a suitable estimation of the demand function. To obtain an estimated demand curve, the consumption goods producers carry out market research. We assume there are two steps required: the first step is to estimate the overall development of the market. This is to know the potential market size for which the firm competes with its competitors. The second step is an estimation of the market shares that the firm can achieve given the estimated price sensitivity of consumers and the firm's expectations about the prices of the competitors. For the determination of the expected market trend we assume backward looking expectations. Let t be the month when the firm undertakes the market research and S T ot t−ι the real market size (i.e. the observable deflated consumption budget of households) in month t − ι. For determining a global market trend the firm applies a linear regression model of observed market sizes S T ot t−ι for a fixed number of previous months. The expected market size in the future month t + τ ,Ŝ t+τ is then determined byŜ where τ counts the months starting from the current month t andb t S the slope of the linear regression.
In the second step firm specific market potentials are evaluated. It is determined how a firm's position relative to its competitors changes as the price is changed. To this end, the firm carries out consumer surveys. The procedures builds on what is known as simulated purchase surveys in the relevant literature (e.g. Nagle et al., 2011). Such surveys are performed by presenting consumers a sample of products and prices of the firm under consideration and of its competitor. The consumers are asked which product they would choose. Based on the results of such surveys the sensitivity of buyers with respect to price changes is estimated.
In our model, the firm draws a representative sample of households. All participating households are asked to compare a firm's product with the set of the currently available rival products. The price of the firm's product is varied within a discrete price range; and for each price p M R in this set, the households respond whether or not to buy the good at the specified price. This decision is a simulation of households' real purchasing decision subject to the same influencing factors as the regular weekly consumers choice: it is modeled as a random process with a probability to buy the product of firm i at price p M R , given expected competitors' prices. This choice probability is given by where again γ C captures the consumer's sensitivity with respect to price differences of the available goods (see Section 3.2.1). The expectations of the prices of the competing products are denoted byp k . The firm collects the yes-no answers of the participants of the survey. Dividing the number of positive responses at a price p M R by the total sample size n Sample yields a first estimate of the achievable market shares. Once the firm has gathered the relative frequencies, it runs a regression to find a relation between prices and achievable market shares given the expected prices of the competitors. The actual function of expected market shares is approximated by the exponential functionŝ It should be pointed out that firms are not aware of the actual purchasing probabilities (39). The exponential choice in (40) is based on the observation that the market data can be explained much better by this form compared to a standard linear model.
Firms act in a dynamic environment with changing prices, but the market share estimation is a point estimation that does not take into account these dynamics. Consequently, the estimation can loose its goodness of fit when the actual characteristics of the competitors significantly deviate from the assumed competitive environment. This can cause problems particularly with regard to long planing periods. Particularly, if the price level increases due to persistent inflation and the market share estimation is used for the whole planning period (e.g. the planning period for the pricing is one year). In order to alleviate this problem, a firm always carries out two surveys that differ only with respect to the expectations concerning competitors' prices. The first includes the current market situation while in the second the willingness to buy is queried for the expected market environment at the end of the planning phase. The estimated market shares for a price p M R for the months in between are determined by a linear combination. For a planning period of length T starting at t we have for month t + τ an estimated market share of Based on the results of the market analysis the firm can construct the estimated demand function. The firm combines the estimated trend of the total market sizeŜ t+τ with the expected market shareŝ t+τ,q . The expected demand curve, estimated for the τ th month after t writeŝ Preliminary output planning In order to find a profit maximizing price the firm does not only need an estimate of the sales but also an estimate of the production costs. Therefore, the firm requires information about the production quantities during the planning period. On that account the consumption goods firm has to set up a preliminary production plan for the following months under consideration. The drawing up of this production plan is similar to the actual monthly production planing as described in Section 3.2.2. The firm derives its preliminary production plan from the estimated demand function and a buffer stock. The buffer allows to serve unforeseeable demand realizations above average. The size of the buffer depends on the level of service, i.e. the percentage of the theoretically possible demand that the firm still wants to satisfy.
In contrast to the actual monthly output planning, in the preliminary output planning for the price setting the firms abstract from the local mall inventories and consider only global inventories. At the beginning of each production cycle, the firms plan to refill their inventories up to a level that corresponds to the service level of their demand. Let χ be the level of service andσ 2 Di,t+τ be the estimated variance of the demand function in t+τ , then the critical inventory stock is determined byŶ where q χ is the χ-quantile of the normal distribution. The expected production quantity for period t + τ is then simply the difference of the critical inventory stockŶ i,t+τ and the expected current stock. The expected current stock in t + τ can be derived from the replenished inventory of the previous period minus the expected demand in t + τ − 1, thus we haveQ The starting value of the inventory stock in the first month of the planning period t is the total buffer that has been used in the determination of the actual production quantity in the previous period t − 1.
Cost analysis Production costs are driven by the usage of input factors in the production process. These costs are essentially wage costs and costs arising from the use of capital. For the estimate of costs it is important to estimate on the one hand the requirements for input factors and external financing over time, and on the other hand the development of factor prices. The firm computes the required input factor demand for labor and capital for each period t + τ with τ ∈ {0, ..., 11}. The first step to determine the expected requirements of the input factors labor and capital in t + τ is the computation of the maximum output that the firm can produce with the available capital stock at the beginning of t + τ . The feasible output, derived from the Leontief production function, is the sum of the depreciated effective capital amounts of all vintages held in the former period, whereB i,t+τ denotes the estimated mean specific skill level of firm's workforce and A v the technical productivity of vintage v. The evolution of the prospective capital stock from period t, when the firm carries out the analysis, to the planning month before the currently considered period, t+τ −1, is driven by depreciations and investments, and the depreciation of intermediate investments. Formally, the evolution is represented bỹ As there are several vintages v = 1, ..., V of the production technology, the firm has to decide in which vintage to invest. Here it is assumed that the vintage v t selected in the periodic vintage choice for production in t is also used for the cost planning for all months under consideration. The mean specific skillsB i,t+τ in equation (45) are estimated by applying the individual specific skill adaptation formula of workers with the mean of specific skills and the productivity of the deployed capital stock in the previous periodÂ i,t+τ −1 , as well as the average of general skills of a firm's employees as parameters (see Section 3.2.5). Put formally, we havê Depending on the level of feasible output on the one hand and the intended production quantity on the other, the firm has to consider two different cases: 1. The feasible outputQ i,t+τ is less than or equal to the expected outputQ i,t+τ : In that case the capital stock of the firm is not sufficient for producing the desired output and additional investments are necessary. The needed capital investments are determined bŷ and the resulting labor demand iŝ 2. In the second case the feasible output is greater than the desired one,Q i,t+τ >Q i,t+τ : Here only a part of firm's capital stock is deployed. It is assumed that the firm uses the best vintages of its production technology first. Because of the Leontief production function the labour demand can be directly derived from the capital requirements. Labour demand is computed according tô As the capital stock is used with less than its capacity, no additional investment are required,Î vt i,t+τ = 0.
The prospective variable costs are related to the estimated labor input and, if additional investments are required, the portion of capital expenses in t + τ that is apportioned to this month. The estimated variable costs arê w i,t+τ is the estimated mean wage in month t + τ . It is determined bŷ Equation (52) takes into account two different sources for increasing wages. The first term captures the wage increase that is due to the productivity growth in the economy. The wage of employed workers increases with the same monthly growth rate as the average productivity in a firm's home region. In order to estimate the wage increase of incumbent workers the firm determines the average regional productivity growth rate of the last 12 months, g P rod r . The second term captures the change in the mean wage induced by newly hired workers. If a worker accepts a job, the wage corresponds to the wage offer of her general skill group. This wage offer is computed by multiplying a base wage offer with the effective productivity of the skill group (minimum of average specific skills and firm's technology). For the cost estimation, however, the firm abstracts from skill groups and considers only firm specific averages.
For estimating the fixed costs the firm has to sum the portions of irreversible capital expenditures spent in previous periods which have to be accounted for in t + τ . Furthermore, the firm estimates the credit costs by summing the interest payments for all loans which are still open in t + τ. We have fixed costs defined aŝ where v t+τ −l indexes the vintage selected for the investment in t+τ −l and for l > τ .L b i,t+τ,t+τ −l indicates the current value of a loan in the period t + τ (second subscript) which has been raised in t + τ − l (third subscript). r b i,t+τ −l is the interest rate for which the loan was accepted.
The expected demand for credit in t + τ is derived from a comparison of the prospective expenses and the financial resources that are available. This information stems from an estimate of the payment account which takes all intermediate inflows and outflows into account. At the beginning of t + τ the expected financial resources are given byM i,t+τ −1 . The firm has to pay a percentage τ of its previous profitsπ i,t+τ −1 as taxes and a percentage d of the net profits as dividends. Then it has to pay the wage bill and investments for production in t + τ , the debt installment, and interest payments. In sum, one haŝ Interest and debt installment payments .
Additional credit is required if the expensesÊxp i,t+τ are not completely covered by the available cash,L The firm adds the expected revenuesR i,t+τ and the additionally raised credit on the notional payment account. At the end of the planning month the expected payment account balance iŝ Expected revenues generated by selling the good at a price p M R in t + τ are computed bŷ Profit analysis The firm evaluates expected profits for each of the candidate prices. As the price holds for one year, the firm compares the profitability of the alternatives with respect to the whole planning period. For month t + τ the estimated profit associated with the price p M R is denoted byπ The yearly profit is simply the sum of the monthly earnings. For the comparison of intertemporal payment flows, the firm considers the discounted sum: The firm selects the price which yields the highest discounted profitΠ t :

Bankruptcy
Two types of bankruptcy are considered: • Illiquidity bankruptcy: In the credit market the firm was unsuccessful in raising all its external finances. It is unable to pay its financial commitments, i.e., taxes, debt instalments and interests. Firm equity is positive but it does not have enough liquidity to continue operations. It should raise enough funds to become liquid again.
• Insolvency bankruptcy: The firm updates its balance sheet and checks for insolvency at the end of its production cycle when it has received the revenues from this month's sales.
If the firm equity becomes negative it is insolvent and goes out of business. It has to perform a debt restructuring before it can continue operations.

Entry and exit
Both types of bankruptcy may occur in the model. As soon as a firm is declared bankrupt, this has the following consequences: 1. All current employees are fired and become unemployed. They receive unemployment benefits.
2. The firm suspends all production activities for a year. At the end of the period the firm reenters and production is restarted.
3. The capital stock remains in the firm, but is unproductive during the idle period.
4. Since we have modelled the financial market as an index, the shares of the firm continue to exist in the market index, but obviously pay no dividends. The households' portfolios of index shares are unaffected.
5. The local inventory stock at the malls is destroyed, representing the economic loss due to bankruptcy.
6. Debt renegotiation with the banks. For each loan, the firm defaults on a fraction of the loan. This leads to bad debt that should be written off from the bank's balance sheet.

Debt restructuring
Debt restructuring is modelled by re-scaling the total debt, either based on the current value of total debt, or the current value of total assets, depending on the type of bankruptcy. To make it easier for re-entering firms to obtain new loans we improve their debt-equity ratio and lower their risk of default. This makes it more likely for a bank to accept any future loan requests from such a debt-restructured firm.
In case of bankruptcy due to insolvency, the new target debt D * is set lower than total assets A. The debt rescaling parameter ϕ is assumed to be constant across all firms and over time: After debt restructuring, the equity of the restructured firm is positive, E * = (1 − ϕ)A > 0. The debt/equity-ratio after rescaling is given by the constant: D * /E * = ϕ/(1 − ϕ).
In case of bankruptcy due to illiquidity, the firm does not need to renegotiate its debt per se, since D is already lower then A and equity is still positive. However, since the firm is unable to pay its financial commitments it should raise new funds. It could do so either on the credit market or in the stock market by means of issuing new shares. Since we have precluded firms from issuing new shares (for reasons of simplicity), we also allow illiquid firms to write down part of their debt. In contrast to insolvent firms, illiquid firms do not rescale their debt as a fraction of assets, but as a fraction of the original debt: with new equity given by E * = A−ϕD > E and a new debt/equity-ratio D * /E * = ϕD/(A−ϕD).
Since setting a lower value for the debt/equity-ratio improves the firm's chances of getting new loans in the future, the debt rescaling parameter ϕ must be set to low values ϕ ≤ 0.5 to ensure that the new debt-to-equity ratio is much smaller than the previous debt-to-equity ratio.

Banking sector
This section provides details that are directly related to the supply of credit to firms.

Bank accounting
The bank's cash flow position fluctuates with deposits and withdrawals by households and firms, with interest payments, tax payments, and dividend payouts. The net profits (or losses) are added to the net worth of the bank. The bank's reserves are held at the Central Bank. Bank profits π b t at the end of month t are determined by and the bank's reserve at the Central Bank evolve according to The bank's profits consist of the margin between interests on loans and interests on demand deposits, plus (minus) any interest payments by (to) the Central Bank on overnight central bank reserves (central bank reserve debt). In case of positive profits, the bank pays taxes at a tax rate ϑ and dividends at dividend rate d. The net changes of the demand deposit accounts for households and firms are given by ∆M b

Bank credit supply and risk-taking behaviour
The bank's ability to provide credit is restricted by a Capital Adequacy Requirement (CAR) and the Reserve Requirement Ratio (RRR). The bank's risk-taking behaviour depends on its current level of exposure to default risk and the capital requirement.
Firms select banks at random in each production period, so the credit market can be viewed as a random matching process. The bank records several characteristics of the applying firms: total debt, size of credit requested, firm equity, and additional risk exposure. These attributes enter into the risk assessment of the bank and the loan conditions offered to the firm, consisting of size and interest rate for the loan. Then the firm selects the bank with the lowest interest rate offer.
On a daily basis, the banks rank their stream of credit requests in ascending order of risk exposure. The least risky credit request of the current day is considered first, but different firms have different activation days during the month, so each new day sees new firms requesting loans to the same bank. If a healthy, financially sound firm requests a loan one day after an unhealthy, financially unsound firm has already obtained a loan with a large risk exposure, the healthy firm may see itself credit rationed due to limits on the banks' risk exposure.

Probability of default
The bank's assessment of the probability of default (PD) on a loan by firm i depends on the creditworthiness of that firm, and is measured by the debt-to-equity ratio (where firm debt includes the new loan). Following the internal risk-based (IRB) approach of the Basel Accords, there is a minimum risk-weight that sets a floor-level for the probability of default at 3 basis points (0.03 percent). We assume that the bank associates the following PD to a loan of size L b k,t , if it is granted by bank b to firm i: where D i,t and E i,t denote debt and equity of the firm i applying for the loan k. 10 The rule is parametrized by a parameter ν (ν = 0.1) that weights the impact of the debt-to-equity ratio on the probability of default.

Credit risk
We assume there is no collateral for debt, hence debt is unsecured and the expected loss given default (or LGD) is one hundred percent of the loan. Due to this assumption, the credit risk or Exposure at Default (EAD) of the loan is simply the probability of default times the value of the loan: The total risk exposure of the bank is now simply the sum of risk-weighted assets across the entire loan portfolio: where the index i runs over all firms, and index k = 0, ..., K(i) over loans of firm i with bank b.

Interest rate rule
The interest rate offered to a firm is an increasing function of the credit risk reflecting the risk premium that the bank charges to more risky, less financially sound firms. The credit risk posed by firm i enters into the loan conditions as a mark up on the Central Bank base interest rate. The weight of the credit risk in the interest rate can be calibrated by a behavioural parameter λ B that is the same across all banks. Furthermore, the time-varying operating costs are captured by a random variable b t , which is uniformly distributed on the unit interval. 11 10 Note that we index the loans by k and not by i, implying that a firm may have a portfolio of loans, possibly with different banks. The probability of default (PD) refers to the default on a specific loan k, not necessarily to the default of the entire firm i. 11 A similar specification for the interest rate rule can be found in Delli Gatti et al. (2011, p. 67). The difference with our specification is that we use the probability of default of the firm, while they use the leverage ratio of the bank. Such an interest rate rule could lead to the unfortunate situation that a bank with a worsening financial position, i.e., a higher leverage ratio, will price itself out of the market by asking a higher interest rate.

Capital adequacy requirement
Each bank is required to satisfy a minimal capital adequacy ratio, implying that banks have to observe a limited exposure to default risk. That is, bank equity (core capital) must be greater or equal to a fraction κ of the value of its risk-weighted assets. This assumption is based on Basel II/III capital requirements, where κ is between 4 and 10.5 percent. The bank's total exposure to credit risk is restricted by α := κ −1 times the equity of the bank: Here E b t is bank equity (core capital), RW A b t is the value of risk-weighted assets, κ is the capital adequacy ratio, and α := κ −1 is the maximum leverage in terms of the ratio of equity to riskweighted assets (E b t /RW A b t ). If the constraint is violated the bank stops providing new loans. Pre-existing loans are still administered, firms continue to pay interest and debt installments, and the demand deposits of account holders continue to be serviced. From this we derive a credit risk exposure "budget" V b that is still available to fund firms: The supply of credit risk in the current period is restricted to this exposure budget V b . Firm i receives its full credit whenever the bank's total credit risk exposure remains below this limit and is fully rationed when the loan would exceed the risk limit. In terms of the exposure budget V b the credit offer reads: Bank risk exposure is positively correlated to the maximum risk-based leverage ratio α (inverse capital adequacy ratio). Higher α means more risk is allowed, hence banks have at their disposal a greater budget of excess risk exposure and will tend to give out more risky loans. We assume there is no intertemporal aspect to the risk-assessment on the part of the bank, which is solely based on the current balance sheet position of the firm that is requesting the credit.

Reserve requirement
The banks must observe a minimum Reserve Requirement Ratio (RRR), that is, reserves must exceed a fraction 0 ≤ β ≤ 1 of total demand deposits of households and firms: 12 This rule will be denoted as the "full rationing" rule. An alternative behavioural rule for the bank that we have tested is the "partial rationing" rule: when the credit risk exceeds the risk exposure budget V b , the firm i would only receive a proportion of its credit request, exactly filling-up the bank's constraint. This rule would imply that the bank would always exhaust its "excess risk exposure"-budget in eq. (70). This does not result in a viable economy. It leads to more credit rationing rather than less, since firms requesting credit from the bank after a high-risk firm has already secured a loan will not be able to receive any credit since the bank has already exhausted its entire risk budget. Hence, in the interest of macrofinancial stability, we have opted for applying the "full rationing" rule in relation to the excess exposure budget V b t .
From this equation the "excess liquidity"-budget of the bank is derived as: Note that M b t denotes the bank's central bank reserves, a bank asset, while M b,T OT t denotes the bank's total demand deposits, which is a bank liability.
If the excess liquidity budget is sufficient to provide a firm with its requested credit, then it is serviced in full. Otherwise it is partially credit rationed such that the bank attains its minimum reserve requirement. In case of partial rationing, the granted loan size is given by: Here¯ b i,t is the constrained credit demand after applying the CAR-constraint in (71). The fraction φ b i,t is such that the new loan exactly exhausts the excess reserves and this results in a binding RRR constraint: 14

The capital goods producer
The supply side of the capital goods market is modeled in a simplified way. There is a monopolistic capital goods firm that offers different vintages of the capital good at infinite supply elasticity. This firm is able to satisfy all emerging capital demand required by consumption goods firms for production. Furthermore, the capital good is produced without input factor requirements and consequently without production costs. In order to close the model, all revenues are channeled back into the economy by distributing them to households in the form of dividends. Despite these strong simplifications, the model includes important aspects for a reasonable analysis of the interaction of the technological diffusion and the business cycle.
13 Note that in relation to the "excess liquidity"-budget in eq. (73), we apply the "partial rationing" rule. Hence, a bank will typically deplete all its excess liquidity and will be "at" the RRR constraint.
14 This implies the bank behaves as if it beliefs the reserve requirement is in fact an a priori constraint on its credit supply. An alternative would be to model more explicitly the expected future cash flows that results from supplying a loan, see e.g., Caiani et al. (2015).

The development of new vintages
The capital good producer carries out research and development leading to new vintages of the capital good. The existing vintages v = 1, .., V are the result of previous innovations, and once a new vintage is launched, it is never taken off the market. The number of available vintages is increasing over time.
Innovation is modeled as a random process. Every period with a probability P[Innovation] > 0 there is a successful innovation of a new vintage V + 1. The productivity as the key characteristic of the technology is increased from the previous best practice by ∆q inv > 0. Thus the new frontier technology features a productivity level of

The pricing of vintages
The pricing of the vintages is modeled as a combination of cost-based and value-based pricing (see Nagle et al. (2011)). Note that the costs for producing the capital good are not explicitly modeled in the present implementation, but we assume a proxy for the costs which have to be incorporated in the price setting. These as-if costs grow, similar to the evolution of the labor costs, with the same rate as the average productivity in the economy B Eco t . The cost-based price component has the same level for all vintages v and is denoted by For the value-based price component the capital goods producer estimates the value that each vintage has for a reference firm whose workforce consists of the economy wide average levels for the specific skills (B Eco t ) as well as general skills (b Eco gen ). For the benchmark firm the capital goods producer computes the discounted sums of the expected effective productivities for each vintage v. This is done in an analogous manner as the estimate of the effective productivities by the consumption goods producers for their vintage choice, i.e. the capital goods firm estimates the evolution of specific skillsB Eco t+s with respect to the average general skill level b Eco gen . For vintage v the discounted sum of effective productivities of the benchmark firm is A v t denotes the estimated future productivity of vintage v for a average firm in the economy. The relative utility of v compared to the lowest productivity vintage v = 1 gives then the ratio between their values. By assuming that the price for vintage v = 1 quoted in the previous period corresponds to its value, the value of v entering in the pricing can be estimated by The price of vintage v is finally set according to the linear combination This rule can be interpreted as a proxy for a bargaining process, where the monopolistic capital goods producer on the one hand and the consumption goods producers on the other hand negotiate about the prices for the capital goods. The weighting factor λ (0 ≤ λ ≤ 1) is a parameter indicating the bargaining power of the capital goods firm. A high λ denotes that the capital goods firm can skim off the whole value of the vintage, whereas λ close to zero denotes that the capital firm has no power and can only set the price at its costs.

Income determination
There are four different income types that a household can possibly receive: 1. The most important income is the labor income i.e. the monthly wage that a household receives in case of employment.
2. If a household is unemployed, then he receives an unemployment benefit from the government. This is a fixed percentage of households last earned wage.
3. Depending on the index share holdings, a household receives dividends, that are paid by firms to a clearing house. The clearing house distributes the total dividends to the holders of the index share.

The household receives interest payments from the bank on the demand deposits.
The total income is the sum of these different income types. At the end of the month a household has to pay income taxes on the total income.

Consumption and savings decision
At the beginning of period t, a consumer h decides on the budget C h,t that he plans to spend. The consumer receives an income I h,t , and has total wealth W h,t , which consists of his money holdings and financial assets. The monthly consumption budget is determined according to the following consumption rule where I M ean h,t is the mean individual income of an agent over the last T periods and the parameter Φ is the target wealth/income ratio. This formulation is motivated by the "buffer stock" theory of consumption which is backed up by theoretical arguments and substantial empirical evidence (see Deaton, 1991, Carroll andSummers, 1991). As argued in Carroll and Summers (1991) this theory, according to which liquidity constrained consumers facing risky income desire a buffer stock equal to a certain number of months income, has the potential to explain empirically observed correlation between income, savings and growth. The parameter Φ describes how large the targeted buffer is relative to income and κ indicates how sensitive the consumption reacts to deviations of the actual wealth/income ratio to the target level.
Each consumer shops once a week, but different households at different days. The monthly budget is equally split over the four weeks. Parts of the weekly budget that are not spent in a given week are rolled over to the consumption budget of the following week. This yields a weekly consumption budget C h,t /4 for each week in month t.

Financial asset allocation
Households decide on their asset allocation after their consumption budget is determined. This may lead to a re-adjustment of their current asset portfolio.
Since we do not assume that capital markets are perfectly liquid, the agents may not be able to execute their transactions. There is the possibility of rationing, also on the financial markets. 15 Therefore we introduce a distinction between the anticipated and the realized values of variables such as the consumption budget and asset allocations. The anticipated values are planned at the start of period t, while the realized values are known after the financial market is closed. The agents then know their asset transactions and the status of their money holdings after trading. Only then will the consumption budget become firm and they visit the market for consumption goods where they spent their actual consumption budget which may deviate from the ex ante planned budget.
Households first determine their anticipated consumption budget C e h,t based on their current total wealth W ht at the start of the period, consisting of liquid money holdings and the value of the asset portfolio. Subtracting this planned but not yet realized consumption budget from total wealth the remaining 'asset budget' is allocated to assets.
In a second step, the households determine the asset allocation between the risky asset (the market index) and the risk-free asset (bank demand deposits). Given the planned asset budget X e h,t , the total value allocated to the risky asset is A e h,t = π h,t X e h,t , where 0 ≤ π h,t ≤ 1 is the proportion to invest, and M e h,t = (1 − π h,t )X e h,t are anticipated money holdings. We assume that π h,t is a uniformly distributed random variable. 16 Our assumption is sufficient to obtain different values for π t , and to ensure that households are on opposite sides of the market. The formulation captures in a reduced form the heterogeneity of traders beliefs leading to different allocations between the risky and the riskless asset.
This results in the following sequence of equations: where: 15 The problem of market illiquidity can be softened somewhat by introducing a market maker into the model, but this does not solve the issue entirely. It could still occur that this market maker is not willing to take the counter-party risk is all market participants are trying to sell. 16 To derive the household's orders for shares in the market one could have also followed a more elaborate route and apply the literature on artificial financial markets that use the mean-variance maximization framework of the capital asset pricing model with wealth based portfolio dynamics (Chiarella and He, 2000, Hommes, 2006 X h,t : Actual asset allocation at end of period t − 1, start of period t. W h,t : Total wealth of agent h at the start of period t. C e h,t : Anticipated consumption budget.
X e h,t : Anticipated asset budget to be allocated.
A e h,t : Asset allocation to risky asset, planned at time t.
M e h,t : Anticipated money holdings, planned at time t.
∆X h,t = X e h,t − X h,t−1 : Planned change in asset allocation. Since the change in the total asset allocation can have either sign, we capture both investment and disinvestment into the risky asset. Overall we distinguish several cases (see Table 5): 1. ∆X h,t > 0: The asset budget is anticipated to increase with respect to the current state (note that ∆X h,t = ∆A e h,t + ∆M e h,t ). Subcases are: (a) ∆A h,t > 0: Buy risky assets and withdraw money. This is a net investor who wants to invest in the risky asset. Some money from bank deposits are reallocated to the asset portfolio.
(b) ∆A h,t ≤ 0, ∆M h,t > 0: Sell risky assets and deposit money. This is a seller who wants to liquify risky assets to reallocate wealth from the portfolio to demand deposits, possibly without affecting the total allocation to assets.
(c) ∆C h,t < 0: Buy risky assets and deposit money.
2. ∆X h,t < 0: The asset budget is anticipated to decrease with respect to the current state. This can be achieved either through a decrease in both terms or by an overall decrease and a reallocation between the risky and risk-free asset. Subcases are: (a) ∆A h,t < 0 and ∆M h,t ≤ 0: a seller plans to withdraw money from his bank account and sell risky assets to consume more.
(b) ∆A h,t < 0 and ∆M h,t > 0: a seller wants to increase money holdings and consumption by selling risky assets.
3. C h,t ≥ M h,t : A special case occurs if the agent's consumption budget is larger than current money holdings and the household is rationed so it cannot liquify its assets. There are still risky assets in the portfolio to finance the difference C ht − M ht , but now it turns out that she has to downscale the consumption budget. We assume that the consumption budget is set equal to the actual payment account, and the household completely depletes its current money holdings.

Government
The government mainly has redistributive functions. It levies an income tax on households and a corporate tax on firms. Outlays of the government include unemployment benefits and various transfers and subsidies to firms and households which may be switched on or off depending on the kind of policy experiment one wishes to run. For example, the model allows for subidies to be paid for training which raises the general skills of workers. These subsidies may be paid to firms residing in a specific region or to all firms populating the model. The government calculates its budget on the basis of naive expectations at the start of every year. It projects the revenues and expenditures by multiplying last year's income and expenditure with an anticipated growth rate, respectively.
The government computes its budget once per month. Should the government run a budget surplus it is deposited at the central bank. For simplicity we assume that a deficit is financed through monetization, i.e. the central bank creates fiat money.

Eurostat
The Eurostat agent collects and aggregates microvariables to construct macrovariables. These variables are computed online whenever there is a need for any of the agents to know about these macrovariables.

Market mechanisms 4.1 Credit market interaction
The protocol for matching the firms and banks on the credit market consists of a completely decentralized, bilateral matching algorithm. Firms submit credit requests with multiple banks to apply for a loan. The banks receive and rank all incoming credit requests on a daily basis, and the ranking is based on the risk exposure of the new loan, taking into account the debt-to-equity ratio of the firm. The less riskier credit requests are being served first.
However, if on a particular day many risky firms request a loan, and these loans deplete the bank's "risk-exposure" budget of its "excess-liquidity" budget (see Sect.3.4.2), then the next day some non-risky firms may find themselves credit rationed, even though they are less risky than the firms of the previous day.
In processing the accepted credit requests, the bank takes into account the firm-specific credit risk and its own total risk-weighted assets, i.e. the exposure of its entire loan portfolio according to stylized Basel II standards (capital adequacy ratios). If the credit request is refused, or not fully accepted, the firm has to reduce its planned production quantity up to the point where the planned expenditures (wage bill, capital investments, other financial commitments) can be financed.
If the firm is credit constrained to such extent that it is not able to pay the financial commitments it goes out of business. It goes bankrupt if the firm's equity becomes negative. In case of bankruptcy employees loose their jobs, it writes off a fraction of its debt and stays idle for a certain period before it becomes active again.

Labour market interaction
The labour market is also modelled as a completely decentralized system, with bilateral matching between firms with open vacancies and job seekers. According to the procedures described in the previous sections consumption goods producers review once a month whether to post vacancies. Job seekers check for these vacancies, and if the wage offer exceeds their reservation wage, then the vacancy appeals to them, and they apply for the job. The matching between vacancies and job seekers functions according to the following protocol.
Step 1: The firms post vacancies including wage offers for each general skill group.
Step 2: Every job seeker extracts from the list of vacancies those postings to which he fits in terms of his reservation wage w R h,t net of commuting costs that may arise if he applies for a job in a region where he does not live. Then, he sends an exogenously determined number of applications to randomly chosen firms.
Step 3: If the number of applicants is smaller or equal to the number of vacancies the firms send job offers to every applicant. If the number of applicants is higher than the number of vacancies firms send job offers to as many applicants as they have vacancies to fill. Applicants with higher general skill levels b gen h are more likely to receive a job offer.
Step 4: Each worker ranks the incoming job offers according to the wages net of commuting costs. Each worker accepts the highest ranked job offer at the advertised wage rate. After acceptance a worker ignores all other job offers and outstanding applications.
Step 5: Vacancy lists are adjusted for filled jobs and the labor force is adjusted for new employees.
Step 6: If the number of unfilled vacancies exceeds some threshold the firm raises the base wage offer. If an unemployed job seeker did not find a job he reduces his reservation wage.
This cycle is aborted after two iterations even if not all firms may have satisfied their demand for labor. This may lead to rationing of firms on the labor market and therefore to deviations of actual output quantities from the planned quantities.

Consumption market interaction
The consumption goods market is also modelled as a decentralized system, but not as a bilateral matching protocol. Instead we use some form of local centralization, in which local consumer markets are represented by regional outlet malls in the model, at which the consumption goods producers offer their products at posted prices. This reflects the separation of the production and distribution of consumer products. The malls sell the products to the consumers, and report back the sales returns to the firms. While firms are free to serve all malls regardless of their spatial proximity, the households are limited to choosing the market places located in their region.
Households go shopping once a week and try to spend their entire weekly consumption budget on the product of a single firm. At the beginning of their shopping procedure they receive information about the prices of all available goods at the mall, but they do not receive any information about the available quantities. The decision which product to select is based on a multinomial choice problem with logit probabilities, described in Section 3.2.1.
Households have asynchronized shopping days (there are 5 days per week, and 20 days per month). Thus, on each day of the month there may be some shopping activity in the malls, but by different consumers. The consumption requests for the different goods are collected by each mall on a daily basis, and, if the total demand for a particular product exceeds the mall's inventory level then the mall will apply a proportional demand rationing scheme: the mall sets a consumption quota corresponding to the share of total demand that can be satisfied with the products available. Each household then receives its quota. In case a rationed household did not spend all of its consumption budget at the end of this first round of shopping activity, the left-over budget can be spend on a different product in a second round of shopping on the same day, but with a different firm. Any left-over budget at the end of the week is carried-over to the next week, and gets added to the household's new weekly-budget.
The production of the consumption goods firm follows a fixed time schedule with fixed production and delivery dates. Even if the mall stock is completely sold out it can only be refilled at the fixed delivery date. Consequently, all the demand that exceeds the expected value of the monthly sales and the buffer stock cannot be satisfied.

Financial market interaction
The financial market model closes the macroeconomic simulation model by providing the linkage between the real and financial sector. Center to the financial market modeling is a clearinghouse which organizes the trade of a market index share.
The clearinghouse aggregates the total dividends during the calendar month and computes the dividend that is paid on the market index shares, based on the information it received from the firms and banks on the total dividend payments. There are two assets: risk-free demand deposits at a bank, and a risky asset which is a stock market index, composed of the equity shares of the individual firms.
Firms have a fixed number of outstanding equity shares, but do not issue new shares. They pay out a dividend on their shares that depends on their profits. Banks also have a fixed number of outstanding equity shares that can be traded and pay a dividend. Households can trade shares of the market index (see Section 3.6.3 for households asset allocation). Via the dividend payments on the stock market index firm profits are channelled back into the economy.

Asset pricing mechanism for the market index
We do not assume that the price of the market index at a given point in time leads to market clearing. Furthermore, there is no market maker, and no limit-order book. This is a simplifying assumption made for the reason that the focus of the model is on the macroeconomic dynamics of the real side of the economy. All that is needed is a mechanism to close the model, to redistribute the profits of the firms back into the economy through dividends, and to allow households to trade the ownership rights of the capital stock embedded in the firms.
The price p ix t of a share in the market index depends on the asset trading of households and is computed by the clearing house. Instead of an equilibrium pricing rule, we use a cautious price adjustment rule with limits price changes, reflecting so called circuit breakers on financial markets: where λ ix > 0 is the price adjustment speed, and c and c are limits on the upward and downward price changes of the financial asset, respectively.

Asset allocation mechanism for the market index
The clearing house determines the transactions in the market index shares using a simple proportional rationing mechanism that is based on the ratio Π t between demand and supply. Given a monetary value z h that an investor wants to invest, z h /p t are the corresponding units of shares to trade, where x is the floor operator defined by the largest integer not greater than x. We assume a zero supply of outside shares. If a trader wants to invest a lot and buy many units at the current price, these units simultaneously have to be offered by sellers. Let s ht represent the individual selling orders (in negative units), d ht are the individual buying orders (in positive units), and let D ix t and S ix t be the aggregate demand and supply (in positive units), respectively, then The rationed demand/buy orders B ht and the rationed supply/sell orders S ht are given by

Reproducibility of simulation results
As indicated in the Introduction, the reproducibility of simulation results is an important issue in agent-based computational economics for several reasons. It is essential for scientific quality assurance and the peer-review process that third parties are, in principle, able to check the findings reported in research articles using agent-based models. Furthermore, it is desirable to test the robustness of the results, that is, to check what are the limits of the parameter ranges under which the insights communicated by researchers remain valid. It is also of importance that these parameter ranges are not only explored by the authors of the paper itself, but can also be examined and verified by other researchers who are interested and willing to critically examine, or maybe even to extend, the existing results. Ideally, such a critical examination would involve an independent implementation on a different simulation platform, since it is well-documented that even if serious software verification and validation methods (such as unit testing) are applied, the developed software is prone to have implementation bugs and also numerical issues can not be excluded. Even bugs in the simulation platform itself might influence the simulation results. Whereas such independent re-implementations of existing computational models would certainly be desirable, they are associated to very high costs for scholars that do the reimplementation and it brings relatively little personal gain since the confirmation of existing research results are hardly publishable in major research outlets. Given these obstacles, it would already by an important step forward if a wider research community was able to run existing simulation models, which have been developed in the field and are the basis of research papers, without prohibitive set-up costs. This would not only foster the critical examination of research in this area, but could also help to alleviate the current fragmentation of the research landscape in agent-based computational macroeconomics, which is characterized by a relatively large set of similar models where each of them typically is only used by a rather small group of scholars somehow associated with the developers. Arguably, the actual and perceived set-up costs for working with such a model are also an important factor for this fragmentation. Reducing these actual and perceived costs appears especially important for allowing young researchers, in particular doctoral students, to work in the domain of agentbased macroeconomics by building on existing work and focusing more on the economic aspects of their analyses rather than on the implementation of complex software and data analysis tools.

The ETACE Virtual Appliance
The ETACE Virtual Appliance (VA, cf. Böhl et al., 2014) is an attempt to provide a simulation platform which allows the simulation and analysis of computational results of a well-established agent-based macroeconomic model with minimal setup costs. In its current form, the VA contains the standard version of the Eurace@Unibi model, as described in the previous two sections, but it should be stressed that, in principle, other simulation models running on different simulation platforms could also be integrated into the VA apart from the Eurace@Unibi model. The VA is a stand-alone Linux-based simulation platform that provides a full suite of programmes and tools for agent-based modeling and simulation. It runs as a virtual machine on the user's computer, so all that the user really needs is a client such as Oracle's Virtual Box or VMWare's View Client to import and start the Virtual Appliance. This implies that the use of the VA is completely independent from the actual platform and operating system of the user. Within the virtual machine the core modeling environment is already pre-installed and pre-configured. For the Eurace@Unibi model this is the Flexible Large-scale Agent Modeling Environment (FLAME, as described in Sect. 2.5), as well as some additional programs such as graphical user interfaces for agent-based model design and an integrated solution for data visualization using R. 17 The settings for the simulation experiment to be carried out and the graphical output to be produced is input in a single Graphical User Interface (GUI) called the Simulation GUI. In this GUI the value of each parameter of the model can be altered, experiments based on systematic changes of parameters can be easily set up and the number of batch runs carried out for each parameter constellation can be chosen. Upon running an experiment the system generates a large set of PDF files showing different aspects of the simulation results. In particular, graphs with time series of key statistics (e.g. mean or median) of the batches for the considered parameter variation as well as the full set of time series for each batch and also for each single run are produced for a set of variables, which is chosen by the user. Also, the time window to be shown in the graphs is chosen by the user and filters for the depicted variables (e.g. with respect to region, worker skills etc.) can be added. Furthermore, graphs exhibiting distributions of selected variables at chosen points in time are generated. For the standard parameter setting used in most of the papers that employ the Eurace@Unibi model (i.e. 1600 households, 80 firms) running a batch of 20 simulation runs over 25 years takes between 20 and 30 minutes on a standard desktop computer with two quad-cores. 18 Overall, the VA allows to systematically explore the working of the model as well as to carry out policy experiments (by varying policy parameters in the model) and to provide a detailed analysis of the (statistical) effects of such parameter changes. On the one hand, this allows researchers to examine their own research questions within the framework of this model. On the other hand, the VA allows to reproduce with little effort the main findings reported in several published papers, and to examine the robustness with respect to parameter variations and to generate additional experiments building on the published work. To foster such work the VA includes separate subfolders in which the exact variant of the model, the parametrizations, as well as initializations underlying the research papers Dawid et al. (2014), Dawid and Gemkow (2014) and Dawid et al. (2013) are implemented. Furthermore, for Dawid et al. (2013) different institutional environments for which the policy experiments have been carried out are preconfigured and also some scripts for producing special graphs of the paper (which go beyond the standard functionality of the Simulation GUI) are included.
Although the functionality to reproduce existing results is an important feature of the VA, demonstrating this functionality is not the main focus of this paper. Rather, in the following subsection we illustrate how the VA can be used to obtain a better understanding of the dynamic properties of the model and to carry out robustness analyses. All figures presented in this section are included in the set of graphs that can be automatically generated by the Simulation GUI if the corresponding parameter variation experiments are launched. The ETACE Virtual Appliance thus functions as a kind of vehicle to communicate the various implementations of our model, and it also allows others to reproduce and gain confidence in the results obtained. The overall aim of providing such an extensive software environment to the research community is that this heightens the model's transparency, its credibility, and finally also the model's acceptance as a tool for policy analysis.

Exploring properties of the model using the virtual appliance
Whereas extensive discussions of dynamic and distributional properties of the output generated by the Eurace@Unibi model and their relationship to empirical stylized facts have been provided for example in Dawid et al. (2016), Dawid et al. (2012) or Dawid et al. (2013), here, we only consider the effects of the variation of a few key parameters. Since the degree of competition between firms is a crucial driver for growth, economic fluctuations and industry evolution, we consider first a variation of the parameter γ C . This parameter governs the impact of firms' price differences on the consumers' choice between the products and, therefore, should be interpreted as a measure of differentiation between the products offered by the different consumption good producers (see Section 3.2.1).
Higher values of γ C can be associated to more sensitive consumer responses to price differences and therefore to stronger price competition between the consumption good firms. Figure  1 shows the dynamics of the median across all runs in a batch for increasing values of γ C . Shown are total output of the consumption good, the unemployment rate, the average quality of the capital stock, and the total firm debt. The graphs show the evolution over a time horizon of 4000 (business) days corresponding to 200 months after an initial transient phase of 1500 days. Different qualitative implications of increasing the intensity of competition can clearly be observed.
The stronger individual firm demand reacts to the firm's price relative to its competitors the stronger is the initial growth in the economy and the lower is the unemployment rate (panels (a) and (b)). As can be seen in panel (c) these effects are only to a very small extent driven by differences in firm productivity, but rather by the aggressiveness of (credit financed, debt-led) capital expansion of the firms. Under stronger competition firms tend to price more aggressively (see below) and invest more heavily since they expect a stronger growth of their sales. Such behavior comes at the risk of regular over-investments of firms, which induces stronger fluctuations, and also a high debt level of firms (panel (d)). The case of γ C = 17 illustrates that too large debt levels and the associated interest costs eventually restricts the ability of firms to engage in expanding investments and leads to volatile stagnation in the long run. For even larger values of γ C (not depicted here) the boom based on external financing eventually results in severe crashes (see also van der Hoog and Dawid, 2015).
Apart from time series information the VA also automatically generates distributional plots of variables selected by the user at selected time periods both for each single run carried out and also for the average over all runs in a batch (i.e. for each rank the mean value of the considered variable across the runs in the batch is depicted on a log-log scale). In Figure 2 the distributions (averaged over each batch) of size and price of consumption good firms at the end of the considered time interval are depicted for different values of γ C .
The figure clearly shows that stronger price dependency of demand in the long run results in less equal firm size distributions with a few firms holding a large market share. Intuitively, this effect is driven by the emerging heterogeneity of firms' productivity and unit costs, which for larger γ C results in stronger demand differences across firms. The larger spread of prices, in particular at the lower end of the distribution, for γ C = 17 compared to the lower values, can be clearly seen in panel (b) of Figure 2. This figure also shows that the average price level for high intensity of competition (γ C = 16, γ = 17) is actually higher than for low one (γ C = 10, γ = 13). This is mainly due to a cost effect. As discussed above, for high values of γ C firms are more aggressive in expanding their output. This results in stronger competition on the labor market and a faster wage dynamic. Firms keep increasing their base wage offers as long as they are rationed on the labor market, thereby leading to higher unit costs of firms. Panel (c) of Figure 2, which shows the dynamics of the standard deviation of the output quantity in the firm population, highlights that for small value of γ C the concentration in the industry remains stationary at a relatively low level, whereas for more intensive price competition the differences in firm sizes grow over time. For γ C = 17 this upward trend is stopped once the economy stops growing and enters the stagnation phase.
Having illustrated how the effect of a demand related parameter can be examined using the functionality of the VA we now briefly turn to a supply related parameter. The speed of diffusion of new technologies in the economy is an important driver of growth in the Eurace@Unibi model. A key parameter influencing this diffusion speed is γ v determining the probability that the firm is actually choosing the vintage that yields the largest expected return (see Section 3.2.4). Hence, this parameter can be interpreted as measuring the average quality of the firms' vintage choice decisions. In Figure 3 the effect of an increase in this quality on output, productivity and distribution of firm size and prices is shown. 19 Panels (a) and (b) of the figure show that improving the quality of the vintage choice decisions of firms has substantial positive impact on the evolution of the level of output and that this positive impact is mainly due to an increase in firm productivity. This is not an obvious observation since a larger value of γ v per se does not mean that the firms tend to choose more recent, more productive vintages. Rather, it means that they choose vintages that better fit their skill endowment. Contrary to the expansionary effects triggered by an increase in the intensity of competition parameter γ C , the faster output growth induced by a larger value of γ v is not associated with an increase in the industry concentration (see panel (c)) and it also has only minor effects on the distribution of prices. Since average productivity increases with γ v , the overall price level is negatively related to this parameter, but, as can be seen in panel (d), this effect is almost negligible. The purpose of this brief discussion has been to illustrate how parameter sensitivity analyses and also relevant economic insights can be obtained using output that is automatically generated from the VA if a corresponding experiment is run. A more extensive examination of the dynamic properties of the Eurace@Unibi model is beyond the scope of this paper. However, using the VA such explorations can be carried out with minimal setup costs by any interested scholar.

Conclusions
Over the last decade various contributions to agent-based macroeconomics have been made. They have been proposed as an alternative tool to better understand macroeconomic dynamics and, by now, are actually able to reproduce a large set of important stylized facts. While all these agent-based macroeconomic models are grounded on the assertion that an appropriate account of the macroeconomy should include boundedly rational, interacting, heterogenous agents, and less unrealistic descriptions of the economic institutions and market mechansism, the degree to which the various contributions differ in terms of their modelling set-up is still substantial. Moreover, these models do not only break with the standard assumptions of household and firm behavior and the notion of markets in equilibrium, they are also implemented with the help of rather intricate software platforms. Consequently, a re-iterated claim has been made by scholars in the field that the accessibility and reproducibility of these models needs to be improved at least for two reasons.
First, in order to lower the access costs for young researchers to start working with the agent-based approach which would, in the end, speed up the dissemination of the approach. And secondly, in order to strengthen the credibility of the models and to increase the acceptability and trust in the research findings that stem from agent-based macroeconomic models. A tool that would allow the replication of the simulation results without having to implement the entire model from scratch and being able to conduct robustness analyses on the model by varying several model parameters is generally considered a necessary step forward.
In this paper we have made an attempt to contribute to this direction. First of all we provide for a very detailed description of the Eurace@Unibi model which we have developed over the past decade and applied to study various macroeconomic phenomena and policy questions. Moreover, we introduce and apply the ETACE Virtual Appliance to the Eurace@Unibi model as a tool which allows replications and robustness tests of our agent-based macroeconomic model at very low set-up costs. The VA implements the standard version of the Eurace@Unibi model which we described in this paper. In a nutshell, it is a stand-alone Linux-based simulation platform that provides all the software features needed to simulate and analyze our agent-based macroeconomic model. By running as a virtual machine on the user's computer, anyone who wants to run our model can now do so, independent of the computer platform or operation system he or she uses. Graphical user interfaces and integrated solutions for data analysis of the simulation output make it an easy-to-use tool to run simulation experiments. Parameters of the model can be changed, the number of batch runs as well time spans can be set. Plots are output as PDF files including various statistics such as means or medians across runs. Most importantly, for our default settings, the experiments can be run at reasonable simulation times. We hope that all this work will help to spread the approach to which we, as well as many other researchers, have contributed during the last decades; and which, as we believe, is an interesting and fruitful research agenda.

A Parametrization and initialisation
A.1 Parametrization The model hosts a considerable number of parameters. The most important ones are summarized in Table 7. Values of all parameters are chosen to reflect empirical evidence whenever possible. The ratio of the number of households (workers) and firms matches mean firm sizes to be observed in Europe. The innovation probability is chosen to reflect estimates approximating shifts of the technological frontier. Comparable to data reported in  our calibration yields a growth rate of the technological frontier of around 6% per year if skills were sufficient to fully exploit technological innovations. Wage updates are calibrated to match wage growth in Germany during the decade of full employment in the sixties. The parameter value for the adjustment of the reservation wage is based on reported wage losses of approximately 17% after spells of unemployment in Germany (see , and an average duration of unemployment of 30 weeks. As a proxy for the reservation wage we make use of the net replacement rates of unemployment benefit schemes in OECD countries (see Organization for Economic Co-operation and Development, 2004). For the marginal propensity to save we chose 0.1 which is close to the savings rate in Germany in previous years. The intensity of the consumer choice stems from estimated multi-nominal logit models of brand selection. Estimates based on market data ) provide a lower bound of 6.

A.2 Initialization
In general there are several considerations that constrain the initialization of the agent's state variables. First and foremost, we cannot initialize the variables completely at random. This would violate the internal logic of the model, since in order to obtain a working simulation we have to initialize the agent's balance sheets according to the criterion of stock-flow consistency.
This means that we are constrained to set the initial values such that the balance sheet relationships between agents hold. If the balance sheets would be inconsistent from the start they would remain so throughout the entire simulation.
The second consideration is that we start with plausible values. This is in order to alleviate the initial transient effects that any initialization invariably has. In our experience large path dependencies can be generated by such initial transients, so it is important to carefully consider the interdependencies between the initial values.
• capital price: The initial capital price is assumed to be in a fixed relation to the initial wage that is on average paid in the economy. Even if the investment good firm does not employ workers it has a memory variable wage offer that is used only for the initialization.
• unit costs: The price setting of the investment good firm is a combination of value and cost based pricing. For the cost based price component the investment good firm takes virtual unit costs into account, i.e. a variable called unit costs that is a proxy for the costs which would arise in the production process. Since the costs usually change over time (mainly due to increasing labor costs) this change has to be incorporated in the evolution of the unit costs. In order to have a stable capital goods price in the first months, the unit costs have to be initialized at the same level as the initial capital goods price.
• output: We set the output of a firm at a level such that the total labor demand that is needed for producing the cumulated output would correspond to full employment.
• total units capital stock : The capital stock is set to have a sufficient capital stock in order that the initial production quantity can be produced without additional capital investments.
• total value capital stock : This is an asset on the balance sheet of the firm.
• payment account: The value of the firm's payment account is set to equal the value of its capital stock, such that the firm has sufficient liquidity in the first month to start repaying the initial loan that was inherited from historical investments.
• total value local inventory: The firm has no initial inventory stock.
• initial loan: We start the firms with an initial loan in order to approximate plausible leverage ratios. This will alleviate initial transient effects. The initial loan is set according to a constant leverage ratio of 2.0. This implies that the initial loan is (2/3) of total assets and equity is (1/3) of total assets.
• capital financing per month: We assume that the firm has invested in capital during its history before day 0 (the start of the simulation). The investments are exactly that amount which is necessary to compensate for the monthly depreciation of capital such that the capital stock remains constant. In order to stabilize the simulation with regard to bankruptcies at the beginning we deviate from the usual assumption that the loan obtained for the investments has to be repaid in the standard repayment period of a loan. Instead we allow the initial loan to be repaid in twice the length of time (24 months).
• employee firm id : We assume all households are initially unemployed.
• wage reservation: The reservation wage is set equal to the firms wage offer, such that households accept job offers in the first month.
• mean net income: Mean net income is set equal to the reservation wage.
• payment account: Households have an initial payment account equal to 15 monthly wages, to represent a plausible savings buffer.
• assets owned : The households asset portfolio is scaled to yield a wealth level that is reasonable. Each household is endowed with an equal number of index shares, with a price such that the total value of the initial portfolio is 10 (each household has risky-asset wealth equal to 10 monthly mean wages).
• wealth: Households' initial total wealth consists of liquid money holdings in the payment account and illiquid asset holdings. Together with the payment account of 15 monthly wages the initial total wealth of each household is 25.
• number of shares: The number of index shares is scaled to the total number of firms and households.
• weight: The weight of the firms in the index share is uniform. This is needed to compute the dividend per index share from the total dividend payment of the firms.

Symbol Description
Consumption goods market P[Consumer h selects product i] Probability for household h to select product î D i,r,t Estimated demand for product i at local regional market r D i,t Estimated demand for product i in the total market S r,t Estimated market size of local regional market r S t Estimated size of the total market D i,r,t Planned delivery volume of firm i to local market r Y i,r,t Critical inventory stock of firm i at local mall r S i,r,t Current inventory stock of firm i at local mall r σ 2 (D i,r,t ) Estimated variance of the demand distributioñ Q i,t Planned production quantity Investment goods market

Variable costs of production
Continued on next page Notional investment in vintage v at period τ of the planning horizon L i,t+τ Expected labor demand at period τ of the planning horizon g P rod r,t Average regional productivity growtĥ L i,t+τ,t+τ −l Expected value of a loan in the period t + τ (second subscript) which has been raised in t + τ − l (third subscript). r i,t+τ −l Interest rate for which the loan was accepted M i,t+τ −1 Expected financial resources at the beginning of t + τ π i,t+τ Notional profits in period τ of the planning horizon Exp i,t+τ Expected expenses in period τ of the planning horizon R i,t+τ Expected revenues in period τ of the planning horizon C V ar i,t+τ Expected fixed costŝ C F ix i,t+τ

Expected variable costs
Continued on next page

B Eurace@Unibi Model -Function references
In the following we provide a list of functions and a description of what they do as implemented in the C-code. Table 9: List of functions for Firm agent.

Firm_calc_production_ quantity
Firm calculates the intended production volume depending on the current stocks in the malls.

Firm_set_quantities_zero
Dummy: no production on not day of month to act

Firm_calc_input_demands
Firms calculate the labor demand and the demand for capital goods.

Firm_calc_production_ quantity_2
Firms iterate over the planned production quantity decreasing it incrementally, such that the corresponding labor demand and capital demand can be financed by the actually obtained financial resources, AFTER all prior financial commitments have been paid.

Firm_send_capital_demand
Firm sends demand for capital goods to the capital goods producer.

Firm_receive_capital_ goods
Firm receives machines from the capital goods producer.

Firm_execute_production
Firm executes the production process.

Firm_calc_pay_costs
Firm pays investment costs and the wage bill. Additionally, the new mean wage and the new average specific skill level are computed.

Firm_send_goods_to_mall
Firm distributes the produced units of goods to the malls. If realized output is below planned output, the malls are only delivered with a proportional share of their planned delivery volumes.

Firm_calc_revenue
Firm computes revenues and profits and pays out dividends to households.

Firm_compute_sales_ statistics
Firm computes sales figures. This information is required for the production planning at the beginning of the next production cycle.

Firm_update_specific_ skills_of_workers
Specific skill levels of workers are updated due to learning on-the-job, so the firm updates its data on specific skill levels of its employees.

Firm_receive_account_ interest
Firm receives interest on its payment account.

Firm_ask_loan
Firm contacts banks to request a loan and communicate its balance sheet data. Continued on next page Table 9 -continued from previous page -List of functions Name Description

Firm_get_loan
Firm obtains a loan from a bank, adds the loan to its liabilities and stores all loan information (bank id, size, interest rate, duration).

Firm_compute_financial_ payments
Function to compute the prior financial commitments of the firm: interests, installments, taxes.

Firm_compute_income_ statement
Function to compute the income statement of the firm.

Firm_compute_dividends
Function to compute the total dividend payout of the firm.

Firm_compute_total_ financial_payments
Function to compute the total financial payments of the firm: interest, installments, taxes, production costs, dividends.

Firm_compute_balance_ sheet
Function to compute the balance sheet of the firm.

Firm_set_bankruptcy_ insolvency
Function to set the type of bankruptcy to 'insolvency' and go to end Firm state. Also sets the active flag to 0 and starts the bankruptcy idle counter (out-of-business period).

Firm_bankruptcy_reset_ immediately
Function to reset a list of selected variables immediately when the Firm goes bankrupt.

Firm_compute_total_ liquidity_needs
Function to compute total liquidity needs: (1) financial liquidity needs: to finance interest + debt principle + taxes + dividend payment (2) production liquidity needs to finance production costs: wage bill + capital investments Firm_check_financial_ and_bankruptcy_state Function that checks the balance sheet and sets flags for the bankruptcy-or financial crisis state.

Firm_set_bankruptcy_ illiquidity
Function to set the type of bankruptcy to 'illiquidity' and then go to end Firm state. Also sets the active flag to 0 and starts the bankruptcy idle counter.

Firm_bankruptcy_reset_ immediately
Function to reset variables immediately when the Firm goes bankrupt.

Firm_set_minsky_state_ crisis
Firm sets Minsky state in case of a financial crisis (which can always be resolved by down-scaling dividends or the production level).

Firm_in_financial_crisis
Function to resolve the financial crisis by reducing dividends.

Firm_not_in_bankruptcy
Idle function to transit from state Firm bankruptcy checked to state Firm checks financial crisis.

Firm_execute_financial_ payments
Function to execute financial payments.

Firm_send_subsidy_ notification
Function to send a subsidy notification message to the government.

Firm_send_transfer_ notification
Function to send a transfer notification message to the government.

Firm_bankruptcy_ insolvency_procedure
Function to process the bankruptcy condition in case of insolvency.
Continued on next page

Firm_bankruptcy_ illiquidity_procedure
Function to process the bankruptcy condition in case of illiquidity.

Firm_bankruptcy_reset_ delayed
Functio to reset a list of delayed variables after the firm is bankrupt.

Firm_bankruptcy_idle_ counter
Function to decrease the bankruptcy idle counter by 1. Note that a negative counter simply means the re-activation condition has not yet been satisfied at the end of the default idle period.

Firm_remains_in_ bankruptcy
Function to determine at the end of the bankruptcy idle period whether the firm has managed to re-surface from bankruptcy by debt-rescaling or other measures (condition to remain in bankruptcy: positive external financial needs).

Firm_reset_bankruptcy_ flags
Function to reset the bankruptcy flags when the bankruptcy process has finished.

Firm_check_minsky_class
Function to set the type of firm according to Minksy's Financial Instability Hypothesis.

Firm_set_minsky_state_ bankruptcy
Function to set the Minsky subclass in case of bankruptcy.

Firm_calculate_specific_ skills_and_wage_offer
Calculation of the specific skills in the firm and of the wage offer in this period.

Firm_send_vacancies
If additional workers are needed the firm sends vacancy messages specifying the different wage offers for different general skill groups.

Firm_send_redundancies
If the firm wants to decrease the workforce it sends redundancies.

Firm_read_job_ applications_send_job_ offer_or_rejection
Firm reads the application, ranks the applicants according to their general and specific skills and sends as many job offers to the first ranked applicants as the firm has vacancies to fill. The other applicants are rejected.

Firm_read_job_responses
The firm reads the responses to their job offers and updates the number of employees and the number of vacancies.

Firm_read_job_quitting
The firm reads quitting messages and updates the number of employees and the number of vacancies.

Firm_update_wage_offer
The firm increases the wage offer if there are vacancies left.

Firm_send_vacancies_2
If additional workers are needed the firm sends vacancy messages specifying the different wage offers for different general skill groups.

Firm_read_job_ applications_send_job_ offer_or_rejection_2
Firm reads the application, ranks the applicants according to their general and specific skills and sends as many job offers to the first ranked applicants as the firm has vacancies to fill.The other applicants are rejected.

Firm_read_job_responses_ 2
The firm reads the responses to their job offers and updates the number of employees and the number of vacancies. Continued on next page Table 9 -continued from previous page -List of functions Name Description

Firm_read_job_quitting_2
The firm reads quitting messages and updates the number of employees and the number of vacancies.

Firm_update_wage_offer_2
The firm increases the wage offer if there are vacancies left.

Firm_send_random_ redundancies
Firm sends redundancy messages with some probability.

Firm_reset_variables
Function to reset firm balance sheet flow variables. Activation: 1st day of calendar month.

Firm_receive_data
Firm reads messages from Eurostat agent.

Firm_send_data_to_ Eurostat
Firm sends data message to Eurostat agent including micro data from the balance sheet.

Firm_compute_stock_flows
Firm computes stock and flow variables for balance sheets.

Firm_send_payments_to_ bank
Firm sends end-of-day payment account data to the bank to update its payment account (netting of payments by firm).

Household_rank_and_buy_ goods_1
Household collects information on the range of provided goods and makes her purchasing decision (first round of shopping).

IGFirm_update_ productivity
IGFirm updates productivity if there was a successful innovation.

IGFirm_calc_research_ employees
IGFirm calculates the number of needed research employees.

IGFirm_send_quality_ price_info
IGFirm send the price and productivity of their capital goods.

IGFirm_calc_production_ quantity
IGFirm determines the production quantity.

IGFirm_calc_input_ demands
IGFirm determines the needed inputs.

IGFirm_calc_production_ quantity_2
IGFirm determines the production quantities again if there are financial constraints.

IGFirm_produce_capital_ good
IGFirm produces the capital goods.

IGFirm_calc_pay_costs
IGFirm calculates the actual costs and pays wages.

IGFirm_send_capital_good
IGFirm sends the capital goods to the firm.

IGFirm_calc_revenue
IGFirm calculates the revenue and profits.

IGFirm_reset_variables
Function to reset IGFirm balance sheet flow variables. Activation: 1st day of calendar month.

IGFirm_receive_data
IGFirm reads messages from Eurostat agent.

IGFirm_send_data_to_ Eurostat
IGFirm sends a data message to Eurostat agent including micro data of the IGFirm's balance sheet.

IGFirm_compute_stock_ flows
IGFirm computes stock and flow variables for balance sheets.

IGFirm_send_payments_to_ bank
IGFirm sends end-of-day payment account data to the bank to update its payment account.

Eurostat_send_data
Eurostat sends macro (economy-wide) and meso (sector) data to all agents.

Eurostat_calculate_data
Eurostat calculates the global and regional macro data based on the received micro data.

Eurostat_store_history_ monthly
Eurostat stores monthly macro data in its history data structure.

Eurostat_compute_growth_ rates_monthly
Eurostat computes monthly growth rates for macro data stored in its monthly history data structure.
Continued on next page

Eurostat_store_history_ quarterly
Eurostat stores quarterly macro data in its history data structure.

Eurostat_compute_growth_ rates_quarterly
Eurostat computes quarterly growth rates for macro data stored in its quarterly history data structure.

Eurostat_measure_ recession
Eurostat measures the start and end of recessions.

Bank_read_policy_rate
The bank reads policy rate and updated risk free rate.

ClearingHouse_send_ index_info
Computes the dividend for the stock index, and sends the index info message (dividends per unit of the index bond).

ClearingHouse_send_ index_price
Function to send the index price message daily, at start of every iteration.

ClearingHouse_receive_ orders
Function to read the order messages, and add these to the pending orders list.

ClearingHouse_compute_ transactions
Function to process the pending orders, and compute transactions.

ClearingHouse_send_ transaction_info
Function to send the processed orders.

ClearingHouse_receive_ dividend_info
Function to read the dividend info messages from firms. Runs daily, at the end of every iteration to compute daily dividends.

ClearingHouse_update_ price
Function to update the stock index price.