An artificial Wicksell–Keynes economy integrating short-run business cycle and long-term cumulative trend

Economists have investigated how price–wage rigidity influences macroeconomic stability. A widely accepted view asserts that increased rigidity destabilizes an economy by requiring a larger quantity adjustment. In contrast, the Old Keynesian view regards nominal rigidity as a stabilizing factor, because it reduces fluctuations in income and thus aggregate demand. To examine whether price–wage stickiness is stabilizing or destabilizing, we build an agent-based Wicksell–Keynes macroeconomic model, which is completely closed and absolutely free from any external shocks, including policy interventions. In the model, firms setting prices and wages make both employment and investment decisions under demand constraints, while a fractional-reserve banking sector sets the interest rate and provides the firms with investment funds. As investment involves a gestation period, it is conducive to overproduction, thereby causing alternate seller’s and buyer’s markets. In the baseline simulation, a stable economy emerges with short-run business cycles and long-run fluctuations. One unique feature of the economy is its remarkable resilience: When afflicted by persistent deflation, it often manages to reverse the deflationary spiral and get back on a growth track, ultimately achieving full or nearly full employment. The virtual experiments demonstrate that prices and wages must both be moderately rigid to ensure long-run stability. The key stabilizing mechanism is a recurring demand-sufficient economy, in which firms are allowed to increase employment while simultaneously cutting real wages.


Introduction
Macroeconomists have raised the thought-provoking question of whether increased price-wage rigidity 1 is stabilizing or destabilizing (Dutt 1986;De Vroey 2006). 2 The dominant view supported by mainstream macroeconomists (e.g., Modigliani 1944;Lucas 1978) is that large quantity adjustments, e.g., severe unemployment and its consequences, result from price-wage rigidity. 3 Conversely, wages fall so long as unemployment exists, which increases profits and thus employment "until all the unemployed are absorbed" (Lerner 1936, p. 38). In contrast, another view, the socalled Old Keynesian view, regards price-wage rigidity as a stabilizing factor, because it reduces fluctuations in aggregate nominal income and thus aggregate demand (Tobin 1975;Iwai 1981;Chiarella and Flaschel 2010). 4 This raises a question: How does the degree of price-wage rigidity affect the autonomous stability of a monetary economy? To answer this question, we must first address the question of whether a macroeconomy with a fractional-reserve banking system is inherently stable. This question of autonomous stability seems more essential regarding deflation than inflation for two reasons: (1) an expansionary process naturally comes to a halt when eventually faced with supply constraints [see, e.g., Chapter 21 of Robinson (1979)], and (2) conventional monetary policy seems ineffective once a commonplace, short-lived recession, often triggered by a bubble bursting, turns into persistent deflation. For these reasons, we address a fundamental question of a macroeconomics: Does a monetary economy have a self-correcting mechanism that can reverse a deflationary spiral? We also explore how the nominal rigidities of prices and wages are involved in the stabilizing mechanism. Hence, the main aim of this paper is to answer these questions by constructing and analyzing an agent-based macroeconomic model with demand-constrained firms that set prices and wages.
Here, we explore macroeconomic instability caused by various positive feedback relationships between the determinants of aggregate demand. In particular, we focus on fluctuations in real aggregate demand that arise regardless of whether a financial system is robust. 5 Unquestionably, financial crises cause tremendous damage to real 1 The degree of price-wage rigidity varies depending on the time and place. The rigidity of nominal wages, for example, reflects social norms, as well as attributes of the labor market, such as the degree of labor mobility and regulations when employees are discharged. For more discussion on wage rigidity, see Yellen (1984), Campbell III and Kamlani (1997), Kuroda et al. (2007), Kuroda and Yamamoto (2006), and Kaur (2012). 2 See also Fisher (1933), Pigou (1943); Tobin (1975); Yoshikawa (1981); Iwai (1981); De Long and Summers (1986b). 3 Even the core principle of Keynesian economics is commonly interpreted in this way, as Tobin (1993) pointed out. Ball et al. (1988) asserted that "(a)ccording to the Keynesian view, fluctuations in output arise largely from fluctuations in nominal aggregate demand. These changes in demand have real effects because nominal wages and prices are rigid" [p. 1]. 4 Iwai demonstrated that it is wage rigidity, rather than flexibility that stabilizes the monetary economy (Iwai 1981, pp. 162-163). Flaschel and Franke (1996) demonstrated that if wages are flexible, the equilibrium will be unstable. See also Chiarella and Flaschel (2010, pp. 367-368) and Flemming (1987). Tobin (1975) and Yoshikawa (1981) demonstrated that price flexibility under the Keynesian adjustment mechanism is a disequilibrating factor. 5 For this reason, we pursue ways to stabilize aggregate demand, and our model ignores financial instability or systemic risk that can result from the complex interactions of asset prices, debt rigidity, and contagion in economies. It is also true, however, that a crisis is often preceded by a period of credit expansion (Kaminsky and Reinhart 2000), which is mostly an endogenous consequence of increased real demand (Chapter 9, Yoshikawa 1995). More specifically, we focus on the dynamics of real wages for the following reasons. First, real wages are a decisive determinant of consumer spending, which constitutes a significant part of GDP. 6 Second, changes in real wages influence labor demand. Third, real wages affect investment demand directly by affecting the cash flow of firms as well as the relative cost of capital stock. 7 Consequently, the speed of price-wage adjustment to supplydemand gaps, which determines how real wages move, is crucial in determining both aggregate demand and the profitability of employment as well as investment and thus the level of macroeconomic stability.
Macroeconomic instability is a consequence of various positive feedback relationships. Wicksell (1936) observed the positive feedback dynamics among prices, investment, and credit creation, which is described as a cumulative process. In particular, when the credit supply is endogenously determined by a fractional-reserve banking system, the cumulative interdependence between investment and credit supply causes "inherent instability of credit" (Hawtrey 1962, pp. 166-174). 8 This cumulative process tends to be intensified by positive feedback relationships that Iwai (1981) found between prices and wages set by individual firms and their average levels. For example, deflation is difficult to stop deflation once it starts: In a deflationary period, any attempt by an individual firm to reduce its price below the average price to secure demand for its products is likely to be unsuccessful; rather, it will result in an even lower average price, because its competitors will also lower their prices.
Conversely, prices (output prices, nominal wage rates, and interest rates) can counteract these feedback loops: Price adjustment is expected to stabilize an unstable economy by closing the supply-demand gaps generated by both by individual agents and by the overall economy. Old Keynesians are cautious about the positive feedback loop, whereas mainstream macroeconomists trust the stabilizing effect of prices. Accordingly, macroeconomic stability would ultimately seem to depend on which force dominates: the disequilibrating effect of positive feedback loops, or the equilibrating effect of price adjustments.
We thus constructed an agent-based macroeconomic model that captures these two opposing effects in an attempt to elucidate an elementary mechanism operating in Footnote 5 continued a financial network. See Gertler and Hubbard (1989), Stiglitz and Greenwald (1992), Kiyotaki et al. (1997), Fostel and Geanakoplos (2008), and Battiston et al. (2012). 6 Moreover, the direction of change in consumer spending is the key determinant of investment (Ellis 2005, Chapter 2). Consumption demand depends on real labor income, which equals total employment multiplied by real wages. Because employment lags behind output, real wages represent the key variable in forecasting real consumer spending. Ellis (2005) asserted that "[in] my estimation, real average hourly earnings is the most effective single leading indicator of consumer spending" (p. 121). 7 Low real wages have a positive impact on investment by increasing profits. In the long run, however, they discourage investment by making capital stock less attractive. See Lerner (1936, p.38) and Lange (1944, p. 10). 8 Increased demand for loans in response to increased investment demand "leads to an increase in the aggregate amount of purchasing power, which in turn still further increases the profit rate" (Hawtrey 1913, p. 76), thus further stimulating investments. the complex interactions among agents. We consider the agent-based approach 9 to be a natural methodology choice, because the autonomous stability of an economy has a self-emerging nature (Kirman and Kirman 1992;Fagiolo and Roventini 2017). 10 Delli Gatti et al. (2011) elaborated that macroeconomic outcomes should be explained as "emerging from the continuous adaptive dispersed interactions of a multitude of autonomous, heterogeneous and bounded rational agents" (p. vii, emphasis in original). Macroeconomic research using the agent-based approach has been vibrant (e.g., Dosi et al. 2010Dosi et al. , 2019Dawid et al. 2012Dawid et al. , 2018. Delli Gatti et al. (2005Gatti et al. ( , 2007Gatti et al. ( , 2008 explained that complex interactions between firms and the banking system give rise to financial fragility. Delli Gatti et al. (2006Gatti et al. ( , 2009Gatti et al. ( , 2010 demonstrated that a default by one agent can generate a bankruptcy crisis throughout a network. Lengnick and Wohltmann (2013) combined an agent-based model of financial markets and a New Keynesian macroeconomic model with learning agents to answer questions on international trade policy.
Our virtual experiments show that an economy is stabilized when prices and wages are both moderately rigid. Taylor (1986), Yoshikawa (1995), andSummers (1986a, b) suggested that reduced flexibility of prices and wages should lead to improved economic performance. Our simulation results are reasonably consistent with those empirical findings. Moreover, in a stable economy, both short-run business cycles and long-run fluctuations emerge. Given the powerful positive feedback loops mentioned above, it seems difficult, without some counteractive policy intervention, to reverse a downward process once it starts. Interestingly, however, our simulated economy often times exhibits a remarkable resilience: It gets back on a growth track and achieves full or nearly full employment by reversing a persistent deflationary spiral that occurs in the initial adjustment period.
Close examination of the simulated behaviors of key macro-variables reveals the following key condition for stability: A slow reduction in real wages during a demandsufficient economy produces the above resilience. When a majority of firms follows the "price-marginal cost principle" without being constrained by a demand condition (Negishi 1979), firms tend to reduce their real wages by raising their commodity prices and simultaneously increase employment, thus increasing the aggregate income and demand. Therefore, to gain autonomous stability, an ample number of demandsufficient periods must emerge during deflation, so that the employment expansion in each of these periods successively eliminates the unemployment accumulated over time.
The simulation study demonstrated that an economy with highly flexible nominal wages fails to satisfy the above stabilizing condition and causes a destabilizing positive feedback loop between falling real wages and aggregate demand. This is because, for a given level of unemployment, a substantial reduction in wages will decrease employment, thus reducing real labor income so that the amount of employment is more likely to be demand constrained and smaller than that in the previous period. 9 An analytical solution of the model might be interesting and useful, and we leave it for a future work.
With a similar mechanism, excessive flexibility in prices-by causing a large reduction in real wages in a demand-sufficient period-also tends to induce a demanddeficient economy prematurely, i.e., before sufficiently reducing unemployment. Thus, highly flexible prices and wages destabilize an economy. These results are largely consistent with the Old Keynesian view. Conversely, extreme nominal rigidities are also destabilizing. Excessive wage rigidity prevents the downward adjustments of real wages that are required for investment to gain profits, thus keeping investment inactive. Similarly, excessive price rigidity keeps price levels from rising during a demand-sufficient period. This failure in reducing real wages prevents both labor demand and investment demand from increasing. Thus, excessive nominal rigidity in prices and wages decreases both the aggregate demand and productive capacity over a long period of time. This poor performance due to a lack of price adjustment supports the mainstream view.
Our model is completely closed and absolutely free from any external shocks. It incorporates three elements: (1) firms setting prices and wages, (2) debt-financed investment, and (3) endogenous credit supply. The first and third elements give the model a Wicksellian flavor without resorting to the Taylor rule. 11 The second element, together with demand deficiency per Negishi, gives a Keynesian-Minskian flavor to the model, because firms make their investment decisions based on expected future profits (Minsky 1975;Negishi 1979). Investment in our model involves a gestation period, which naturally induces alternating seller's markets and buyer's markets, thereby inducing business cycles (Robertson 1915). In addition, the model assumes that firms adaptively form expectations about output prices, wages, and interest rates, as well as demand for their products. 12 The rest of this paper is structured as follows. Section 2 describes the model and our basic assumptions. Section 3 explains the simulation setting. Section 4 shows the results obtained from the simulation. Finally, Sect. 5 presents and discusses the underlying mechanism.

Model
To explore the autonomous stability of a monetary economy, we designed the model to be completely closed and free from any exogenous disturbances. For this purpose, the model does not allow the government or central bank to control policy variables. In addition, to focus on the essential dynamics of aggregate demand, it neglects distributional aspects between workers and capitalists, and between debtors and borrowers. For example, to avoid the complicating effect of financial instability, it does not deal with the balance sheet effects of borrowers (financial accelerator mechanism) or lenders 11 The Taylor rule, which is common in the literature on disequilibrium models, is used to determine the interest rate, which makes the money supply an implicit policy variable. Therefore, it is difficult to attribute a change in the interest rate to either a change in base money initiated by the central bank or to an endogenous change in response to the level of output or prices. As a result, it is difficult to pursue any question concerning the extent to which a capitalist economy is robust or self-correcting without policy intervention. 12 These adaptive expectations seem consistent with Keynes's view on an uncertain future. For more detail, see Keynes (1937, p. 214).
(capital crunch mechanism) on a bank's lending behaviors. 13 In this section, the first subsection overviews the model. The second subsection briefly describes the model's agents. The third subsection explains the market and transaction process. In addition, "Appendices A-C" provide more detailed explanations of the model.

Model overview
The model is formulated in discrete time (t = 1, 2, . . . , T ). It consists of a finite set H of households (h = 1, . . . , H ), a finite set F of firms ( f = 1, . . . , F), and a single bank. There are three markets, for bonds, labor, and goods. The firms produce a homogeneous output by using the two inputs of labor and capital goods. The output is either consumed or invested. It is perishable when consumed, whereas it becomes durable capital stock when invested.
Each firm routinely undertakes a sequence of activities in each period-setting prices and wages and determining employment, investment, and production-and repeats the cycle for as long as it is financially viable. These decisions are seen as satisficing behaviors of the firms in an uncertain environment. 14 The way the firms construct and own capital stock instead of renting it from households incorporates the fixity of capital stock into the model. 15 In particular, the gestation period gives rise to a time lag between an order for capital stock and its completion, thus producing output gaps, which lead to either a seller's or a buyer's market, thereby generating a business cycle. 16 The bank holds fiat money FM, or no interest-bearing government notes, as its reserves. It supplies a long-term investment loan L to a firm. 17 Each household or firm keeps a non-interest-bearing account at the bank, on which they can draw checks. All subsequent payments and receipts are settled in the form of changes in the account balances. Therefore, the total money supply M1 is the total of the balances of all the checking accounts. When facing a shortage in reserves, the bank issues bonds of oneperiod maturity to raise funds from households. Since its maturity period is short, we regard this bond as near money. Assuming no reserve requirement for bonds, the total 13 For financial accelerator models, see e.g., Gertler and Hubbard (1989), Bernanke and Gertler (1989), and Bernanke et al. (1996). For capital crunch models, see, e.g., Stiglitz and Greenwald (1992), Peek and Rosengren (1995), and Kashyap et al. (1994). 14 Our firms are restricted to reactive stimulus-response behaviors such as adaptively updating decisions in response to realized outcomes. Sinitskaya and Tesfatsion (2015) proposed modeling agents as constructively rational decision-makers with intertemporal goals. 15 Uzawa (1969) elaborated the investment behavior of business firms according to the concept of real capital. Uzawa (1986) demonstrated that the nonexistence of an investment mechanism in a neoclassical model is a logical consequence of the assumption that real capital is freely traded in the market, similarly to financial assets (Chapter 5). 16 This is considered one of the major causes of fluctuations in the marginal efficiency of capital. More specifically, a builder purchases investment goods from firms over the gestation period, i.e., the time required to build capital goods. Aftalion (1927) attributed the lengths of cycles to the gestation periods of capital goods. See also Robertson (1934, p. 14), Haberler (1958 Kydland and Prescott (1982) and Majd and Pindyck (1987). 17 The bank starts crediting a firm for construction when the construction starts, but the firm starts payment to the bank after completing the construction. money supply M2 becomes the sum of M1 and outstanding bonds B, and it varies over time according to the bank's lending activity.
In any given time period t, 14 events occur in the following order (see "Appendix A" for a more detailed explanation): 1. Each firm makes interest and principal repayments on its loan balances to the bank. 2. Each firm forms an expectation about the demand for its product according to the price relative to those of its competitors and the aggregate demand in the previous period. 3. Each firm revises its take-it-or-leave-it prices and wages according to individual performance in the product and labor markets. 4. Each household determines its consumption demand. 5. The bank determines the supply of bonds, and households determine the demand for them. The bond market opens to determine the amount of bonds that the households purchase from the bank. 6. Each firm pays out an amount from its current checking account (monetary balance) in excess of the initial amount as a dividend to its owner household. If the firm is short, it receives a capital injection equal to the shortfall from its owner. 7. The firms determine their employment demands. The labor market opens, and the firms and workers agree on forward labor contracts. 8. Each firm employs workers to produce output. 9. Each firm forms expectations about long-run demand and the rate of profit to determine the demand for new investment. 10. Each firm determines its demand quantity of new orders of capital stock according to the supply prices of all firms. We assume that a submarket for continuing investment opens first to avoid interrupting construction work. Then, a submarket for consumption goods and new investments opens. The outcomes of these submarkets determine the quantities and market prices for all transactions. 11. The bank makes principal and interest repayments of bonds to the households. 12. Each firm receives revenue from sales of its products to other firms and households.
It also pays wages to its employees and thus calculates its current cash flow as sales revenue minus the cost of wages and bank payments during event 1. 13. The bank calculates its cash flow and pays it as a dividend to the households, which determines the level of household incomes. The bank also revises the interest rates for bonds and loans that will be effective in the next period. 14. All the agents update their balance sheets to reflect all of the transactions that took place during the period.

The roles of agents
This subsection provides a brief description of the roles of agents. Tables 1 and 2 list the model's parameters and variables, respectively, together with brief descriptions of them.   Likewise, subscripts f and F indicate a firm f and the aggregate of all firms, respectively. Superscripts s, d, and * indicate supply, demand, and target (desired) levels, respectively. For example X F indicates the sum of X over all firms, i.e., X F = f ∈F X f b The symbol "^" indicates the expected or estimated value. For example,X is the expected value of X c The numeric values in this column were the initial values for the baseline case in our simulation d This value was determined endogenously by the steady-state conditions e θ B and (1 − θ B ) represent the initial ratios of bonds and money, respectively, to the bank's total debts. Note that the initial equity of the bank equals FM

Households
Each household buys consumption goods and bonds and provides labor services for a one-period labor contract. To avoid distributional issues, we assume that each household runs one family business, so that a household includes both workers and capitalists in the same proportion. 18 As a result, there is one-to-one correspondence between the two sets, H and F, i.e., H = F. Except for such ownership of firms, all households are structurally identical at time 0, in that they each have the same Keynesian consumption function, the same labor endowmentN man-hours, and equal shares in the bank.
First, we derive the consumption demand, followed by the bond demand. In period t, household h works N h f ,t man-hours for firm f , which pays w f ,t for each working hour. The household also earns interest income on its bond holdings r B t B h,t−1 and dividend payments Div h and Div B h from firm h 19 and the bank, respectively. 20 Thus, the household's total income in period t is given by where the total quantity of employment, Fiat money can be considered as a special form of government bond that does not yield interest. Following the neutrality argument of Ricardo, e.g., Barro (1974), it seems reasonable not to regard fiat money as constituting the net wealth of a nation, because it has been accumulated to finance national debts. 21 Consequently, at the end of period t − 1, a household has a total wealth A h,t−1 consisting of its monetary (checking account) balance M h , bonds B h , and net equities in its firm, E h , the bank E B h , and the government, E G h : as summarized in Table 3(a). 22 We assume that the desired level of nominal consumption is given by the following consumption function: where the coefficients satisfy 0 < c w < c y < 1. A Keynesian consumption function with a large value of c y is reasonably consistent with consumer behavior, according to Akerlof (2007): (1) households make consumption decisions based on "how much they feel entitled to spend," and (2) the amount depends largely on "what they are currently earning" (p. 8). 23 Then, consumers adjust their consumption demand N C d h,t toward the desired level N C * h,t with an inertia weight δ c : To derive the bond demand, we first obtain the total liquid assets, , that are available to households at the beginning of period t. By adding the redemption of bonds and current savings to the end-of-period money holding, we get Footnote 21 continued consumption from the wealth effect. This would not, however, alter our main results, because this positive wealth effect could be offset by a proportional reduction in the value of c w below. 22 Using E B h = 1 H E B and E G h = 1 H E G for all h and t (t is omitted) and summing up the values given by Eq.
(2), we can verify that the total net wealth of the economy is the total of two types of capital stock: where subscripts H and F indicate aggregate households and aggregate firms, respectively. 23 A consumption function with a wealth term such as that in Eq. (3) could reasonably be called Keynesian because one of the main motives for people refraining from spending is the accumulation of wealth [see Keynes (1936, pp. 107-108)]. Alternatively, we could call Eq. (3) a consumption function in the life cycle hypothesis (Ando and Modigliani 1963). The life cycle model remains valid and has been used to study various questions for decades (e.g., Dynan et al. 2002;Deaton 2005). Muellbauer (1988, p. 54) explained that, if the utility function of habits is homothetic, then the derived consumption function in period t will "justify a perfectly conventional partial adjustment mechanism." Moreover, Carroll and Weil (1994) and Fuhrer (2000) found that a model of consumption with habit formation supported the empirical findings.
L and L c are the outstanding long-term and construction credit, respectively E G is the negative assets, i.e., the cumulative government debt, owed by taxpayers, i.e., households We follow Cagan (1956) in specifying the following form for the (long-run) money demand function: 24 where a M represents the strength of money demand, a y > 0 is the income elasticity, and a r > 0 is the semi-elasticity of the interest rate. Here, P t is the general price level calculated as a weighted average of prices, i.e., and X f ,t are the price and level, respectively, of output produced by firm f in period t. The bond demand, in turn, is determined as a residual: Households enter the respective markets with a constant labor supplyN , nominal consumption demand N C d , and bond demand B d .

Firms
Firms earn revenue from the sales of goods to customers: consumers for consumption goods, and other firms for investment goods. The firms all have the same production function and the same initial equity in the form of money, i.e., E f ,0 = M f ,0 . They not only have different total amounts of capital stock and debt, however, but different compositions, as well.
Each firm must first determine its commodity price and wage rate in an uncertain business environment according to its previous experience with the supply-demand gaps in the respective markets . Then, a firm makes output and input decisions on the basis of these prices and the expected demand. Firm f produces output Q f ,t with a Cobb-Douglas production function using capital and labor: where K f ,t−1 denotes the firm's capital stock and N f ,t denotes the quantity of labor. Parameter A represents the efficiency of the production process, while parameter α represents the share of capital in the production function. Throughout this paper, we only consider an economy without technological progress. A firm estimates its investment and consumption demands to determine how much it should produce.
Let I d f ,t and C d f ,t correspond to the demands for the products of firm f in the investment and consumption goods markets, respectively. Then, the total demand for the output of firm f is The firm undertakes an investment project I d f ,t by using a construction credit L c , which is supplied by the bank, if the firm is profitable and its capital stock is short. The investment function is also Keynesian, because the volume of orders for new investment goods depends on the current cash flow and the level of demand that the firm expects for its products. (See event 10 in "Appendices A and B" for more detailed explanations.) The firm consecutively purchases φ units of the investment goods produced by other firms over a gestation period g to build one unit of capital stock. Once a completed unit of capital stock is installed, it will maintain the same production capacity over a fixed duration of U periods. In our model, the level of expected demand plays an important role in a firm's employment and output decisions. Each firm believes, as a result of the customers' asymmetric responses to price changes, that it must accept a substantial price reduction to sell more than the currently anticipated amount, which gives rise to a kinked demand curve and thus a discontinuity in the marginal revenue curve (Negishi 1979). 25 This discontinuity, which virtually works as the demand constraint, results in two distinct cases, depending on whether the profit maximizing the Walrasian output is less than or greater than the expected demand, or equivalently, whether the demand constraint is binding or not. A firm is defined as a Keynesian firm when its demand constraint is binding; otherwise, it is defined as a Walrasian firm. The desired labor demand of a Keynesian firm as determined by the level of expected demand is called the Keynesian labor demand (KLD), denoted by N K . In contrast, the labor demand of a Walrasian firm, called the Walrasian labor demand (WLD) and denoted by N W , is determined so as to equate the marginal productivity of labor with the real wage rate. In formal terms, each firm determines its target level of employment, N * , as the minimum of either the Keynesian labor demand or the Walrasian labor demand: where and This formulation implies that a change in the real wage rate will not affect the employment decision of a Keynesian firm. Similarly, the employment decision of a Walrasian firm will be independent of its expected sales. For future reference, it is convenient to define some additional terms. First, the Keynesian Regime Index (KRI) of an economy is the ratio of the number of Keynesian firms to the total number of firms. Then, the Keynesian (Walrasian) regime is defined as one in which the KRI is greater (lower) than 0.5. Roughly speaking, the KRI approximates the degree of demand deficiency relative to what the marginal condition dictates at the aggregate level. Denoting the total quantity of labor employed by firm f as N f ,t = h∈H N h f ,t , we can express the net cash flow of the firm in period t as where Dep f ,t is the principal repayment to the bank. 26 We make a simplifying assumption for Dep f ,t : For each item of a firm's capital stock, the amount of the principal repayment that the firm makes in each period is assumed equal to the cost of depreciation, so that the book value of the remaining capital stock always equals the outstanding debt balance L f ,t . This implies that the net equity of firm f , E f ,t , is always equal to the firm's monetary balance M f ,t . Table 3(b) summarizes the balance sheet of a firm f . If the firm's monetary holdings M f are insufficient to meet its payment obligations to the bank, it will receive a capital injection from its owner household to come up with the initial monetary balance. (See event 7 in "Appendix A" for the details.)

Commercial bank
The bank is required to hold a quantity of reserves in proportion to its total monetary balance, γ M, with γ being the required reserve ratio. The only asset that can serve as such reserves is the fiat money, FM. 27 The amount of M is allowed to deviate from its required level of FM γ only temporarily. 28 In other words, the bank must adjust the rate of interest rate r t toward its target level r * t to satisfy the required reserve ratio in the following way: where δ r represents the inertia weight of the previous interest rate. In revising its interest rate, the bank attempts to balance the demand for and supply of reserves while also reflecting changes in the inflation rate, π t = P t − P t−1 P t . Therefore, r * is determined by where π t = π t − π t−1 and β r measures the responsiveness of the interest rate to excess demand for reserves. Equation (15) also implies that the interest rate will move to restore the balance in the bond market. 29 Using the revised r t , the bank determines the bond interest rate r B t and the lending interest rate r L t according to where m r is a constant interest margin ratio. The bank has two sources of profits: interest revenues on L t−1 and L c t−1 . Note that the amount of principal repayment includes the interest costs incurred by an investing firm during the construction period. Because a firm f , in general, buys investment goods from various producers at different prices, the revenue of the bank from firm f is given by where p f f ,t and I f f ,t are the price and quantity, respectively, of investment goods purchased by firm f from firm f . Thus, their product gives the amount of short-term funds borrowed by the client firm f in period t. Therefore, the bank has a current-term net cash flow of 27 Throughout this paper, the value of FM is kept constant at its initial level, which reveals the extent to which the economy is robust without countercyclical monetary policies. 28 The fixed monetary base does not, however, restrict the credit supply to business. The bank is allowed to issue bonds B s that require no reserves to raise funds for new lending or carryover loans. This implies that the quantity of liquid assets circulating in the economy varies endogenously. 29 Note first that the bond supply is expressed as B s t = A L t − FM/γ . Then, from Eq. (7) we see that When faced with a shortage of reserves, the bank will issue and sell bonds with a maturity period of 1, B s t , to households to obtain funds. Table 3(c) summarizes the bank's balance sheet. Because the bank pays out a net cash flow to the households in each period, the amount of bank equity will remain unchanged at the initial level FM. Consequently, the debt-to-capital ratio of the bank coincides with the resulting reserve ratio. Table 4 lists the agents on the supply and demand sides of the markets. The decision rule for the bond market is straightforward: The bank, as the sole supplier of bonds, sets the interest rate r B t and determines the bond supply B s t . Meanwhile, the bond demand B d t is determined by the households. The actual amount of bond sales is determined by the short side of the market, i.e.,

Market process
The same lending rate r L t is applied to both L c t−1 and L t−1 for all the client firms, regardless of their creditworthiness. A borrower and the bank jointly determine the amounts of loans according to the client firm's profitability and demand conditions.
Each participating supplier (firm) in the submarket for consumption goods C, or in the submarket for investment goods I , first submits a supply bid comprising a supply price p and a quantity supplied q s . Meanwhile, each customer (either a household or a firm) enters the market with a demanded quantity q d . Then, all the customers are randomly positioned along a line. According to the submitted supply prices, ( p 1 , . . . , p F ), we use a multinomial logit model [see e.g., Anderson et al. (1992)] to account for other factors that will influence the customers' purchase decisions; in other words, the lower the price a seller sets, the more likely the seller will be selected by customers. For a given weighted average price P, each customer selects seller f with a common probability: where μ is proportional to the variance in random disturbances. The customer at the head of the line thus chooses supplier f with the probability given by Eq. (18). Therefore, the customer is likely to choose a seller with a low supply price. If the supplier has sold all of its commodities prior to fulfilling the buyer's order, it leaves the The commodity market has two submarkets. Only firms participate in the submarket for continuing investment. Both consumers and firms participate as buyers in the submarket for consumption and investment goods market. Then, the buyer selects another seller to meet its remaining demand according to a logit probability with a Bayesian update. This process is repeated until the first customer has purchased all that it wants to buy. Then, that customer leaves the market and is replaced by the second customer in line. The market closes when all the agents on either the demand side or the supply side have left the market. The market for labor services works in the same way, except that firms offering high wages are more likely to be selected by job applicants.

Baseline simulation setting
To explore how our simulated economy evolves from a steady-state economy, we set the initial values in the simulation to their steady-state levels. 30 Because of the large number of parameters in the model, however, an arbitrarily chosen parameter set would be likely to generate an economy with erratic behaviors, making it difficult to ascertain the effects of individual parameters. Therefore, by conducting a grid search over a range of parameters, we determined a baseline parameter set that can induce long-run stability. Some parameters, such as the multifactor productivity, the number of firms, and the gestation period, could still be set to arbitrarily values. Another set of parameters, including the inertia in money demand and the weights of the expected inflation and wage inflation, does not influence the model's stability much, so these parameters were set to zero. When empirical estimates of parameters were available, we set each such value within a reasonable range of these estimates. These parameters include the income elasticity of long-run money demand and the capital share in the production function. Then, we conducted sensitivity analyses of key parameters around this baseline case to ensure the validity of our simulation results. Tables 1 30 The unique steady-state symmetric equilibrium, (Q ss , K ss , r ss , y ss ), satisfies the following five equations: In addition, each firm has a net worth in the form of a monetary balance equal to the sum of the steady-state levels of its principal and interest repayments, so that it can precisely cover its loan repayments to the bank. and 2 list the baseline values of the model parameters and the initial values of the variables, respectively. Note here that there should be many other regions of parameter combinations that would give stable simulated economies, for which the stabilizing mechanism could have a different nature from the one in our simulation. One of the main causes of macroeconomic instability is a positive feedback loop between aggregate demand and real income. Two labor-related parameters, θ N and θ , crucially influence this link. The former parameter represents employment rigidity that results from hiring and firing costs. If a shortage in aggregate demand causes a large volume of unemployment, real income falls sharply, causing further reduction in aggregate demand. A firm does not change its current volume of employment unless it differs significantly from the desired level N * f ,t : 31 A rise in unemployment is expected to put downward pressure on the mean wage. If this pressure is excessively large, then a drop in employment substantially reduces real wage income. The parameter θ represents the degree of excessive wage payments above the market-clearing level suggested by efficiency wage theory (e.g., Shapiro and Stiglitz 1984). 32

Results
In this section, we investigate the roles that price-wage rigidity plays in stabilizing our artificial Wicksell-Keynes economy. The simulated economy exhibits remarkable resilience in recovering from a persistent downward cumulative process that occurs in the initial adjustment periods to get back on a recovery path with mild price-wage rigidity. Section 4.1 presents the main simulation results, which show that mild rigidity of prices and wages helps to stabilize the economy. Section 4.2 then describes a simulated economy with mild rigidities, in which short-run business cycles emerge, together with long-term upward and downward cumulative processes that are remarkably resilient and robust. The results also show that these macroeconomic behaviors are reasonably consistent with some stylized facts. "Appendices D and E" supplement this section. 31 The baseline degree of employment rigidity is tuned to the most stabilizing value, listed in Table 1. 32 See "Appendix C" for more details. Alternatively, we can interpret θ as the ratio of long-term unemployment to total unemployment. If a job-seeker has experienced a long period of unemployment, she may have lost a significant part of her human capital (Mincer 1962;Pissarides 1992). We set θ = 0.35 as the baseline value, according to the percentage of those who had been unemployed for more than one year in 2014 in OECD countries, i.e., 35.1 % (Incidence of unemployment by duration, OECD Employment and Labour Market Statistics, ISSN : 2074-4129 (online), DOI: 10.1787/lfs-data-en).

Simulation results on price-wage rigidity
We consider average wage rates to be equally as important as the level of output in evaluating the performance of an economy. 33 Figure 1a, b shows heat maps of the output and average real wages for each combination of price flexibility (x-axis) and nominal wage flexibility (y-axis). As can be seen, the simulated economy exhibits high performance only when both prices and wages are mildly rigid. For a degree of price flexibility, β p , greater than 0.4, the economy tends to deteriorate over time in terms of both output and real wages. Meanwhile, the effect of wage flexibility, β w , is more complicated. The economy seems sufficiently robust to maintain a high level of output even when wage flexibility is as large as 1.0. For a wide range of β p , however, real wages fall substantially when β w exceeds 0.8, indicating that the economy fails to prevent a cumulative downward movement. A similar tendency can be verified in the long run. For the justification in choosing the baseline values of β w = β p = 0.3, see "Appendix D," which explains singlevariable sensitivity analyses conducted on the long-run output over 1,000 periods.
For future reference, note that there is an asymmetry between how the degree of flexibility of prices and wages affects their movements. A high degree of wage flexibility destabilizes wage dynamics both in the short run and in the long run. In contrast, as shown in Fig. 11b, an increase in the price flexibility amplifies the fluctuation in 33 In some extreme cases, simulated economies maintain a decent level of output even though the average real wage persistently drops until it reaches almost zero. A reduction in real wages increases the profits of firms at the expense of workers real incomes, resulting in an unfair income distribution. In addition, in general, this unequal distribution results in a reduction in aggregate income, because shareholders generally have a higher propensity to save than workers do; a shift in income from workers to shareholders that results from a reduction in real wages will reduce aggregate demand. In our model, however, these problems do not arise, because a household consists of both workers and a shareholder. In what follows, we simply regard a highly unequal income distribution as politically unviable. prices mainly in the short run. This is because in a commodity market, the supply of goods would adjust to its demand in the long run, whereas this is impossible for labor market with a fixed supply. Figure 2 plots the trajectories of key variables in the baseline economy. The results suggest that fluctuations do not exhibit any simple regularity or cyclicality, which agrees with stylized facts on business cycles [see, e.g., chapter 4 in Romer (2001)]. 34 Figure 2 also indicates remarkable resilience: two long-term recoveries starting in periods 1200 and 2100 after long-run deflationary spirals. The economy achieves full employment around period 4100. Interestingly, the graph displays comovements in output, real wages, employment, and capital stock throughout these periods. The money supply (not shown here) moves with some volatility along with the short-run business cycle, but it varies with the price level in the long run. This reversion of the process would be difficult to reproduce with a representative agent model having no technological shock or progress. Section 5 elaborates a novel mechanism that could explain this robustness.

Dynamic resilience
The baseline economy can reproduce some stylized facts of the business cycle. Figure 3 shows the emergence of a series of short-run business cycles, in which fluctuations in output are mostly caused by volatile fluctuations in investment. In contrast, consumption (not shown here) and capital stock are much more stable than output. In the graph, the economy resides in a Walrasian regime when the KRI is below the horizontal dotted line at 0.875. For future reference, note that the trend line around which the KRI fluctuates gradually rises, which implies that Walrasian regimes are short-lived: A Walrasian regime disappears once the economy enters a Keynesian regime while having sizable unemployment. "Appendix E" explains some empirical validity regarding correlations that exist between macro-variables.
Next, Sect. 5 will explain that, to stabilize the economy, a Walrasian regime must occur many times repeatedly until its employment-expanding effect removes unemployment. For more detailed explanation on this point, see Fig. 11a, b.

Stabilizing mechanism
In this section, we elucidate the stabilizing mechanism of the simulated economy, which coordinates real wages, employment, and the investment demand of firms, and we explain how the mechanism relates to nominal rigidities. Section 5.1 explains that a simulated economy can be stabilized only when falling real wages increase employment in a downward cumulative process of disequilibrium. Then, it verifies that, in the baseline case, a sufficient number of Walrasian regimes emerge to enable this stabilizing mechanism to work effectively. Section 5.2 closely investigates how the stabilizing mechanism works in the context of business cycles. It also examines the role of a gestation period in generating a business cycle. Finally, Sect. 5.3 explains why mild rigidity of prices and wages is necessary for a stable monetary economy. For more detailed explanations, see "Appendix F."

Interaction among real wages, investment, and employment
Stabilizing the aggregate demand requires two events to take place during the initial adjustment period: (1) falling real wages (hereafter called the investment condition) and (2) eliminating unemployment the (full-employment condition). Regarding the first condition, note that real wages must decline sufficiently at a moderate speed from the initial steady-state level to ensure profitable investment. This is because, in a steady state with idiosyncratic disturbances, about half of the firms do not invest because the steady-state level of real wages make their net profits negative [Eq. (B.15)]. The resulting inactive aggregate investment significantly reduces aggregate demand and thus commodity prices, both of which decrease not only the aggregate investment volume (Fig. 10a) but also the expected profit rates (Fig. 10b). The higher unemployment rate resulting from the weak aggregate demand will, in turn, lower nominal wage rates and thus nominal incomes, thereby further diminishing the aggregate demand. In short, a failure to fulfill the investment condition strengthens the positive feedback loops that we discussed in the Introduction. Is there any way to stop and reverse this deflationary spiral? The higher profit rates resulting from the falling real wages would not alone increase investment, because the level of investment depends on the level of commodity demand, as well [Eq. (B.16)]. 35 The aggregate demand depends on real income, which in turn depends mainly on real wages and employment, given a limited capital income. As the real wages are declining, the only way to get the economy back to a stable path is by increasing employment. 36 Moreover, the resulting increase in aggregate demand must be large enough to achieve full or nearly full employment and stop the perpetual decline in nominal wages; otherwise, real incomes will fall, thus further diminishing the aggregate demand. How can our simulated economy accomplish this task of increasing employment while simultaneously experiencing falling real wages? We will see below that the key mechanism lies in a Walrasian regime.
Roughly speaking, a Keynesian (Walrasian) regime occurs with weak (strong) aggregate demand. The simulated economy repeats the four phases of a business cycle: the peak (phase A), contraction (B), trough (C), and expansion (D). A Keynesian (Walrasian) regime typically prevails in a trough (peak), but starts in the middle of phase B (D) and ends in the middle of phase D (B). The task mentioned above seems quite difficult for a Keynesian regime to do, because the economy is shrinking when real wages are falling. A Walrasian regime, however, can accomplish the task, at least in the short run: Strong demand in a Walrasian regime can expand employment while raising prices, thus lowering real wages. By comparing the cumulative net increases in employment for the two regimes, Fig. 4 verifies the above claim: A Walrasian regime increases the employment volume, whereas a Keynesian regime reduces it in the baseline case. The figure implies that the full-employment condition can be decomposed into the following three conditions that must be fulfilled for maximum stability: (E-a) to strengthening the employmentexpansion effect in a Walrasian regime, (E-b) alleviating the employment-reduction effect in a Keynesian regime, and (E-c) repeating a sufficient number of Walrasian regimes. To explore when the economy can satisfy these conditions, we focus here on how real wages and employment move in a business cycle.

Dynamics of employment by phase of business cycle
One business cycle consists of four distinct phases: the peak, contraction, trough, and expansion. We find it helpful to elucidate an inherent stabilizing mechanism of a business cycle by focusing on the dynamic behaviors of the WLD and KLD. Figure  5 shows the trajectories of key aggregate variables in the initial adjustment periods for the baseline case. Note here that the amount of employment, i.e., the minimum of the WLD and KLD, slowly increases during each Walrasian regime. In contrast, in a Keynesian regime, employment decreases in phase B and increases in phase D, but the over all effect appears negative, which is consistent with Fig. 4. The initial declining investment causes unemployment, which continues to reduce the average nominal wage. With the qualification that minor random oscillations within a phase make clear-cut phase distinction difficult, we can characterize the four phases with the movements in the KLD and WLD. Phase A (Peak): In this phase, a seller's market, and thus, a Walrasian regime, still prevails, but a boom is about to come to an end. The strong aggregate demand resulting from active investments cause prices to rise. Meanwhile, the remaining unemployment lowers the nominal wages (not shown in the graph). This is because employment expansion lags behind economic recovery. The resulting fall in real wages increases the WLD and hence employment. On the other hand, the strong aggregate demand keeps the KRI, i.e., the share of firms facing demand deficiency, low. At the same time, the aggregate demand gradually decreases as new investment decreases, which starts reducing the KLD. These two factors together raise the KRI. The KRI is still low, however, which implies that employment increases because the WLD dominates the KLD in determining its volume. Phase B (Contraction): As a result of active investment during the boom, the supply capacity gradually expands and finally catches up with the aggregate demand. This reduces new investments, causing a buyer's market in the investment goods market. 37 During the gestation period, however, the production capacity continues to grow, thus increasing the excess supply. Consequently, with a lag of a couple of periods, prices start to fall. Because real wages and the WLD move in the opposite direction from prices, the WLD starts to fall, as well. As the prices either peak or start falling, real wages start to rise, thus either maintaining or decreasing the WLD. The KLD, however, decreases rather quickly as the aggregate demand diminishes. As a consequence, the KRI rises to a high level, thus switching the economy into a Walrasian regime. Phase C (Trough): Both prices and the aggregate demand fall in this phase, thus decreasing both the WLD and KLD, and hence the amount of employment. The discouraged investment in a Keynesian regime, however, reduces the production capacity enough to catch up with the aggregate demand. This triggers new investments. Because the KRI reaches a high level, the KLD has a dominant effect in determining employment. As a result, the economy hits a low and so does the amount of employment. The rising real wages, however, support real income, which helps to offset the effect of the reduced employment on the aggregate demand. Phase D (Expansion): As the recession continues, firms curb their investment, which reduces their production capacity. Because consumption spending only changes slowly (Eq. 4), the shortage of aggregate demand eventually vanishes. Some firms expect their demands to exceed their production capacities, so they start to invest beyond the capital stock replacement level. At the aggregate level, the expected demand catches up with the production capacity. Starting investments expand sharply, boosting the economy. Now, a seller's market commences. While the aggregate demand expands immediately as investment recovers, the production capacity continues to decrease during the gestation period, which increases the excess demand. Even though the seller's market has begun, prices may continue to decline for a while, because the aggregate demand may not yet be sufficient to match the production capacity. Consequently, the real wages can rise, and the WLD may decrease. From Eq. (A.3), however, prices adjust to the demand-supply gap in the previous period. Therefore, while noting that net investment affects consumption demand with some lag, we conclude that commodity prices start to rise, and thus real wages start to decline, which increases the WLD. As the aggregate demand increases so rapidly that the KRI falls quickly, the economy shifts into a Walrasian regime: The expansionary effect of the WLD becomes stronger as the KLD declines. On the other hand, at the outset of phase D, with a high KRI level, the effect of the KLD outweighs that of the WLD, and thus expansion in the commodity market propagates the labor market. In either case, employment starts to expand.
To explore the stability mechanism, we need to closely examine how real wages, employment, and the KRI interact. 38 In the next subsection, we will see that the same action of one firm can have different impacts on the aggregate demand, depending on the macroeconomic environment summarized by the KRI.

Stabilizing mechanism and nominal rigidities
As defined in Sect. 4.2, a firm is Keynesian (Walrasian) if and only if the WLD is greater (less) than the KLD. From Eqs. (10), (11), and (12), a simple calculation confirms the following lemma:

Lemma 1 A firm is Walrasian if and only
the variables are firm specific. Figure 6 shows how firms are categorized into the two types. For a given distribution of real wages and expected relative sales of all firms, the boundary line divides them into Walrasian and Keynesian types. The graph implies that, with given expected sales relative to a firm's capital stock, the larger the decline in its real wage, the more likely a Fig. 6 Keynesian and Walrasian regions. This graph shows that a firm is categorized as either a Keynesian firm or a Walrasian firm according to its real wage, w/ p, and expected demand relative to its capital stock, X /K −1 . The two arrows illustrate how the same amount of change in the real wages of a typical firm will be affected by the macroeconomic environment in determining the firm's movement in the next period. When the firm resides in a Walrasian regime, the reduction in real wages is more likely to be associated with an increase in the aggregate demand and thus the firm's individual expected sales, which will moves the firm in a way like the southeast direction indicated by the purple arrow. In contrast, when the firm is in a Keynesian regime, the reduction in the average real wage is likely to reduce the aggregate demand, thus decreasing the firm's expected sales. Consequently, in the next period it will move in a way like that indicated by the red arrow (color figure online) Walrasian firm turns into a Keynesian firm. The graph also suggests that a reduction in a firm's expected sales, i.e., a leftward movement in the figure, can change a Walrasian firm into a Keynesian one. Therefore, the KRI rises (declines) when either real wages fall (rise) or the aggregate demand decreases (increases).
Note here that these two variables are not independent of each other. Regarding how a change in the average real wage affect the KRI, imagine, for simplicity of explanation, that all firms set their prices and wages at the same levels and cut their identical real wages proportionally. This change in the real wages affects the aggregate demand in the next period though many channels. One important route is through employment. This effect depends on how many firms follow "the price-marginal cost principle." A few points are in order here.
First, depending on the KRI value, a reduction in the average real wage has different impacts on the aggregate demand. In a Walrasian regime, such a reduction tends to increase the employment of Walrasian firms, thus increasing the aggregate demand, and thereby the expected sales of all the individual firms [Eq. (A.1)]. Therefore, all firms tend to move southeast as indicated by the purple arrow in Fig. 6. This means that the status of a Walrasian regime is more likely to continue. 39 In contrast, in a Keynesian regime, in which most firms determine their employment levels according to demand constraints, the real wage reduction in the Keynesian regime tends to decrease the aggregate demand further, thus generating southwest movement in Fig. 6. Therefore, the same firm (at the starting point of the two arrows in the above figure) is more likely to turn into a Keynesian firm. The same logic applies to all other firms, which implies that the KRI tends to fall.
Second, a large reduction in real wages is much less helpful in improving employment than a slow reduction even in a Walrasian regime. We might expect that a slow decline in real wages over time and a large, one-time reduction in real wages should have the same impact on employment, as long as the total size of the reduction is the same. A sluggish employment adjustment [Eq. (A.8)], however, implies that the latter has a limited impact on employment and thus on the aggregate demand. On the other hand, such an adjustment decreases real labor incomes directly by a large amount, to the point that the KLD becomes smaller than the WLD. As this tendency applies to all the firms, the rapid reduction in real wages tends to move most firms south or southwest on the graph in Fig. 6, thereby increasing the KRI without increasing employment much.
Third, as the direction of the purple arrow suggests, a firm in the Keynesian region that is experiencing a rapidly declining real wages tends to become "more Keynesian," with a substantially less consumption demand; thus, the KRI is likely to fall further unless the aggregate demand significantly increases. These observations on the KRI imply the following two remarks. 40 Remark 1 When an economy resides in a Walrasian regime, a large reduction in real wages tends to cause a shift to a Keynesian regime without substantially increasing employment.
Remark 2 When an economy in a Keynesian regime has a substantial amount of unemployment, nominal wages fall. This tends to reduce the aggregate demand, which in turn makes a regime switch less likely. Now, we are ready to explore how rigidity in prices or wages affects the stability of our economy. First, we consider four destabilizing cases. Then, we will verify why the baseline case is stable.

Unstable cases
An economy with highly flexible wages is destabilizing, because it satisfies neither (E-a), (E-b), nor (E-c). First, in this case, a given amount of unemployment resulting from the initial shortage of investment causes a large reduction in nominal wages (Sect. 5.1), thus substantially decreasing labor incomes and consumption demand in both a Walrasian regime and a Keynesian regime. By Remarks 1 and 2, this will irreversibly shift the economy into a Keynesian regime without reducing unemployment (Fig. 11a), which violates (E-c). Then, Remark 2 suggests a substantial reduction in nominal incomes, which will further exacerbate unemployment and thus violate (E-b). Hence, the economy will enter a deflationary process and eventually collapse. With a similar destabilizing effect of falling real wages, an economy with highly flexible prices also fails to satisfy (E-c). The short-run rise in commodity prices in a Walrasian regime causes a rapid reduction in real wages (Fig. 11b). Again by Remark 1, the economy will enter a Keynesian regime before improving unemployment enough to keep nominal wages from falling. Because the price level is fairly stable in the long run, regardless of its degree of rigidity, as seen in Sect. 4.1, the reduced nominal wages would mean a somewhat proportional reduction in real wages. Then, Remark 2 implies that the economy will continue to stay in a Keynesian regime with falling real wages, which implies that it will collapse unless nominal wages are extremely rigid.
Excessive rigidity in wages is also harmful because it is inconsistent with the investment condition (Fig. 12b). As prices are stable in the long run, nominal wage rigidity implies that real wages would not fall quickly enough to boost investment. This results in inactive investment over a long period of time (Fig. 12a), which will gradually but steadily decrease both the aggregate demand and the productive capacity, thus eventually collapsing the economy. On the other hand, with excessive rigidity in prices, real wages fail to fall in a Walrasian regime (Fig. 13a). Therefore, the economy fails to satisfy both the investment condition (Fig. 13b) and the employment-stabilizing condition (E-a).

Baseline case
We saw above that a necessary condition for stability is a moderate rigidity of nominal wages; otherwise, either the investment condition or the employment conditions will be violated. We also noted that another stability condition is a moderate rigidity of prices, because otherwise either (E-a) or (E-c) will be violated. Conversely, an economy with a moderate rigidity of both prices and wages would satisfy both the investment condition and all three employment conditions, by (1) gradually decreasing real wages to recover the investment condition, (2) simultaneously increasing employment little by little in Walrasian regimes that repeatedly occur over time, and (3) minimizing the unfavorable positive feedback effect in Keynesian regimes. These results might suggest that recurring business cycles are necessary for stabilizing our monetary economy.
cratic supply-demand gap where N s f ,t denotes the effective number of job applicants whom firm f considers substitutable for its own employees, i.e., N s If θ is large, then this number of outside job competitors is small, which implies that the firm keeps the nominal wage rate from falling in favor of its own employees even under unemployment pressure. We consider this downward rigidity in nominal wages important for macroeconomic stability (Akerlof 2002, p. 415). For a given inflation rate, π , the firm sets a new nominal wage rate according to the following: otherwise, (A.5) where β w measures the adjustment speed of wages in response to the supplydemand gap. It should be obvious that the nominal wage tends to fall if the ex ante unemployment rate is positive.
4. See Eq. (4) and its explanation in Sect. 2.2.1. 5. The bank issues bonds to obtain funds from households to fill the shortage of reserves in the previous period. 41 Therefore, the bond supply is The bond demand, however, is obtained by substituting the following money demand into Eq. (7): where δ m represents the inertia weight. See Sect. 2.3 for a description of bond market transactions. 6. Because the depreciation cost is equal to the principal repayment, the firm's equity is always equal to the deposit balance, i.e., M f ,t = E f ,t , for all t and all f ∈ F. We assume that each firm, after making its payments to the bank, will distribute any excess money over the initial equity, E 0,t , to its owner household as a dividend, i.e., Div . In contrast, if the balance is negative, the owner household injects capital to meet the shortfall. As a result, the firm begins Event 7 with the following: 42 7. Hamermesh (1989) found that adjustment at the micro-level has a "lumpy" pattern with substantial inaction. 43 Caballero et al. (1997) found that (S,s)-type models (Arrow et al. 1951) fit the microeconomic evidence well. Letting θ N be the ratio of the trigger level to the previous level of employment to capture the rigidity in employment adjustment, we have With the labor demand N d f ,t thus determined, firms enter the labor market with the wage rates w f ,t that they determined in Event 3. Then, the market process allocates workers from household h to each firm, N h f ,t , which in turn determines the maximum output that firm f can produce [Eq. (8)]. 8. By using the labor input N f ,t and operating capital stock K f ,t−1 in Eq. (B.3), the production capacity is determined according to the production function in Eq. (8). 9. See Eqs. (B.1) and (B.14). 10. See "Appendix B" for a detailed explanation of the new investment demand.
Each firm enters the goods market from the outset with the maximum level of supply, i.e., Q(K f ,t−1 , N f ,t ). We can assume that the sellers and buyers agree on forward contracts and the firms commence production after all forward contracts are signed. As described in Sect. 2.3, the submarket for continued investment opens first, followed by the submarket for consumption and new investment.
(a) Submarket for continued investment To obtain the necessary output demand for continued investment, we need some additional notation. Let O f ,t denote the volume of new construction that each firm f starts at the beginning of period t. Once a firm starts construction work, it continues to devote φ O f ,t units of output during its gestation period. Because output resources are preferentially allocated to the demand for these continued investments, the firms as a whole participate in the investment goods market in accordance with the following sum of the continued investment demand I c F ,t : 14. From Event 6, the equity of each firm f is updated according to (A.10) Noting that the capital injection can be expressed as −Div, we can verify from Event 6 that Using Eq. (13), we can rewrite Eq. (A.10) as .12) implies that Div f ,t = f ,t . Because each firm invests exclusively from external funds and its depreciation cost is equal to its principal repayment, its equity is always equal to the deposit balance, i.e., M f , t = E f ,t for all t.
As in the case of firms, the bank updates its equity by the following: From Eq. (5), the monetary balance of a household is updated as Then, the total money supply is M t = h∈H M h,t + f ∈F M f ,t . Finally, the net wealth of household h is revised as

Appendix B: Investment decisions
In determining the level of investment, each firm considers whether two conditions are met: (1) a shortage of production capacity is expected, and (2) the investment promises to yield a positive profit. Regarding (1), we follow Doms and Dunne (1998) who developed "the simulation models that best fit the observed capital adjustment patterns". 44 Regarding (2), our boundedly rational firm employs the investment criterion developed by Minsky (Minsky 1975;Minsky and Kaufman 2008): The firm compares the construction cost of capital stock with the present expected value of quasi-rents that flow from the new capital stock. First, we derive the desired level of capital stock, denoted by O * t . In determining the volume of new construction of capital stock, each firm forms expectations regarding the demand for its products,X f ,t , and the profit rate,ˆ f ,t , over the investment horizon. Based on the realized volume of sales, X f ,t−1 ,X f ,t is formed adaptively with an inertia δ x :X Let q t be the total cost of one unit of capital stock whose construction is initiated in period t. Assume that at the beginning of period t, a firm owns O t−g−m operational factories of age m (m = 0, 1, . . . , U ). Note that the unit cost of m periods of old capital stock is q t−g−m . During period t, for each vintage of capital stock, the firm pays interest r L t q t−g−m (1 − m/U )O t−g−m plus principal repayments on the longterm debt, q t−g−m O t−g−m /U . Thus, the firm pays the sum of depreciation costs, to the bank as principal repayments. The longterm debt balance at the beginning of period t is given by Consequently, we can see that the firm pays r B t L t as an interest payment. Let K t−1 denote the capital stock operating in period t. We assume that completed capital stock will continue to operate for U periods with a constant production capability. After U periods, it is shut down and disposed of with zero disposal value. Thus, K t−1 stock has been completed in the most recent U periods: 45 Regarding condition (1), we first obtain the target amount of the starting investment, O * , by following the flexible accelerator model. According to this model, a firm adjusts capital stock toward its desired level by a constant fraction of the difference between the desired and actual levels of capital (Jorgenson 1971). The desired level of capital depends on input prices. As stated in Sect. 2.2.2, an investing firm invests φ units of output in each period during the gestation period, i.e., g periods, to build one unit of capital stock. To obtain the estimated cost of capital stockq t in period t, first we obtain the actual cost q g where p t is the cost of investment goods. Recursively, we have (1 +r L t+τ −1 ), wherer L denotes the expected lending rate. Substituting P t for p t+m−1 for all m = 1, . . . , g − 1, and r L t forr L t+m−1 , the estimateq t is obtained aŝ The firm then estimates the user cost of capital according toq t . The user cost of capital includes the cost of inputs and interest payments during the gestation period, as well as during operational periods. Because the capital stock operates for U periods, the depreciation cost isq t /U . To obtain the part of the interest payment that is included in the user cost, we assume that our boundedly rational firm naively expects the current interest rate to continue over the next U periods. The remaining debt in relation to the initial value of capital stock decreases as time passes, giving U −τ U (τ = 1, 2, . . . , U ) over τ periods after its completion. Thus, the firm expects to pay r L tq t U −1 τ =0 U −τ U in total over the operational periods, which simplifies to r L tq t (U + 1)/2. (B.5) Consequently, the expected average interest payment is r L tq t (U + 1)/(2U ). For future reference, we note here that the firm oweŝ Then, based onv t , the firm determines the desired capital-labor ratio, denoted by k * , by minimizing the average costv t K + w t N , subject to AK α N 1−α ≥ 1. From the first-order condition, Let K d be the optimum level of capital stock for firm f at time t if the firm incurs no friction in adjustment. 46 Given that the profit condition is satisfied, the desired level of capital is derived using the expected demandX t and the desired capital-labor ratio k * t as the following: Meanwhile, if no new investment is undertaken in the current period, the available capital stock in period g will be K 0 t = U −1 m=1 O i,t−g+m . Then, O * t can be expressed as the difference between the desired and actual capital stock, i.e., O * t = K d t − K 0 t . Regarding condition (2), our boundedly rational firm uses the investment criterion developed by Brainard and Tobin (1968), Tobin (1969), Minsky (1975), and Minsky and Kaufman (2008): It compares the replacement cost of capital stock with the present expected value of quasi-rents that flow from the new capital stock. For the sake of simplicity, we assume that the bank and firm collectively assess the profitability of the new investment according to the current quasi-rent. 47 We first obtain the replacement cost RC of one unit of working capital by replacing the real cost q t−g−m with the current estimated cost,q t , in Eq. (B.2). From Eq. (B.5), by adding the interest payment during the operational period, the interestaugmented replacement cost (opportunity cost) of one unit of new capital stock is The replacement cost of the existing capital stock is Then, by adding the capital gain R E t − L t the average total quasi-rent over U periods is (B.12) Therefore, Tobin's average Q T is defined by Q T = A q t R N t . Let q denote the rate of quasi-rent net depreciation costs: (B.13) 47 We can justify this assumption by the fact that investment involves decision-making under uncertainty.
In making a decision under uncertainty, we can assume that, according to Keynes, "the present is a much more serviceable guide to the future than a candid examination of past experience would show it to have been hitherto." (Keynes 1937, p. 214) By simple computation, we can see that Q T > 1 if and only if 2U ≥ 0. 48 The second term of this inequality gives the average interest rate for the average debt balance for one dollar's worth of capital stock from Eq. (B.6). Here, we have assumed that the firm adaptively forms the expected rate of profit as the following: where δ π is the inertia factor applied to the previous expected rate of return. Hence, the profitability condition is expressed as a positive net expected profit: It seems reasonable to assume that the bank will also be reluctant to provide investment funds to build a new production facility beyond replacing capital stock at the end of the current facility's operational life when the operation is unprofitable. Conversely, under uncertainty, it is difficult for a firm to downsize its scale of production when it holds a prospect of profitability. In terms of notation, we thus assume, for new investment regardless of the level of demand. 49 We now combine the two conditions to obtain our investment function, which is basically consistent with the (S, s) models used in Caballero and Engel (1999) and Doms and Dunne (1998). 50 More specifically, a firm only expands its production capacity when it is expected to be profitable, i.e., n t ≥ 0, and the desired level of new investment, O * t , substantially exceeds the replacement level, O t−U . 51 Thus, no investment is undertaken if it is unprofitable, and O * t is substantially smaller than the replacement investment. Otherwise, the firm undertakes an investment that exactly 48 The equivalence can be verified via the following: This specification seems consistent with empirical findings. For example, Abel and Blanchard (1986) included the profit rate in estimating investment and found that it has "a larger and more significant effect on investment than the cost of capital components." 50 This model was based on a large sample of US manufacturing plants. According to Doms and Dunne (1998, p. 412), "the simulation results that best fit the observed data are those in which plants mainly invest when the difference between the desired and actual capital stocks is substantially different. …Otherwise, plants usually invest in small amounts, amounts that could be related to replacement and maintenance investment." Caballero and Engel (1999) developed the generalized (S, s) model to explain smooth movements in aggregate investment by combining a micro-level (S, s) model with heterogeneity of firms. 51 The volume of an investment project that was initiated U periods ago, O t−U , is a replacement investment. This is because by starting to build O t−U units of new capital at the beginning of period t, the firm will have completed a new investment at the end of period t + g − 1, which can replace the capital stock that will have been depreciated by then. A new investment starting at the beginning of t − U finishes its operational life at the end of period t + g − 1.
replaces capital that has depreciated. Denoting the upward and downward stickiness of replacement demand by σ U i and σ D i ∈ (0, 1), respectively, the level of demand for a new project is given by Therefore, the larger the value of σ U i or σ D i becomes, the more likely it is that a firm maintains its production capacity at the current level. The first line of Eq. (B.16) indicates that a firm expands its operational scale only when investment demand is sufficiently large and the profit rate is expected to be positive. When that is the case, we further assume that the firm slowly adjusts its starting investment, denoted by O(δ i ), where δ i denotes the inertia effect on an investment decision.

Appendix C: Downward wage pressure and Â
One way to formulate this parameter is to assume that a firm underestimates the number of job applicants by scaling down the actual number of applicants, N s f ,t , with a scale factor Appendix D: Sensitivity analyses for long-run output Figure 7a indicates that even with a stabilizing price rigidity, i.e., β p = 0.3, the output decreases when wages are either too flexible, i.e., β w ≥ 0.8, or too rigid, i.e., β w = 0.
Similarly, Fig. 7b shows that even with an appropriate rigidity of nominal wages, i.e., β w = 0.3, the output is likely to decrease when prices are either too flexible or too rigid. Figure 8a, b shows the sensitivity results obtained for output and real wages, respectively, by setting the flexibilities of prices and wages equal. We chose β w = β p = 0.3 as the baseline parameters setting, because it was not only the best performer here but also was located in a stable region in the corresponding heat maps shown previously. Figure 9 displays correlation coefficients between the real GDP and other key variables for various lag lengths, obtained from 100 simulation runs over 120 periods (including 20 slug periods). First, real GDP had strong autocorrelation up to fourth order, implying that GDP deviations from a smooth trend substantially persisted. Second, investment and consumption expenditures were positively and contemporaneously correlated with real GDP. Interestingly, new orders of capital goods moved two periods ahead of total Correlation coefficients between Real GDP and demand components. A simple moving average of four periods was formed to observe any stable correlation for each data set. For each random seed, a correlation coefficient between the real GDP(t) and X (t + lag) was calculated over 120 periods, where X was either the output itself (to observe any autocorrelation) or one of the demand components listed in the legend. "Total Inv." and "New Inv." represent the aggregate investment and aggregate starting investment, respectively, while "Cons." represents consumption. The graph displays the average correlation coefficients over 100 random seeds (Properly, a distribution of correlation coefficients must be displayed for each combination of an explanatory variable and lag length. The dispersion was negligibly small, however, for every combination, so only the average value is presented here.) Consumption moves countercyclically because of a limitation of the one-sector model investment and real GDP. Real GDP was more strongly correlated with total investment than with capital stock, which seems to imply that output is more demand driven than supply driven. We also verified that average productivity moved procyclically and that employment lagged about four periods behind real GDP. These results are qualitatively consistent with empirical findings (e.g., Christodoulakis et al. 1995). In particular, the model can naturally explain procyclical productivity because the amount of output and employment are both determined as a short side of the supply and demand, but the latter changes only sluggishly because of rigidity in employment adjustment. Therefore, in recessions, the output falls more than employment does, thus causing productivity to fall. 52

Appendix E: Correlation among macro-variables
Appendix F: Necessary conditions on price-wage rigidity for stability in reference to simulation outcomes investments imply that even in a stable baseline case, a minute disturbance in the market process always reduces investment and thus upsets the initial steady-state equilibrium, leading to a cumulative downward process. To move to a stable system, the economy must somehow reverse this downward trend. For this to occur, real income must grow so that the resulting increased consumption spending will stimulate investment.

Appendix F.1: Destabilizing effect of highly flexible wages
When β w is excessively large, a given amount of unemployment will cause a substantial reduction in real wages, thus swiftly shifting the economy to a Keynesian regime, in accordance with Remark 1, well before increasing the WLD in phases A and D. Figure  11a illustrates how the economy evolves in the case where β w = 1.2. In response to a given level of unemployment in the initial periods, nominal wages fall rapidly so that the KRI reaches 1.0-meaning that the economy shifts to a Keynesian regime-in period 7, before achieving full employment. Highly flexible wages are destabilizing in a Keynesian regime, because the substantial reduction in real wages decreases not only consumption demand by reducing real labor income but also investment demand through the substitution effect [see (B.8) as well as Lerner (1936, p. 40)], which causes a further deflationary spiral. An economy with highly flexible wages virtually collapses from deflation, which is consistent with an observation by Keynes, who asserted that, if nominal wages are flexible, then a reduction in wages will lead to further wage reduction, which will "diminish the marginal efficiency of capital and will lead to the postponement both of investment and of consumption" (Keynes 1936, p. 263). Wages would then continue to decline "until either the rate of interest was incapable of falling further or wages were zero" (Keynes 1937, p. 304). 53 (a) (b) Fig. 11 a Unstable economy with highly flexible wages (β w = 1.2). b Unstable economy with highly flexible prices (β p = 1.2). The simulations here were conducted in the same way as for the results shown in Fig. 10, except that here either wages (a) or prices (b) were highly flexible Appendix F.2: Destabilizing effect of highly flexible prices When prices are highly flexible, they rise sharply in phases A and D. From Remark 1, the KRI will not fall enough for declining real wages to fully exert an employmentincreasing effect, thereby violating the employment condition (E-c). This implies that the economy moves to a Keynesian regime before achieving full employment. Figure  11b illustrates a case with highly flexible prices, i.e., β p = 1.0. During the recession in periods 5-12, prices fall relatively more than the average wage. This raises the real wage, which causes unemployment of 15% in period 12. The resulting unemployment reduces the wage rate even further, while the strong expansion in demand in phase D (periods 12-17) leads to a substantial rise in prices. Therefore, the real wage rate falls substantially (by 12.4%) in periods 12-17, which induces firms to substitute labor for capital stock. The resulting weak investment growth despite a recovery period leads the economy to deteriorate.

Appendix F.3: Destabilizing effect of highly rigid wages
In initial adjustment periods, unemployment would help raise the net profit rate by cutting real wage rates. When nominal wages are highly rigid, however, even in response to unemployment, real wages resist downward pressure, and thus net profits are not easily raised. As a consequence, investment remains inactive for a long period of time. Figure 12b indicates that even in period 200, the expected profit rate remains below the effective interest rate, thus suppressing investment demand. Note that the stabilizing mechanism of falling real wages functions properly here because of the mildly rigid prices. In addition, the rigidity of real wages supports aggregate demand in the Keynesian regime. As Fig. 12a shows, however, during the adjustment period, the lack of investment continues to reduce aggregate demand. This demand deficiency slowly turns the economy into a Keynesian regime while increasing unemployment, which causes the economy to deteriorate in accordance with Remark 2.
(a) (b) Fig. 12 a Unstable economy with highly rigid wages (β w = 0.05). b Unprofitable investments with highly rigid wages (β w = 0.05). The simulations here were conducted in the same way as for the results shown in Fig. 10a, b. All parameters were set equal to the baseline values, except that the wage flexibility here was one-sixth of the baseline value, i.e., β w = 0.05

Appendix F.4: Destabilizing effect of highly rigid prices
When β p is too small relative to β w , an increase in prices cannot reduce real wages, and therefore the employment expansion mechanism in Phases A and D does not work, i.e., employment condition (E-a) does not hold. As a result, the required reduction in real wages can only be achieved by reducing nominal wages. Therefore, given a slow adjustment of nominal wages, it takes a long time for the expected profit rate to exceed the effective interest rate and thus to increase investment. This results in low levels of aggregate demand and production capacity. Eventually, the economy moves to a Keynesian regime because real wages fall as a result of falling nominal wages and shrinking capital stocks. Figure 13a, b illustrates this case when wages are moderately rigid, i.e., β w = 0.3, while prices are highly rigid, i.e., β p = 0.05. Investment gradually falls, because real wages decline at a slower pace than capital (a) (b) Fig. 13 a Unstable economy with highly rigid prices (β p = 0.05). b Unprofitable investment with highly rigid prices (β p = 0.05). Simulations are conducted in the same way as the one in Fig. 10a, b. All the parameters are set equal to the baseline values except that here the price flexibility is one-sixth of the baseline value, i.e., β p = 0.05 stock (not shown here) so that the expected profit rate remains below the effective interest rate until period 200 as shown in Fig. 13b.