Ítalo Pedrosa
email: italo.pedrosa@ie.ufrj.br

Heterogeneity, distribution and financial fragility of non-financial firms: an agent-based stock-flow consistent (AB-SFC) model

Keywords: financial fragility, firms, leverage, cash flow, distribution JEL Codes: C63, D39, E32, G01, G32, O31

In Minsky's Financial Instability Hypothesis (FIH), financial fragility of non-financial firms tends to increase endogenously over the cycle along with the macroeconomic leverage ratio. This analysis has been criticized for two main complementary reasons: firstly, it does not duly consider the aggregate pro-cyclicallity of profits; secondly, due to an overly aggregate analysis, some inferences about the relation between aggregate leverage and systemic fragility are potentially misleading. In this paper, we take these criticisms into account by building an agent-based stock-flow consistent model which integrates the real and financial sides of the economy in a fundamentally dynamic environment. We calibrate and simulate our model and show that the dynamics generated are in line with empirical evidence both at the micro and the macro levels. We create a financial fragility index and examine how systemic financial fragility relates to the aggregate leverage along the cycle. We show that our model yields both Minskian regimes, in which the aggregate leverage increases along with investment, and Steindlian regimes, where investment brings leverage down. Our key findings are that the sensitivity of financial fragility to aggregate leverage is not as big as assumed in the literature; and that the distribution of profits amongst firms does matter for the stability of the system, both statically (immediately for financial fragility) and dynamically (because of the dynamics of leverage).

Introduction

Hyman P. Minsky is mostly known for his financial instability hypothesis (FIH hereafter), according to which stability breeds instability: in prolonged periods of stability, euphoria drives agents' perception of uncertainty down, encouraging them to engage in riskier financial practices. Even though some efforts in extending the FIH to other institutional sectors' have been developed over the past two decades (e.g. [START_REF] Palley | Debt, Aggregate Demand, and the Business Cycle: An Analysis in the Spirit of Kaldor and Minsky[END_REF][START_REF] Dutt | Maturity, stagnation and consumer debt: a Steindlian approach[END_REF][START_REF] Isaac | Consumer and Corporate Debt: A Neo-Kaleckian Synthesis[END_REF]Ryoo, 2016, for household debt;[START_REF] Nikolaidi | Margins of safety and instability in a macrodynamic model[END_REF], for banks' margins of safety), in Minsky's view, a duality in non-financial firms' investment is the core of the process (Minsky, 1982, p. 23). Whereas investment brings forth new assets, creating prospective cash flows, it simultaneously creates new debt (granted to firms as a consequence of banks' higher propensity to take risk), implying certain cash disbursements due to financial commitments in the future. As long as during expansions investment tends to be increasingly financed by debt, the accumulation of debt increases firms' financial fragility due to the potential decoupling of (certain) financial commitments and (uncertain) future cash flows.

Bearing this framework in mind, a stylised but representative causal chain to Minsky's FIH can be represented as follows: [1] euphoria leads to [2] higher credit granting, [3] that implies higher leverage; [4] for a significant amount of firms, cash disbursements to cover contractual payments on liabilities (interest plus debt repayment) gradually rise relatively to the cash flows brought by the new investment, increasing the macroeconomic (systemic) financial fragility; [5] at some point the accumulation of fragility is no longer sustainable, in which case a financial crisis happens. 1 The validity of the FIH as it was stated by Minsky requires steps from [1] to [5] to be valid, step by step. Unfortunately, recently the literature has raised two critiques relating to the macroeconomic validity of steps [2] to [3] (higher credit granting leads to a greater leverage) and [3] to [4] (higher leverage increases systemic financial fragility).

The first strand is more concerned with the assumption of given cash flows. The seminal critique of [START_REF] Lavoie | Minsky's financial fragility hypothesis: a missing macroeconomic link[END_REF] (see also [START_REF] Hein | Interest, Debt and Capital Accumulation -A Kaleckian Approach[END_REF][START_REF] Hein | Interest rate, debt, distribution and capital accumulation in a post-Kaleckian model[END_REF][START_REF] Toporowski | Minsky's 'induced investment and business cycles[END_REF][START_REF] Bellofiore | Minsky in the "new" capitalism. The new clothes of the financial instability hypothesis[END_REF][START_REF] Asensio | Post Keynesian modeling: where are we, and where are we going to?[END_REF][START_REF] Caverzasi | The Missing Macro Link[END_REF], underlines that the macro FIH does not duly consider the implications of incorporating the Kaleckian profit equation, according to which an increase in investment expands profits [START_REF] Kalecki | Theory of economic dynamics; an essay on cyclical and long-run changes in capitalist economy[END_REF]. Its inclusion into the FIH framework renders the assumption of given expected level of cash flows unfit. Thus, the aggregate leverage may be anti-cyclical: an increase in investment, even if financed by debt, results in higher profits, leading to an ex post decrease in the leverage because the capacity of financing investment with retained profits improve. As the cyclicality of the leverage is the cornerstone of the second macro interpretation of FIH, the anti-cyclical leverage would invalidate it: during expansions, the aggregate leverage falls and consequently fragility diminishes. This Kaleckian result, further developed by [START_REF] Steindl | Maturity and Stagnation in American Capitalism[END_REF] (see [START_REF] Ryoo | The paradox of debt and Minsky's financial instability hypothesis[END_REF], has been christened the "paradox of debt" [START_REF] Lavoie | Post-Keynesian Macroeconomics: New Foundations[END_REF]. [START_REF] Taylor | Reconstructing macroeconomics : structuralist proposals and critiques of the mainstream[END_REF] and [START_REF] Lavoie | Post-Keynesian Macroeconomics: New Foundations[END_REF] argue that both Minskian (pro-cyclical) and Steindlian (anti-cyclical) leverage regimes are plausible from a macroeconomic standpoint, depending on the average structure of firms' financing.

Besides rejecting the hypothesis of given cash flows, the second strand of literature also criticizes the representative firm hypothesis (see [START_REF] Toporowski | Minsky's 'induced investment and business cycles[END_REF][START_REF] Toporowski | Corporate Liquidity and Financial Fragility: The Role of Investment, Debt and Interest[END_REF]. For those authors [START_REF] Toporowski | Minsky's 'induced investment and business cycles[END_REF][START_REF] Toporowski | Corporate Liquidity and Financial Fragility: The Role of Investment, Debt and Interest[END_REF][START_REF] Assenza | Financial instability and agents' heterogeneity: a post Minskyan research agenda[END_REF][START_REF] Michell | A Steindlian account of the distribution of corporate profits and leverage: A stock-flow consistent macroeconomic model with agent-based microfoundations[END_REF][START_REF] Caverzasi | Post-Keynesian stock-flow-consistent modelling: a survey[END_REF], the heterogeneity of firms does matter for the FIH. According to [START_REF] Toporowski | Minsky's 'induced investment and business cycles[END_REF], the key issue for firms is their ability to capture the additional profit and liquidity created by the increase in aggregate investment; which is critical in defining fragility for it influences the leverage of individual firms. Indeed, "Financial fragility arises in the corporate sector because those firms that are getting into debt in order to invest may not be accumulating the profits and liquidity that investment puts about. Thus, it is the net indebtedness of individual firms that is the critical indicator of fragility, and not the gross indebtedness of the company sector as a whole, as Minsky was to argue." (Toporowski, 2008, p. 735) As a consequence, in this view, as the aggregate leverage should not be regarded as the major indicator of financial fragility and its cyclicality is less relevant than in Minsky's view. Because of that, this story is more akin to the micro view of the FIH, with a slightly different emphasis on the mechanism. Individual firms' fragility is tied to their leverage: if during expansions more firms get indebted, one should expect a higher incidence of speculative and Ponzi firms and subsequently a more fragile economy.

One should emphasize that the key issue with Minsky's FIH is not that he did not consider the cash flows side. He did. As noticed by Papadimitriou (2004. p. ix), "cash flow to a firm [is] the buzzword in almost all his [Minsky's] writings". The problem with dynamics is what questions the corollary that financial fragility increases endogenously. So, the gist of the critiques is that Minsky fails to incorporate the dynamic implications of how decisions of investment influence firms' cash flows on the dynamics of leverage. The consequence is that the corollary that financial fragility tends to increase during the cycles is not a necessary outcome.

This paper takes these two strands of critiques of the macro FIH seriously by building an agent-based stock-flow consistent model which integrates the real and financial sides of the economy in a fundamentally dynamic environment. Since cost competition among firms, with a locus on the research of labour-saving technologies, plays a crucial role in the distribution of profits within firms, the distribution of profits within firms determines the distribution of the liquidity put forth by investments. As such, the dynamics of firms' net leverage (and therefore future financial commitments) and financial fragility is subordinated to the ability of firms to capture profits.

We calibrate and simulate our model and show that the dynamics generated are in line with empirical evidence both at the micro and the macro levels. Our model does justice to the criticism of the FIH since it yields a co-existence of Minskian regimes, in which the aggregate leverage increases along with investment and Steindlian regimes, where investment brings leverage down.

Our key findings are that the sensitivity of financial fragility to aggregate leverage is not as big as assumed in the literature; and that the distribution of profits amongst firms does matter for the stability of the system, both statically (immediately for financial fragility) and dynamically (because of the dynamics of leverage).

The rest of this paper is organised as follows: section 2 introduces the model and our calibration technique; in section 3, we show the results of our model, namely its emerging properties and validation, the firm-level leverage dynamics and the macroeconomic determinants of financial fragility; section 4 concludes.

The model

The core of the Minskian view is that each firm face a growth-safety trade-off [START_REF] Seppecher | Is the market really a good teacher? Market selection, collective adaptation and financial instability[END_REF]: at the firm-level, higher investment requires higher debt; higher debt implies certain future financial commitments and the capacity created with the new investment yields uncertain future cash flows; but they are necessary to validate the debt taken to invest. The locus of agency is firm-specific, whereas the implications Minsky tries to draw are systemic. Minsky bridges units and systemic fragilities by creating a scale to classify unit's financial fragility. From the less fragile to the more fragile, each unit may be hedge, speculative or Ponzi. Each firms' financial status is obtained by comparing its cash flows and cash commitments (the detailed criteria to classify firms according to Minsky's typology is developed below). The economywide mix of financial statuses yields the system's financial fragility (e.g. [START_REF] Minsky | Can "it" happen again? Essays on instability and finance[END_REF]: a higher incidence of speculative and Ponzi firms indicates a more fragile economy.

Given these basic features of Minsky's framework, the cornerstone of our model is mimicking Minsky's logic to start from the firm-level and assess the macroeconomics of financial fragility. Our model's complexities are concentrated on the above-described core elements of the Minskian framework: we study the dynamic interaction between investment, profits (cash flow), leverage (from which derives the cash commitments) and the financial fragility of nonfinancial firms (which hereafter we refer simply as firms).

In our model, several features of firms' behaviour are inspired by the "Schumpeter meeting Keynes family of models" (K+S) (e.g. [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF][START_REF] Dosi | Income distribution, credit and fiscal policies in an agent-based Keynesian model[END_REF][START_REF] Dosi | Fiscal and monetary policies in complex evolving economies[END_REF]. It also shares some similarities with early contributions to the macroeconomic agent-based (AB) models, such as [START_REF] Raberto | Integrating real and financial markets in an agent-based economic model: An application to monetary policy design[END_REF][START_REF] Raberto | Debt, deleveraging and business cycles: an agent-based perspective[END_REF] and [START_REF] Dawid | The Eurace@Unibi Model: An Agent-Based Macroeconomic Model for Economic Policy Analysis[END_REF][START_REF] Dawid | A heterogeneous agent macroeconomic model for policy evaluation: Improving transparency and reproducibility[END_REF]. Our model features competition among firms, driven by attempts to increase labour productivity so to reduce unit costs [START_REF] Lee | Competition, going enterprise, and economic activity[END_REF][START_REF] Lavoie | Post-Keynesian Macroeconomics: New Foundations[END_REF], by means of costly research and development (R&D). R&D is itself divided into imitation of competitors and innovation (discovery of new technologies). The pricing decision follows a mark-up procedure, so firms that are closer to the technological frontier have lower unit costs, and those farther from this frontier tend to struggle because they lack cost competitiveness. Demand is distributed according to firms' prices: those with higher prices tend to lose market share (firms react lowering the mark-up, squeezing their profit rates if the unit cost is high), while the ones with lower prices tend to gain market share, having room to increase the mark-up (and thus widen the profit rate, if the unit cost is low). This structure endogenously create heterogeneity in profit rates, implying that the idiosyncratic ability of a firm to capture profits allows us to address the issue raised by [START_REF] Toporowski | Minsky's 'induced investment and business cycles[END_REF].

Firms decisions of investment are based on the obsolescence of existing machines (replacement investment) and/or by productive capacity constraints (expansionary investment). In what concerns replacement investment, we follow the K+S family of models in assuming that firms follow a pay-off routine. Total physical capital is composed of heterogeneous vintages of capital, having as an attribute different labour productivities. Firms compare the cost of replacing existing vintages of capital vis-à-vis the gains of productivity expected by replacing the machines. Potential gains arise from the evolution of the best technology to which the firm has access to. As such, replacement investment affects firms' competitiveness via the impact on labour productivity, contingently on the relative success of a firm in R&D activities. On its turn, expansionary investment is driven by the demand faced by firms, in the neo-Kaleckian vein [START_REF] Amadeo | Notes on capacity utilization, distribution and accumulation[END_REF][START_REF] Amadeo | Expectations in a steady-state model of capacity utilization[END_REF][START_REF] Hein | Distribution and growth after Keynes[END_REF][START_REF] Lavoie | Post-Keynesian Macroeconomics: New Foundations[END_REF]. As long as firms' capacity utilisation reaches a critical level, firms speed up accumulation in order to increase production. 2We include a debt structure that allows us to straightforwardly represent the cash commitments of firms, so bringing into the model the temporal dimension of the balance sheet analysis that concerned Minsky. 3 Regarding the demand for loans, we follow the pecking order theory (e.g. [START_REF] Myers | The Capital Structure Puzzle[END_REF] in assuming that firms prefer internal funds (existing deposits) over debt financing. 4 We do so by assuming that firms follow a simple rule of thumb. Once firms compute the number of workers necessary to carry out production and R&D, as well as the amount of investment, they check whether the existing deposits are sufficient to cover the corresponding cash disbursements. If the deposits are not sufficient, then firms demand new loans from the banking sector. Therefore, there is a clear link between existing deposits (i.e, firm's accumulated savings), investment, and decisions of taking debt.

The feedbacks between real and financial sides at the firm-level are synthesised in Fig. 1. Investment triggers increases in labour productivity but may create debt to the firms (if a firm does not have sufficient funds), which implies future financial commitments. Cash flows (namely gross profits, that is, the difference between total sales and wage bills) are used to cover the debt servicing (validating past decisions of taking debt), to remunerate stockholders and to pay taxes. For a particular firm, the dynamics of deposits depends on whether gross profits cover or not all disbursements, so there is also an impact on future debt financing that comes from the relative success of a particular firm in capturing profits. The final dynamic impact of investment decisions on the net debt (debt discounted of the deposit holdings) is undetermined: it may be either positive or negative, depending on the balance sheet a firm inherits from the past and on its current profitability.

The remainder of the model features a fully integrated and coherent accounting structure, in line with the stock-flow consistent literature (SFC hereafter; see [START_REF] Godley | Monetary economics: an integrated approach to credit, money, income, production and wealth[END_REF][START_REF] Caverzasi | Post-Keynesian stock-flow-consistent modelling: a survey[END_REF]Nikiforos and Zezza, 2017, among others). The aggregate structure of the economy is presented in Tables A1 andA2 (see appendix). Since the complexity required to duly address the firm-level dynamics is already large, we make the following simplifying assumptions to bound the model's complexity.

We assume a closed economy composed of F firms; and household, banking, and government sectors. Following Di [START_REF] Di Guilmi | The dynamics of leverage in a demand-driven model with heterogeneous firms[END_REF], firms (denoted by the subscript f ) produce a homogeneous good.

The household sector (denoted by the subscript H) supplies labour to the firms, consumes goods, and accumulates wealth -held both as deposits in bank accounts and as government bills. Despite assuming away the trading of firms' and banks' stocks, we assume that households own the banking system and firms, therefore receiving dividends. The banking sector (denoted by the subscript B) provides firms with loans, takes deposits from both households and firms, and buys government bills. The government levies taxes on households' income and on firms' profits, and buys goods from firms in order to provide public services. Government deficit (surplus) is financed by the issuance (withdraw) of bills, which generate future payments of interest to the bondholders.

As our focus is on the firms' sector, the household and banking sectors are modelled as aggregates. 5 We assume unlimited supply of labour, which implies persistent unemployment. Furthermore, the banking sector is fully accommodative, so firms' demand for credit is always met. 6 Finally, the inclusion of a government sector stabilises an otherwise unstable model.7

Sequence of events

All transactions that involve money flows are settled by agents using bank deposits. In every period of time, the following sequence of events takes place in the simulation:

1. Production planning: firms decide the desired level of production and R&D. Demand for labour is defined according to the firms' current labour productivity; 2. Investment: firms decide whether to replace older capital machines and/or to expand capacity; 3. A nominal wage is agreed upon the union; 4. Pricing: firms revise their mark-ups and set prices; 5. Loan demand: firms set the demand for loans. The banking sector matches firms' demand and credit each firm's account; 6. Production: firms produce and pay wages to workers; 7. Research and development take place. Firms that gains access to a new technology that is more productive than the ones previously known may use that technology in the next period; 8. Market: an imperfect market for goods open. Market shares evolve according to firms' price competitiveness; 9. Firms incorporate the new machines to its capacity and they become available to the next period; 10. Debt servicing: interest and amortisation are paid by firms to banks. Firms with insufficient funds go bankrupt; 11. Taxes (1) and dividends: firms and the banking sector pay taxes and dividends; 12. Interest on bills: the government pays interest to the household sector; 13. Taxes (2): households pay taxes on the various sources of income; 14. Entry and exit of firms take place.

Production, distribution and technology

Decisions of production. The production plan (Y f ) of each firm f is set according to the expected real sales S e f and to the desired inventories to sales ratio (ι T ∈ [0, 1]) -assumed to be exogenous and equal to all firms -, which firms want to hold in order to fulfil unexpected boosts of demand [START_REF] Steindl | Maturity and Stagnation in American Capitalism[END_REF]:

Y f (t) = (1 + ι T )S e f (t) -IN V f (t -1) (1)
where IN V f is the firm inventories. We follow the K+S models in assuming that sales expectations are purely adaptive, based on the lagged sales. 8 Given the amount of production planned by firms (Y f ), the desired capacity utilisation (u d f ) is given by:

u d f (t) = max 0, min ν Y f (t) K f (t -1) , 1 (2)
where ν is the maximum capital to output ratio -a technical coefficient reflecting the capital productivity, assumed to be constant and exogenous -and K f (t -1) is the existing capital stock. The actual capacity utilisation (u f ) is bounded to be equal or less than one, inasmuch as production is constrained by the amount of physical capital a firm hold.

Capital stock, technology and labour productivity. The capital stock is composed of heterogeneous vintages of machineries-tools, as in [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF]. The process of production of capital-goods is as follows. Firms set the investment demand (described in Eqs. ( 10) and ( 11)), from what we get the total demand of the firms' sector (by aggregating all firms' investment demand), and this demand (along with consumption and government expenditure demand) is distributed among all firms according to the mechanism described in Eqs. ( 18) and ( 19) (similarly to the K+S models and to Di Guilmi and Carvalho ( 2017)). After firms get the material input (the homogeneous good), we assume that they internally and irreversibly transform the homogeneous good into machines, at no additional cost. 9 The new productive capacity is available to the firm in the next period. Since firms transform machines internally, they can have idiosyncratic technologies for each physical capital vintage. Each firm use the best-known technology known by it at the moment it invests, and the key attribute of each vintage of capital good is its labour productivity. The idiosyncratic labour productivity comes from the way firms transform the homogeneous good into machines, organise them in the productive plant, and manage the production (as in [START_REF] Bassi | Investment hysteresis and potential output: A post-Keynesian-Kaleckian agent-based approach[END_REF]. Those capabilities are acquired through costly R&D activities. As such, the incentive firms have in performing R&D is saving labour so as to decrease the unit labour costs is pursued by firms by 9 Those hypotheses are related to the assumption that the good is homogeneous. In the agent-based literature, commonly the firms sector is divided into a consumer and a capital-goods producing sectors. The capital-goods producing sector generally deploys only labour to produce machines (e.g. [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF][START_REF] Dosi | Income distribution, credit and fiscal policies in an agent-based Keynesian model[END_REF][START_REF] Dosi | Fiscal and monetary policies in complex evolving economies[END_REF][START_REF] Assenza | Emergent dynamics of a macroeconomic agent based model with capital and credit[END_REF]. In our model, we have deliberately chosen not to follow this path. Assume for instance that we have a capital-goods sector that uses only labour to produce machines. The crucial issue then is how would to measure the leverage ratio. The total assets of these capital-goods producing firms would be only deposits, since no physical capital or inputs are used in production. We do not think that the leverage of these firms would be straightforwardly comparable to the leverage of the consumer goods' producing sector, so to allow us to clearly assess the aggregate leverage in the financial firms' sector -which is our key focus in this paper. Take as an example a stationary economy in which investment suddenly increases vis-à-vis consumption. This would increase the weight of the capital-goods producing sector in the economy. Since the asset structure in the consumer and capital-goods producing sectors are different, the aggregate leverage would change even in absence of changes in total debt. For solving the comparability problem, the solution would be to assume that capitalgoods producers also use machines produced by their own sector, but then we basically have the same setting as the one we have with a homogeneous good. Besides that, having two goods would introduce complications related to the incorporation of intra-firms' sectoral flows, which by itself would deserve further research (see [START_REF] Assenza | Emergent dynamics of a macroeconomic agent based model with capital and credit[END_REF]. For these reasons, we chose the more parsimonious path in analysing the simplest case first, leaving the extension to an economy with two goods or more to future research. performing R&D expenditures, both seeking the creation of new technologies (innovation) and imitation of competitors (as detailed below).

Insofar as firms' capacity is built through time, a variety of capital goods with different labour productivity co-exists. As a consequence, the average labour productivity ( Āf ) of each firm is the average of each physical capital's vintage (k f ) productivity, weighted by the share of each vintage of capital to total capital:

Āf (t) = κ j=1 k f (t -j)A f (t -j) K f (t -1) (3)
where κ is an integer representing the maximum lifetime of each k f , and A f (t -j) is the best technology known by the firm at the time a particular vintage was built.

Dynamics of technology. We introduce R&D expenditures deploying the mechanisms developed in [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF][START_REF] Dosi | Income distribution, credit and fiscal policies in an agent-based Keynesian model[END_REF], simplified for our homogeneous product framework. Each firm real R&D expenditure is a function of their previous period actual sales (S f ):

RD f (t) = γS f (t -1) (4)
with 0 < γ 1. We assume that firms split the R&D expenditures between innovation (IN )

and imitation (IM ). The parameter ξ ∈ [0, 1] represents the share of R&D expenditures in innovation [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF]

): 10 IN f (t) = ξRD f (t) (5) IM f (t) = (1 -ξ)RD f (t) (6)
The probability of success of innovation and imitation results from a draw from a Bernoulli distribution, for which the probability of success (φ z f ) is positively related to the corresponding real expenditures:

φ z f (t) = 1 -e -ζ 1,2 z(t) with z = {IN, IM } (7)
with 0 < ζ 1,2 < 1. In case the event 'innovation' occurs, the firm has access to a new technology, which could result in either higher or lower labour productivity as compared to the current technology the firm owns. The new technology labour productivity (A in ) can be described as:

A in f (t) = A f (t -1)(1 + x f (t)) (8)
where, as in [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF] On its turn, when a firm succeeds in imitation, it gains access to one competitors' technology (A im f ). We follow [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF][START_REF] Dosi | Income distribution, credit and fiscal policies in an agent-based Keynesian model[END_REF] in assuming that firms are more likely to imitate competitors with similar technologies. The probability that a firm copies the technology of another is weighted by the distance between one firm technology to the others'. In other words, if the imitation research granted access to a competitors' technology, the closer the knowledge of two firms are, the higher the likelihood that a firm will have access to the technology of the other.

The firm may imitate and innovate, imitate only, innovate only, or be unsuccessful in both. Since each technology is evaluated by firms according to the labour productivity it delivers, the firm chooses the technology with higher labour productivity among the available ones

A f (t -1), A in f (t), A im f (t) .
If the firm succeeded in discovering a technique more productive than A f (t -1), it will be available to the firm in the next period. Otherwise, firms hold the old technique.

Labour demand. Firms' production function follows a Leontief specification, with fixed combinations of physical capital and labour. This is to say that the demand for labour for production purposes follows from the planned production and from the average labour productivity of the firm. In addition of hiring workers to produce goods, firms also employ workers to perform R&D activities. For simplicity, we assume that the productivity of workers in the R&D sector corresponds to the economy-wide labour productivity in the previous period, and is equivalent for all firms. Given those two sources of demand for labour, we can write the total demand of a firm as:

N d f (t) = u f (t)K f (t -1) ν Āf (t) + RD f (t) Ā(t -1) (9)
Since we assume a completely elastic labour supply, the demand for labour of firms is always fulfilled, so firms are never curbed by labour constraints in either production or R&D plans.

Investment decisions. As noticed by Dos [START_REF] Santos | A Stock-Flow Consistent General Framework for Formal Minskyan Analyses of Closed Economies[END_REF], the formal Minskian literature has deployed several specifications of investment which typically involve the inclusion of financial variables. Among them, very often one finds in the Minskian literature a positive association of investment with some sort of market capitalisation or Tobin's q, a negative dependency on the interest rate or on the lagged leverage (see [START_REF] Nikolaidi | Minsky models: a structured survey[END_REF][START_REF] Nikolaidi | Three decades of modelling Minsky: what we have learned and the way forward[END_REF], for an extensive review). While many authors adopt such specification, there is little consensus in the empirical literature regarding the sensitivity of investment to financial variables. Given that little consensus, in our model investment depends on real factors, being divided into replacement and expansionary investment.

The replacement investment consists in the substitution of machines with technological obsolescence, as in [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF][START_REF] Dosi | Income distribution, credit and fiscal policies in an agent-based Keynesian model[END_REF][START_REF] Dosi | Fiscal and monetary policies in complex evolving economies[END_REF]. Firms define which vintage of machinery-tools to replace by comparing the cost of replacement with the implicit cost of holding each vintage of machine (ibid.). The cost of holding older vintages of capital is the lower labour productivity it delivers vis-à-vis the new investment good, which, contingently to the success in the recent past R&D activities, is expected to have higher labour productivity. The cost of replacement depends on the expected price (p e ) of the homogeneous goods that firms transform into machines-tools. The expected price refers to the general level of prices of the economy, as will be detailed below. Formally, the total replacement investment of each firm (RI f ) can be written, in real value, as:

RI f (t) = t-1 j=t-κ a f (j)k f (j) | (b > x f (j) → a f (j) = 0) ∧ (b ≤ x f (j) → a f (j) = 1) x f j = p e (t) c f (A f (t -j)) -c * f (A f (t -1)) ( 10
)
where b is an exogenous parameter reflecting the number of pay-off periods firms use as benchmark, c * f (A f (t -1)) is the unit cost with firms' best technology, x f j is the actual pay-off expected by firms of replacing a particular vintage j of machine-tool, and a f is a binary variable indicating whether the vintage j of the capital good will be replace or not. a f (j) = 1 if the cost of replacing a particular machine vintage is less than or equal to the expected return (x 11 The total replacement investment of each firm is the sum of all physical capital vintages j that the firm decided to replace following the payback routine.

f j ≤ b). Conversely, a f (j) = 1 if x f j > b.
Regarding real expansion investment (EI f ), we follow the canonical Kaleckian framework, for its properties have been extensively analysed. The specification we deploy is the one by [START_REF] Amadeo | Notes on capacity utilization, distribution and accumulation[END_REF][START_REF] Amadeo | Expectations in a steady-state model of capacity utilization[END_REF]:

EI f (t) K f (t -1) = ρ 0 + ρ u (u d f (t) -u n ) (11)
where ρ 0 is an exogenous coefficient reflecting the animal spirits of firms, ρ u is the sensitivity of firms to changes in the deviation of current desired capacity utilisation to the 'normal' or desired rate of utilisation (u n ). 12 The intuition of this function is that when capacity achieves a certain level firms will accelerate the expansion investment in order to bring back the capacity to desired utilisation [START_REF] Lavoie | Post-Keynesian Macroeconomics: New Foundations[END_REF]. The sum of replacement and expansion investment yields total investment by a firm (I f ), and the sum of total firm investment yields aggregate investment. 13Wages. We assume that the nominal wage is uniform to all workers, and that it evolves according to the change of aggregate productivity of labour, plus some inertia to past inflation. Moreover, the possibility of inflationary pressures caused by the conditions of the labour market is captured by a Phillips curve with a flat segment [START_REF] Kriesler | The New Consensus on Monetary Policy and its Post-Keynesian Critique[END_REF][START_REF] Godley | Monetary economics: an integrated approach to credit, money, income, production and wealth[END_REF]. This is to say that within a certain interval, there is no upward nor downward pressure in real wages. However, if the growth of employment is above a certain level, signalling a robust growth of labour demand, workers manages to negotiate higher real wages. Conversely, if the growth of employment is below a certain level, firms' opinions tends to prevail and the real wage tends to be reduced. Formally:

w(t) = w(t -1) 1 + ψ 1 ∆p(t -1) p(t -2) + ψ 2 ∆ Ā(t -1) Ā(t -2) + (z 1 -z 2 )F N (0, σ F N ) (12)
where z 1,2 are binary variables that reflects the growth in employment and F N (0, σ F N ) is a folded normal distribution. If the growth rate of employment is greater than a threshold, z 1 = 1, the nominal wage growth will be increased by a random amount. Otherwise, in case the growth rate of employment is below a threshold, z 2 = 1 and the real wage will decrease by a random amount.14

Pricing. Firms set prices applying a variable mark-up (θ f ) over unit labour costs (w/ Āf ):

p f (t) = (1 + θ f (t)) w(t) A f (t) (13)
Since the unit labour cost is not under strict control of firms -for it dynamically depends on uncertain outcomes of R&D activities, on the structure of firms' capital and of a unique nominal wage -the mark-up rate changes as a reaction to the developments in the goods market. Such changes follow the evolution of firms' market share (M S f ):

θ f (t) = θ f (t -1) 1 + υ M S f (t -1) -M S f (t -2) M S f (t -2) (14)
with 0 ≤ υ ≤ 1. Taking together the technological developments, through its impact on labour productivity and thereby on unit labour costs, and mark-up dynamics, firms' ability to capture profits through time is unique: firms that are closer to the technological frontier tend to gain market share and to make more profit (consequently they can increase mark-ups), and those farther tend to struggle (to remain competitive and prevent further market share losses, they lower their mark-up).

Credit demand. Since we assume away new equity issuances,15 and that firms pay workers and investment goods in advance, the demand for new loans (N L f ) is defined as the amount of cash needed to cover expenditure plans (namely, to produce, to research and to invest) discounted of the begin-of-period deposit balance (D f ):

N L f (t) = max [0, p e (t)I f (t) + w(t)N f (t) -D f (t -1)] (15)
The nominal cost of investment in fixed capital, given the real investment demanded, is estimated by firms based on the average price of the homogeneous good firms expect to pay (p e ).

For simplicity, we assume that price expectations are uniform across firms, and is obtained by applying the previous period inflation on the general level of prices prevailing at that time.

The banking sector is assumed to fulfil firms' demand for loans, charging an homogeneous and exogenous interest rate i l . New loans granted to firms are credited in their bank account. As in [START_REF] Caiani | Agent based-stock flow consistent macroeconomics: Towards a benchmark model[END_REF], each loan contract signed between the firm and the banking sector lasts for λ = 10 periods, following a constant amortisation schedule. 16 As both amortisation and interests must be paid each period, decisions taken in the past are carried over time through the debt inertia.

Households demand. The real consumption decision depends on an exogenous propensity to consume out of expected after-tax real wages (0 α 1 ≤ 1), with τ 1 ∈ [0, 1[ equal to the income tax rate, and out of beginning-of-period expected real net wealth (0 ≤ α 2 ≤ 1) [START_REF] Godley | Monetary economics: an integrated approach to credit, money, income, production and wealth[END_REF]. Since consumption decision precedes the interaction with firms, the price used to discount the nominal values is based on an expected price p e [START_REF] Caiani | Agent based-stock flow consistent macroeconomics: Towards a benchmark model[END_REF], for which expectations are also fully adaptive:

C(t) = α 1 (1 -τ 1 )w(t)N (t) + α 2 V (t -1) p e (t) (16)
Government demand. Real government expenditure is defined as a share of the aggregate capital stock (Dos [START_REF] Santos | A simplified, 'benchmark', stock-flow consistent post-Keynesian growth model[END_REF]. This share is composed of two parts. First, there is a fixed and exogenous component 0 ≤ Γ 0 1, which is defined by the structural size of the government in the economy. Second, there is an anti-cyclical component. The government increases (decreases) temporarily the expenditures as long as the average capacity utilisation of the firms is below (above) a normal level (u n ). The intensity of government's anti-cyclical reaction is given by 0

≤ Γ 1 < 1: 17 G = [Γ 0 -Γ 1 (u(t -1) -u n )] K(t -1) (17)
Distribution of demand. The aggregate demand (Q d ) of the economy is already identified at this stage:

Q d (t) = F f =1 I d f (t) + C(t) + G(t)
That is, the total demand is equal to firms' investment (replacement + expansion) plus households' consumption and government expenditures. We still need to define a rule for the distribution of total demand among firms. We follow the approach of the K+S models in assuming that firms' competitiveness (E f ) is negatively proportional to the firm price and to the level of unfilled demand (l f ): 18

E f (t) = -ω 1 p f (t) -ω 2 p f (t) l f (t) K f (t -1) (18)
In this setting, firms with high prices (which may emerge because of a large mark-up, a high unit cost due to a weak labour productivity, or a mix of both) tends to lose market share. Accordingly, if firms could not fulfil the desired demand due to a lack of inventories plus the current production, there is a punishing factor in the next period. The average competitiveness of the whole firm sector is given by:

Ē(t) = F f =1 E f (t)M S f (t -1)
Firms' market share evolves in time according to a quasi-replicator dynamic. 19 Firms with above-average competitiveness gains market share and vice-versa:

M S f (t) = M S f (t -1) 1 + χ E f (t) -Ē(t) Ē(t) (19)
where χ > 0 is an exogenous parameter.

17 Since the potential output is defined as [START_REF] Arpaia | Government expenditure and economic growth in the EU: long-run tendencies and short-term adjustments[END_REF] show that the government expenditures and potential output are cointegrated in European countries, suggesting a stable long-term relationship among the variables. 18 As prices and quantities have different rates of growth (there is no reason for the inflation and for the GDP growth to be the same), we scale the unfilled demand (quantity) by the prices and by the stock of capital, so the relative weight of both factors influencing the competitiveness remain unchanged over time.

Y p (t) = K(t -1)/ν, we could equivalently define G in terms of the potential output (G(t) = [Γ 0 -Γ 1 (u(t -1) -u n )] νY p (t)).

Financial implications and model's closure

Firms' profits and dividends. The gross profits (Π gf ) -the gross cash flow -of firms is the total nominal sales (p f S f ) discounted for firms' wage bill (wN f ), which includes both production and R&D labour costs:

Π gf (t) = p f (t)S f (t) -w(t)N f (t) (20)
Since we assume a constant amortisation schedule, the total begin-of-period outstanding debt of each firm is

t-1 j=t-λ N L(j) λ-[t-1-j] λ
. Interest on loans are paid by firms to banks in each period following the interest agreed when the loan contract was signed, so that the total interest paid corresponds to

t-1 j=t-λ i l (j)N L(j) λ-[t-1-j] λ
. Assuming that each vintage of physical capital is valued by the acquisition cost 20 and knowing that the depreciation of physical capital corresponds to the sum of replacement investment, or to the machines scrapped (but not replaced) due to the end of its technical lifetime, the nominal capital depreciation corresponds to t-1 j=t-κ p(j)a f (j)k f (j). Following standard accounting procedures, inventories are re-evaluated using the current unit cost of production as benchmark. Therefore, net profits (Π f ) of each firm can be written as:

Π nf (t) = Π gf (t) + c f (t)IN V (t) -c f (t -1)IN V (t -1)- t-1 j=t-λ i l (j)N L(j) λ -[t -1 -j] λ - t-1 j=t-κ p(j)a f (j)k f (j) (21)
The net profit depends respectively: 1) on the actual nominal sales (+); 2) on the wage bill (-); 3) on the interest payments on debt (-); 4) on inventories' revaluation (±); 5) on physical capital depreciation (-). The net profit is used by firms to compute the amount of taxes firms will pay on profits, which corresponds to a fixed share (τ 2 ) if the net profit is positive:

T f (t) = max(τ 2 Π f (t), 0) (22)
After computing the post-tax net profits, firms compute of dividends they will distribute. We assume that firms distribute a constant share (η f ) of the post-tax net profit, contingently to the level of leverage. More specifically, firms do not distribute dividends if a certain threshold of leverage (Λ max ) is exceeded. Moreover, firms do not distribute extraordinary dividends, meaning that a positive after-tax net profit is required:

Π df (t) =    η f (Π f (t) -T f (t)) if (Π f (t) -T f (t)) > 0 and Λ < Λ max 0 otherwise (23)
20 So there is no capital gains caused by changes in the level of capital goods prices.

Financial fragility of firms. From Table A2, one can check from firms' capital account that:

∆L -∆D ≡ -SAV f (24)
This is to say that the aggregate net debt (L -D) moves pari passu with firms' saving, being negatively dependent on the saving. At the firm level this must also be true. We can use (24) to position firms within the financial fragility scale proposed by Minsky, using the formalisation of [START_REF] Foley | Financial fragility in developing economies[END_REF]. The change in loans is equivalent to the new loans to a firm (N L f , eq. ( 15)), discounted the amount of debt amortisation (AM f ). 21 Abstracting the payment of dividends and taxes, the saving of the firm is the gross profits (20), deducted of the nominal investment and of the interest payments (for simplicity int f ). Substituting such variables in ( 24) and rearranging we get:

AM f (t) + int f (t) + p(t)I f (t) -Π gf (t) = N L f (t) -∆D f (t) (25)
The net new borrowing is on the right-hand side of ( 25) and the net debt increases as long as N L f -AM f > ∆D f . According to Minsky's taxonomy, there are three possible financial statuses, related to the sustainability of the net debt: hedge, speculative or Ponzi. Following [START_REF] Foley | Financial fragility in developing economies[END_REF] formalisation, a hedge firm generates sufficient operating cash flow to cover both debt service and investment expenses, so that the net debt decreases. A speculative firm manages to cover the debt servicing, but still needs to borrow to finance investment. In this case, the net debt increases, but at a slower pace than investment. Finally, a Ponzi firm cannot cover the debt servicing, implying that the net debt grows faster than investment. Using equations ( 24) and ( 25), this classification becomes:

Hedge: Π gf (t) ≥ p(t)I f (t) + AM f (t) + int f (t) Speculative: Π gf (t) ≥ AM f (t) + int f (t) & Π gf (t) < p(t)I f (t) + AM f (t) + int f (t) Ponzi: Π gf (t) < AM f (t) + int f (t) (26)
Banking sector profit. As we assume that the banking sector does not hire any workers, does not pay interest on deposits and does not buy any of firms' goods, its gross profit is equivalent to the interest revenues -both in loans granted to firms and government bills. The banking sector adds an exogenous and constant mark-up (θ B ) to the basic interest rate (i), so the interest rate on loans to firms is i l = i + θ B . So, the gross profit of the banking sector (Π B ) can be written as:

Π B (t) = i(t)B B (t -1) + t-1 j=t-λ i l (j)N L(j) λ -[t -1 -j] λ (27)
For fiscal purposes, the bank sector computes the net profits by deducting the default on loans (Def ). If the net profit of the bank is greater than zero, the income tax rate incident on net profit is the same as for firms, τ 2 (T B = τ 2 (Π B -Def (t)). Otherwise, in case of losses, the bank does not pay taxes. We also assume that it distributes a share η B of post-tax net profits as dividends to households (Π dB ) if net earnings are positive:

Π dB (t) = max[0, η B (1 -τ 2 )(Π B -Def (t))] (28)
Given the interest revenues, the cash outflows to pay taxes and dividends, as well as the write-off of defaulting loans, the evolution of bank's net worth (N W B ) can be written as:

N W B (t) = N W B (t -1) + max [0, (1 -τ 2 )Π B (t)] -(τ 2 -1)Def (t) -Π dB (t) (29)
The demand for government debt of banks (B B ) is equivalent to the idle amount of resources at the end of the period, corresponding to:

B B (t) = N W B (t) + D H (t) + F f =1 D f (t) -L(t) ( 30
)
where L is the sum of firms' outstanding debt and D H is the total households deposits.

The stock-flow consistency of entry and exit requires the absence of financial "black holes" in the model, while the entry-exit process is frequently a major source of black holes in agent based models [START_REF] Caiani | Agent based-stock flow consistent macroeconomics: Towards a benchmark model[END_REF]. In our model firms are declared bankrupt if the deposit balance is insufficient to pay interest and amortisation of debt. When firms go bankrupt, all the debt is cancelled and the assets are provisionally transferred to the banking sector. Similarly to [START_REF] Caiani | Agent based-stock flow consistent macroeconomics: Towards a benchmark model[END_REF], the banking sector then fire sales all assets to households, with a discount rate (0 < δ < 1) in capital goods. 22 If the amount of total assets is less than the total debt of the firm, then the difference between the two values enters banks' balance sheet as a default, being written-off of banks' net worth. Households then use those newly acquired assets to establish a new firm. The entrant firms will adopt the initial mark-up, while its technology is obtained by applying a factor Beta(α x2 , β x2 ) on the technological frontier (A max (t)) [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF].

Closing the accounting of the system. Government bills issuance (or withdraw) goes along with its nominal deficit. Governmental expenses include both interest payment on the previously existing public debt and the acquisition of goods from firms. Taxes are levied on all sources of households' income (described below), with an income tax rate τ 1 , and on firms' and bank's net profits, with an income tax rate of τ 2 :

B(t) = (1 + i(t))B(t -1) + p(t)G(t) -T H (t) -T B (t) - F f =1 T f (t) (31)
As we assume away capital gains of households, the change in their wealth (V ) is equivalent to households' saving once discounted the total acquisition of physical capital of bankrupt firmslet us denote this amount Φ. The income of households is composed of total wage, dividends and interest on government bills. The disbursements are the tax paid to the government (T H ) and nominal consumption. T H is given by:

T H = τ 1 [w(t)N (t) + Π dB (t) + Π df (t) + i(t)B H (t -1)] (32)
where N = f =1 F N f is total employment of the economy. The nominal consumption is straightforwardly obtained by multiplying real consumption, defined in ( 16), by the general level of prices. With those definitions, households' wealth can de described as:

V (t) = V (t -1) + (1 -τ 1 ) [w(t)N + iB H (t -1) + Π dB (t) + Π df (t)] -p(t)C(t) -Φ(t) (33)
We assume that households' wealth can be allocated either in government's debt and bank deposits. For precautionary and transactional reasons, households maintain a share β of the wealth in their banking account (D H (t) = βV (t)). The residual amount is used to buy interestbearing government bills so that:

B H (t) = (1 -β)V (t) (34)
The redundant equation of the model, which follows from the Walrasian principle, being implied by all the other equations of the system, is that the supply and the demand of public bills must be equal at all times:

B(t) ≡ B H (t) + B B (t) (35)

Calibration

A well-known feature of AB models is that they generally do not allow for closed-form solutions [START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF], so numerical simulations are necessary. Since very often AB models present non-linear, non-ergodic, stochastic and path-dependent behaviours [START_REF] Caiani | Agent based-stock flow consistent macroeconomics: Towards a benchmark model[END_REF], and the simulations are computationally demanding so preventing a complete sweep in the parameters space, numerical exercises may well be accompanied by a strong arbitrariness. We believe this is an important problem, one that should be dealt with. So, we devote a few lines to explain the calibration procedure that we follow in order to reduce the degrees of freedom of the model, increasing the reliability of our results.

The baseline calibration procedure adopted largely follows [START_REF] Caiani | Agent based-stock flow consistent macroeconomics: Towards a benchmark model[END_REF]. It starts from an aggregate version of our AB-SFC model, assuming full homogeneity of firms, equilibrium in expectations (i.e. expected values are equal to actual ones) and a steady (aggregate) growth state. So, first we derive an aggregate version of our model. Second, we constrain our model to be in a steady growth path, implying that all nominal variables are growing at the same rate, and that stock-flow ratios are constant. This results in a simultaneous system of contemporaneous equations, which can be solved numerically by setting a number of endogenous variables equal to the number of endogenous equations. A straightforward implication of this logic is that we must choose the initial values of some variables and parameters, while the remaining parameters and variables are exactly identified to match the particular exogenous values in a unique system's solution.

An imposition of a steady growth path with stock-flow consistency amounts to strong and non-trivial boundaries in system's initial values. The reason for this is that flows and stocks are connected among themselves, among the different institutional sectors and by the systemwide accounting consistency. To clarify that, let us take for instance the government sector. If the economy is in a steady growth path, the amount of government debt in t -1 is equal to B(t -1) = B(t)/(1 + g ss ), where g ss is the nominal growth of GDP. Substituting this into (31) and doing few manipulations, we get the initial value of B (the 0 subscript denotes initial value):

B 0 = 1 + g ss (g ss -i) p 0 G 0 -T H0 -T B0 - F f =1 T f 0 (36)
On the left-hand side of (36) we have the initial government debt level. On the right-hand side we have a capitalized government's primary balance (government expenditure minus taxes revenues). This equation shows that initial flows and stocks cannot be independently defined.

Let us now assume that we want to define an initial government debt to GDP ratio (as we do in our calibration). Assuming that the initial GDP is already defined elsewhere, the initial government debt (B 0 ) must assume a single value (B 0 = initial government debt to GDP × GDP). Also assuming that g ss and i are exogenously defined, there is a single primary balance consistent with B 0 . Wherever variable we choose to guarantee this single value of primary balance holds, there are repercussions in other institutional sectors flows and stocks. 23 On top of that, there are further system-wide accounting constraints that must hold (sectors' savings must sum zero, the sum of government debt held by households and banks should equal the total debt, and so on and so forth).

Regarding the setting of exogenous initial values and parameters, whenever possible we follow empirically reasonable values. For instance, we know that the share of private investment in the United States economy is about 17% of GDP,24 that the capital to output ratio should not be very far above 1.5 (see [START_REF] Franke | What output-capital ratio to adopt for macroeconomic calibrations? In[END_REF], or that the initial value of the aggregate leverage (measured as % of the market value of equity) should be within 25-40% percent range (see [START_REF] Frank | Trade-off and pecking order theories of debt[END_REF]. 25 So, we follow the empirical 'instructions' to determine initial values of our simulation.

Finally, some parameters are not required in the above-described procedure, so they can be freely set. However, there are variables with a strong stochastic component, for which the initial values depend on the 'free' parameters. This obligates us to follow a two-step procedure in the calibration. Let us take for instance the replacement investment (Eq. 10). The parameter b (payback period), the parameters defining the technological opportunities (α x , β x , x1 , x1 ) and the probabilities of success in innovation or imitation (ζ 1 and ζ 2 ) imply a certain amount of average capital depreciation (as % of the existing physical capital). The stochastic nature of the R&D process prevents us to know before simulating the model what is the average depreciation rate. Given that we want to control the investment ratio (because it is a key variable in our model), and since we have information regarding the range of real-world capital depreciation rate (see [START_REF] Franke | What output-capital ratio to adopt for macroeconomic calibrations? In[END_REF], we define the otherwise 'free' parameters to match the average depreciation rates we observe in reality. Then setting the parameters and simulating the model yields an average depreciation rate that is used to find the final investment ratio (depreciation plus real initial capital growth), which allows us to feed that information as exogenous and find the benchmark initial values for our model.

The benchmark initial values and parameters are reported in Table A3. 26 3 Results

After having calibrated the model following the above-described procedure, we run 100 Monte Carlo simulations for 700 periods. We discard 100 periods of the simulations -because these periods are strongly affected by the symmetry condition imposed in the initialisation of firms' balance sheet -so we end up with 600 periods. 27 Despite starting equals, heterogeneity rapidly emerges among firms, initially as a result of different performances in R&D. Afterwards heterogeneity persists also due to the different balance sheets, implying heterogeneous abilities to capture 'free' cash flow (i.e., gross profits discounted of debt servicing).

We explore the results of the model in three steps. Firstly, we analyse the ability of our model to replicate some microeconomic and macroeconomic stylised facts. Secondly, we explore the linkages of investment, profits, leverage and financial fragility at the firm level. Thirdly, we explore the same linkages at the macroeconomic level.

economy -after all, it is impossible to replicate all reasonable values in a model as simple as ours, and no such model should or even can claim such a thing. Instead, the spirit is just to use knowable inputs to determine reasonable initial values, so to reduce the degree of arbitrariness of the calibration. 26 The complete set of assumptions and the solution are available upon request. 27 The dataset generated by our simulations and the model's codes are available upon request.

Emerging properties and validation

The model generates endogenous growth and persistent business cycles, as can be observed in reality (cf. Fig. 2a). By separating the trend and cyclical components of the artificial time series (using the [START_REF] Baxter | Measuring Business Cycles: Approximate Band-Pass Filters for Economic Time Series[END_REF] bandpass filter) we are able to check the cyclicality of the time series as compared to the GDP. In line with well-known stylised facts, consumption and investment are pro-cyclical variables, and the latter is more volatile than GDP. Government expenditure is anti-cyclical with the Γ 1 > 0 parameter (cf. Eq. 17) we use in the benchmark simulation, and less volatile than the other components of aggregate demand (cf. Fig. 2b).

Following the representation of [START_REF] Stock | Business cycle fluctuations in us macroeconomic time series[END_REF], Table 1 displays the Monte Carlo mean and standard deviation of the cross-correlations between the bandpass filtered cyclical component of real GDP at time t and of selected variables in t -lag. Well in line with [START_REF] Stock | Business cycle fluctuations in us macroeconomic time series[END_REF] evidence, consumption, net investment, employment, and capacity utilisation are strongly pro-cyclical and coincident with GDP. In tune with the evidence presented by [START_REF] Nikiforos | On the 'utilisation controversy': a theoretical and empirical discussion of the Kaleckian model of growth and distribution[END_REF], capacity utilisation gravitates around a fairly stable (and close to the target) level in the long-run (close to 80%), as displayed in Fig. 2c. 28 Moreover, the fluctuations of capacity utilisation occur in a range similar to that observed in reality (around 70-90%, see [START_REF] Nikiforos | On the 'utilisation controversy': a theoretical and empirical discussion of the Kaleckian model of growth and distribution[END_REF][START_REF] Fazzari | Demand-Led Growth and Accommodating Supply[END_REF].

The business cycles properties of the artificial time series generated by the data are also able to match the regularities observed in reality for the inflation rate, mark-up, productivity and the changes of inventories. The inflation is pro-cyclical and lagging, mark-ups are countercyclical and lagging (see [START_REF] Bils | The Cyclical Behavior of Marginal Cost and Price[END_REF][START_REF] Rotemberg | The Cyclical Behavior of Prices and Costs[END_REF], for a discussion), and the productivity and changes in inventories are pro-cyclical.

At the firm-level, Fig. 3c shows that our model endogenously generates lumpy investment, well in tune with the empirical evidence [START_REF] Doms | Capital Adjustment Patterns in Manufacturing Plants[END_REF]. The lumpiness of investment exists when firms with spiking investment coexist with firms performing zero (or quasi-zero) investment. Furthermore, the model displays a persistent heterogeneity of firms' productivity [START_REF] Bartelsman | Understanding Productivity: Lessons from Longitudinal Microdata[END_REF][START_REF] Dosi | Statistical regularities in the evolution of industries: a guide through some evidence and challenges for the theory[END_REF][START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF], as can be checked in Fig. 3d. Since there are no patents in our model (so all technologies are potentially accessible at a first glance), the persistence emerges due to the different rate of success in innovation and imitation, and different paces of investment (when the technique are incorporated into the productive capacity). The direct implication of different labour productivities is the co-existence of different unit costs, and thus heterogeneity on the competitiveness and on the relative capacity of absorption of profits of particular firms.

Variables related to financial fragility. We now focus on the dynamics of variables that are crucial for the evaluation of financial fragility, so we can start grasping the emerging properties on the matter. First, in line with the evidence (cf. [START_REF] Zarnowitz | Composite Indexes of Leading, Coincident, and Lagging Indicators[END_REF], aggregate profit is strongly procyclical, signalling that the Kaleckian profit equation holds in our framework, and leading the cycle. Not surprisingly, since profits feeds up the deposits of the firms, both firms' deposits and liquidity ratio (deposits over physical capital) are also pro-cyclical and leading (cf. Table 1).

Moreover, both the firm-level and aggregate leverage matches several stylised facts. We measure leverage as total debt over total assets. 29Second, the cross correlations also show that aggregate debt, leverage, and net leverage are strongly pro-cyclical. This is in line with the empirical evidence regarding the pro-cyclicality of credit (see [START_REF] Lown | The Credit Cycle and the Business Cycle: New Findings Using the Loan Officer Opinion Survey[END_REF][START_REF] Leary | Bank loan supply, lender choice, and corporate capital structure[END_REF]. The pro-cyclicality of debt/indebtedness variables is related to the cyclical timing of profit and investment fluctuations in the business cycles: profits start falling before investment, implying lower cash flows and subsequently a higher ex-post debt financing of investment.

Third, the leverage ratio is very persistent at the micro (cf. [START_REF] Lemmon | Back to the beginning: Persistence and the cross-section of corporate capital structure[END_REF], for an empirical discussion) and the macro (cf. [START_REF] Frank | Trade-off and pecking order theories of debt[END_REF] levels. In Fig. 3e, this is represented by the high levels of leverage autocorrelation. The transitional probabilities of the firm-level leverage -i.e., the probabilities of change in the leverage from t to t + 1 given the beginning-of-period leverage -shown in Fig. 3f also depict the persistence of leverage. Likewise, Fig. 3f closely harmonise with the transitional probabilities observed in reality (compare Fig. 3f to the Table 5 of [START_REF] Frank | Trade-off and pecking order theories of debt[END_REF]). As one can easily check in Fig. 3f, the probability that a firm remains with the same level of leverage in the following period is higher at the extremes of the distribution. 30 Firms with a low leverage tends to remain with a low leverage; firms with a very high leverage have a hard time reducing it; and finally, there is more mobility in the middle of the distribution.

The reasoning behind the persistence can be described as follows. On the one hand, low leverage implies low financial commitments. A low debt servicing implies a high amount of free cash flows, accelerating the pace of liquidity accumulation, which reduces the likelihood that a particular firm will need external funds in the future, and so on and so forth. On the other hand, firms with high leverage have high cash disbursements to cover the debt servicing, making it difficult to accumulate liquidity because of the low level of free cash flows. Of course, between those two extremes the cases are more nuanced and less inertial.

Fourth, the mode of firms' leverage is 0. Indeed, 9.6% of the firms exhibit zero leverage in all Monte Carlo replications, which is very close to the frequency of such phenomenon in the US case (10.2% from 1962 to 2009), as reported by [START_REF] Strebulaev | The mystery of zero-leverage firms[END_REF]. The 0 mode clearly has important implications for the aggregate leverage (and for financial fragility), particularly when big firms carry out no debt.

Those features related to the behaviour of leverage are very important for financial fragility and the reasoning underlying such emerging properties are further discussed in subsections 3.2 and 3.3.

Finally, despite the fact that all firms start equally, endogenous heterogeneity in firms' financial status emerge. As suggested by the evidence [START_REF] Pedrosa | Firms' leverage ratio and the Financial Instability Hypothesis (FIH): an empirical investigation for the United States economy (1970-2014)[END_REF][START_REF] Davis | An empirical analysis of Minsky regimes in the US economy[END_REF], smallest firms are more likely Ponzi than biggest firms, whereas biggest firms have a higher probability of being hedge -see the difference between simple and weighted mix of financial statuses, in Fig. 3a and Fig. 3b. Still using the same figures, notice that the mix of financial postures fluctuates over time, meaning that systemic financial fragility is time-variant.

To create a cleaner depiction of the system-wide financial fragility, we created a financial fragility index by attributing discrete values to each financial status and then weighting the frequency of each financial status by the size of the firm. Following the scale of fragility, we arbitrarily set a 0 value for hedge, 1 for speculative and 2 for Ponzi firms. This index varies between 0, where all firms are hedge, so the economy displays no financial fragility at all; -and 2, where all firms are Ponzi, in which case fragility is maximum.

The index for a single simulation is shown in Fig 6a . Minsky has not always clear about the periodicity of the cycles of financial fragility he was talking about. In some of his works, it appears that he was describing long waves of fragility build-up (e.g. [START_REF] Minsky | Longer Waves in Financial Relations: Financial Factors in the More Severe Depressions[END_REF], while in others the discussion tends to short to medium run cycles (e.g. [START_REF] Minsky | Monetary Systems and Accelerator Models[END_REF][START_REF] Minsky | A Linear Model of Cyclical Growth[END_REF] (see Ryoo, 2010, for a discussion). In what concerns our model, both short cycles and long waves emerge. The short cycles are represented by the fluctuations of financial fragility over the business cycles. As shown in Table 1, the financial fragility is strongly pro-cyclical and lagging in one period. The reason for that is again related to the timing of the fluctuations: the debt (and therefore firms' financial commitments) reaches its peak after the profits already started falling, so there is a tendency of mismatch between cash flows and cash commitments.

In contrast with the straightforward reasoning for the short cycles, the emergence of long waves of financial fragility requires further exploration of the mechanisms underlying the dynamics of leverage, profits, and investment. We do that below, starting at the firm-level.

Firm-level leverage dynamics

Let us now analyse the dynamics that emerges from the interaction of investment, profits and leverage at the firm-level. We first analyse the dynamics of leverage conditional to investment and profitability, and then the financial fragility of the firms.

Fig. 4 depicts the simulated dynamics of the firm-level leverage according to the amount of investment a firm performed and to the profitability it managed to obtain. The dynamics of leverage is captured by the pooled (all Monte Carlo replications) distribution of 10-periods ahead cumulative change in firm leverage, which are the figures plotted in the boxplots. The profitability is captured by the gross profit rate, and its distribution is an ex post measure of the soundness of past investment decisions as compared to the other firms. The ability of a particular firm to generate cash flows is related to its cost competitiveness vis-à-vis other firms, to the mark-up, and depends on the level of aggregate demand. 31 In Fig. 4, each box represents a part of the distribution of the profit rates: the profitability of firms increase reading from the left to the right. The distribution of the 10-periods average 31 Fig. 4 does not distinguish the initial level of firms' leverage. Since the leverage is very persistent, the inertia of leverage tends to be carried over time. Similarly, it does not separate the momentum of the business cycle. As the leverage is pro-cyclical in our model, recessions tends to be accompanied by lower leverages and vice-versa. Both simplifications tend to overestimate the dispersion of the data plotted in Fig. 4, so the data shown on it underestimate the results we are stressing. Even so, the results we depict hold. Despite we only show one Monte Carlo replication, these results are robust across different seeds.

Figure 4: Distribution of the pooled (all replications), 10-periods ahead, cumulative change in firm leverage, organised according to the distribution of firms' profitability and investment ratio. The profitability and investment ratios are calculated as a 10-period compound average for each firm. investment ratio controls for the impact of higher financing needs associated with higher investment activities. Within each box, we represent the quartiles of the investment ratio, and also reading from the left boxplot to the right one, we get firms with higher investment ratio. 32 By reading the plot from the left to the right box we can analyse the firm-level profitabilityleverage nexus. Given the level of investment, more profitable firms either tend to accumulate less debt or to de-leverage. 33 The reason for that is that more profitable firms tend to accumulate more deposits, hence needing to rely less in external financing. Although this relation is generally true, for a given profit rate, the speed of accumulation of deposits depends on the past leverage. A high (low) leverage implies a high (low) financial commitment, reducing (increasing) firms' free cash flow. So, a firm with low leverage will have an easier time accumulating more deposits than firms that with higher leverage. This is an important reason for the persistence of the leverage.

By reading within each box of Fig. 4, we can analyse the association of investment and leverage. From the left to the right, notice that firms with higher investment rates tend to accumulate more debt. The reason is also simple: higher investment requires greater cash disbursements, likely increasing the need for external funds. 34 32 Not necessarily a firm stays in the same group of profitability within 10 periods of time. In order to have a more reasonable representation, we discard observations in which firms did not belong to the same distribution group, as per the profitability, for less than 5 periods. This amounts to discarding 40% of the data. Even if this assumption is necessary for a better representation, the overall picture does not change if we relax it. 33 The negative association between profitability and leverage is a robust empirical stylised fact. See [START_REF] Frank | Capital Structure Decisions: Which Factors Are Reliably Important[END_REF] for a discussion. 34 Also notice that high investment is pervasive across different levels of profitability (the width of each whisker is Note: a firm is defined as Minskian if the new loans contracted at the beginning of the period are greater than the end-of-period retained earnings, corresponding to a positive (ex-post) net debt financing of investment.

Those two results regarding the profitability-leverage and investment-leverage nexus are interesting but largely intuitive. However, when we take the joint impact of investment and profitability on the direction and intensity of firms' cumulative change in leverage it is possible to see clearly the role played by the heterogeneities of firms. What is important to assess is the joint impact is the sign and the dimension of the change in leverage triggered by investment decisions. Fig. 4 shows that firms with the lowest level of profitability tend to experience an increase in leverage for all quartiles of investment. Besides that, in the same group, changes in leverage are strongly elastic to the investment rate, being in this sense well classified as Minskian firms -which, as defined above, occurs when an increase in investment triggers an increase in leverage because firms need more external funds. Conversely, firms with higher profitability tend to experience a drop (or a very small increase) in leverage regardless of the investment ratio. In this group, the change in leverage is inelastic to the increase in investment, in line with a Steindlian regime: even if investment increase, the leverage decrease because profits rise, irrigating the cash balance of firms, thus more than compensating the big investment disbursements.

proportional to the number of observations in each group), so even firms with a low level of profitability invest. The reasoning is threefold. First, if the firm has a low mark-up, the profitability tends to be low, but then it is possible that the firm is gaining market share and facing a high capacity utilisation, triggering an expansion of capacity. Second, the aggregate demand is increasing at a fast pace and even firms losing market share are experiencing a growth of sales. Third, the firms have low-productivity capital batches and they are replacing them by higher-productivity ones trying to catch up with the competitors. Of course, those three factors are not mutually exclusive. This is well in line with the evidence that investment and growth are not restricted to more profitable firms. See [START_REF] Dosi | Statistical regularities in the evolution of industries: a guide through some evidence and challenges for the theory[END_REF] for a discussion.

The co-existence of both Minskian and Steindlian firms pose some important issues for bridging of firm-level and aggregate leverages. According to [START_REF] Lavoie | Post-Keynesian Macroeconomics: New Foundations[END_REF], in a Minskian debt regime the aggregate leverage increases along with investment, whereas in a Steindlian debt regime the leverage goes down. Since there exists both Minskian and Steindlian firms, the balance between them should show some relation with the dynamics of aggregate leverage.

Obviously, there is no reason for the balance between those two types of firms to be constant over time. Indeed, as shown in Fig. 5a, the proportion of Minskian firms -a weighted (by size) frequency of firms with positive ex post debt financing -35 fluctuates cyclically around a trend, which is not constant over time. 36 The interesting part is that the balance of Minskian and Steindlian firms leads the changes in the aggregate leverage. This is shown by the moderately high levels of cross correlation in Fig. 5b for the complete series (cycle + trend). The correlation is even stronger in terms of trends, but then the timing (if the series are coincident or the frequency of Minskian firms is leading leverage) is less clear. To further explore why this happens, we need to further explore the emerging macroeconomics of the model, which we do below.

Macroeconomic determinants of financial fragility

We now turn to the dynamic determinants of the systemic-fragility. Recall that: i) the financial posture of individual firms is obtained by scaling together the gross profits (cash flow), the financial commitments and the amount of investment of each firm; ii) the aggregate financial fragility is assessed by means of the mix of financial postures. The most important implication of financial fragility is the systemic one, as opposed to the firm-level one. Since the passage from the micro level to the macro level analysis of financial fragility is one core tension within Minsky's FIH, one question that emerge is how well aggregate variables can account for changes in systemic financial fragility.

The reasons for concerns are twofold. The first one is related to the pro-cyclical nature of profits: the increase of investment brings forth new liquidity to the firm sector, so the assumption of given cash flows made by Minsky (e.g. 1975b) is largely inadequate for a macrodynamic evaluation of leverage [START_REF] Lavoie | Minsky's financial fragility hypothesis: a missing macroeconomic link[END_REF]Toporowski, 2008, among others). As shown in section 3.1, this problem is duly addressed in our model, as the aggregate profit is procyclical and there are dynamic feedbacks from the cash flows to the net leverage. The second reason for concern is that firms have idiosyncratic abilities to capture the liquidity brought by the increased investment, with implications for the distribution of the leverage amongst firms. This allows us to deal with the hypothesis raised by [START_REF] Toporowski | Minsky's 'induced investment and business cycles[END_REF][START_REF] Toporowski | Corporate Liquidity and Financial Fragility: The Role of Investment, Debt and Interest[END_REF], i.e, that distri-butional issues are important potentially important for the dynamics of the leverage and of the financial fragility. By design, this issue is contemplated in our model, since firms have different labour productivities, growth rates, mark-ups, and we take in full the implications of stock-flow consistency. Then we need to assess precisely how and to what extent distribution of profits amongst firms shapes the dynamics of leverage and financial fragility.

A visual inspection of the joint behaviour of financial fragility index, gross profit rate, aggregate leverage and investment ratios, with a focus on trends (respectively Fig. 6a, b, c andd), shows that it is not easy to tell a general macroeconomic story about systemic fragility. There are several reasons to that: (i) the fluctuation between Minskian and Steindlian debt regimes discussed in 3.2 implies that during some moments the leverage will increase along with the profits, whilst in others the movement is opposed. In case the leverage is increasing along with profits, the general impact on financial fragility will be ambiguous, since both cash flows and cash commitments augments; (ii) the trends of investment and profits move together (with some lag), posing the same kind of problem present in as previously; (iii) notice that even though the aggregate leverage does have some impact on the trend of financial fragility, the size-effect is small (compare Fig 6a and6c). However, we observe longer-term changes in the level around which the aggregate leverage (and the number of Minskian firms) and the systemic financial fragility fluctuates.

For a unit financial fragility, what matters is the amount of profits receive compared to the leverage it has. For instance, imagine that aggregate profit rate increases, but the marginal increase in aggregate profits goes to firms with very low (or zero) leverage. There is no reason for the systemic fragility to change, considering that the profits of firms with higher financial commitments remain unchanged. In light of this problem, for the evaluation of the distributional impact on financial fragility we need an index to measure the distribution of profits relatively to the total debt a firm holds in a given point of time. We call such measure the profit-debt distribution index.

The profit-debt distribution index, inspired by the concentration index of [START_REF] Kakwani | Measurement of tax progressivity: an international comparison[END_REF], is calculated in three steps. First, we rank firms according to the leverage ratio at the beginning of each period. Second, we calculate the cumulative proportion of profits and the cumulative proportion of debt, both ordered according to the rank-leverage. If we plot the cumulative debt in the x-axis and the cumulative profit in the y-axis we get a Lorenz curve (see Fig. 6f for an example). The equality line -i.e., the situation in which each firm profit is exactly proportional to the firm debt -is a 45-degree line. The third step is to calculate the area between the Lorenz curve and the equality line. Formally, the profit-debt distribution index is defined as:

DI = 2 1 0 [z -L(z)]dz (37)
Thus, the index is twice the area between the equality line (y = z) and the Lorenz curve (L(z)).

The index is a comparison between the joint concentrations of profits and debt (ranked by the (f) Cumulative proportion of profits and debt at highest and lowest profit-debt distribution index leverage), that allows us to evaluate which maldistribution is dominant in a single point, and to quantify how the relative dominance changes over time. The index lies in the [-1, 1] interval. It assumes a value -1 when all the profits are concentrated on the lowest value of debt, and negative figures implies that the profit-debt distribution curve lies above the equality line. Conversely, if the index is equal to 1, then all the profits are concentrated on the highest values of leverage, and positive figures implies that the profit-debt distribution curve lies below the equality line.

If the index assumes a value 0, the profits of firms are on average proportional to the respective debts.

Needless to say, there is no mechanism to assure this happens. Indeed, in general the index presents negative figures,37 as one can check in Fig. 6e, signalling that firms with low leverage are receiving a disproportionate share of profits as compared to the share of outstanding debt (profits are concentrated in firms with low leverage). Two examples of the Lorenz curves are shown in Fig. 6f: the highest and the lowest profit-debt distribution index observed in a single simulation -respectively, in periods T = 333 and T = 48. Fig. 6f also allows us to have a first glance of what is dominating the index. Clearly, the share of profits of firms with zero or very low leverage has a strong influence in the shape of the profit-debt joint distribution, exerting a strong impact on the value of the index. In the highest concentration case, firms with zero leverage were capturing about 35% of total profits, whereas in the lowest concentration case firms with zero leverage captured less than 10% of total profits.

More general information of what kind of movements within leverage quartiles the index is capturing can be gathered in Fig. 7, which refers to pooled data in all Monte Carlo replications. It depicts the 2-dimensional kernel density estimation of the joint distribution between the profit-debt distribution index and the contribution of each quartile to total leverage (quartile's total leverage multiplied by the share of quartile's assets to total). The suggested interpretation of it is as follows. Having the profit-distribution index as a benchmark, most of the variability of the aggregate leverage takes place in the second and the first quartiles. In these quartiles, higher (lower) DI concentrations tends to be accompanied by lower (higher) leverage. Within the third and fourth quartiles of debt, the total contribution to total leverage tends to be much less sensitive to changes in the profit-debt distribution. Now that we discussed what our index is broadly capturing, it helps us in analysing two features of the model. First, we can understand in more details what drives the aggregate leverage and its persistence. Second, and related to the dynamics of leverage, we can discuss in more details the determinants of systemic financial fragility.

In terms of the aggregate leverage, the distribution of profits amongst firms appears as an

Contribution of quartile to total leverage

Profit-debt distribution index important driver of total indebtedness. The reasoning is that shifts in the distribution of profits relatively to the leverage impact on the accumulation of liquidity in the firm sector. The liquidity of the firms (and which firms are holding most of it) is the transmission mechanism to the aggregate leverage. When the index is decreasing (or the more negative it is), profits are becoming more concentrated in firms with very low (or zero) debt. Low leverage implies low cash disbursements with financial commitments. Since an important share of profits is flowing to firms with low financial commitments, the aggregate amount of free cash flows increases, accelerating the sector-wide pace of liquidity accumulation. Particularly, the accumulation of liquidity is concentrated within low-leverage firms. The high liquidity of these firms tends to be highly inertial: more liquidity translates into a low need of external funds for investment and production, which dynamically feedbacks to a lower leverage and so on. As measured by our index, when some concentration is happening (or the concentration is very high), we have a Steindlian regime. In our model, these tend to be the points where Steindlian firms (trendily) prevail.

Conversely, an increase in the index (or the less negative it is) means that low-levered firms are becoming less successful in capturing profits, whereas some of the more levered firms are capturing comparatively more profits. This is generally associated with an increase in aggregate leverage. The reason for that is related to a fall in the rate of accumulation of deposits. Such reduction in the pace of liquidity accumulation occurs because of a relative fall in the free cash flows in the firm sector as a whole. When some de-concentration is happening (or if the concentration is not very high), we have a Minskian regime. In our model, these tend to be the points where Minskian firms (trendily) prevail.

The fluctuation between both Minskian and Steindlian regimes is what tend to stabilize the aggregate leverage within a relatively narrow range (the leverage is not explosive neither upwards or downwards).

Firms' heterogeneity with respect to the cash holding provides a floor (not necessarily the same in different circumstances) in the case the leverage is going down. A numerical example is illustrative. Suppose a case with only two firms, that are equivalent in everything (size, investment demand, price, unit cost, mark-up, etc.) except the initial amount of deposits. Also assume that firm 1 and firm 2 have respectively 75$ and 25$ of deposits. Supposing that those firms wants to invest each 20$, and that production will cost 25$, firm 1 is fully capable of financing the planned investment with its own fund, whereas firm two will need to borrow 20$ to invest (see Eq. 15). If the firm's sector was taken as an aggregate, there would be no need for new loans (total deposits = 100$, total production costs = 50$, total investment = 40$, so there would still remain 10$ of free deposits before the goods market opens). Therefore, the heterogeneity of firms prevents the leverage from going ever down.

In the opposite direction, when the leverage is going up, the leverage is also non-explosive (even in the absence of credit-rationing in our model). As we already discussed above, the leverage is going up when shifts in the distribution of profits relatively to the debt-leverage of firms are occurring. These shifts cannot persist forever, as firms display persistent differences in labour productivity and abilities to capture profits. Either the initially low-levered firms that were losing relative competitiveness revert the initial trend and start accumulating liquidity again, or the firms with initially higher leverage will manage to gradually reduce their indebtedness and start accumulating liquidity after the de-leveraging is accomplished.

What are the implications of the just discussed behaviour of aggregate leverage for the system-wide financial fragility? In general, while there is a relation between the aggregate leverage and financial fragility, the long-run (i.e., trend) elasticity of systemic fragility to the leverage is not very high as very often is assumed in the financial fragility literature. Rising leverage (ceteris paribus) is generally associated with a strong increase of financial fragility.

Fig. 8a, b, c and d show respectively the conditional effects of the gross profit rate, aggregate leverage, investment ratio, and the profit-debt distribution index on the predicted financial fragility index. The conditional effects were obtained by fitting a linear (OLS) model with robust (Newey-West) standard errors. We use the pooled artificial data for all Monte Carlo replications, and control for level shifts of financial fragility in each simulation. We do not distinguish cycle and trend component, meaning that we use the complete series. Fig. 8 the partial influence of each variable in the prediction of the systemic fragility, once the effects of the other variables are duly considered (being conditional in this sense). It further considers the range of variance of each explanatory variable to calculate the marginal effects, so we can quantify properly the impact considering the different scale of each variable (for instance, the investment to capital ratio ranges from 0.04 to 0.18, while the leverage ranges from 0.07 to ≈ 0.4 in all simulations), instead of simply looking at the coefficients. All the variables are significant (correcting for serial autocorrelation) with a very high level of confidence (not reported for space limitations). Not surprisingly, the signs of the effects are just as expected: higher profit rates diminish financial fragility, everything else constant; higher investment ratios increase financial fragility; higher leverage raises the expected financial fragility; a higher concentration of profits in less levered firms (signed by a lower profit-debt concentration index) increases financial fragility.

As concerns the profit-debt concentration index, the intuition for its negatively-sloped impact is as follows. If the profits are too concentrated in low-leverage firms (with small financial commitments), firms with higher leverage (and higher financial commitments) have insufficient cash flows to cover the debt servicing, being pushed towards speculative and Ponzi financing schemes. The opposite is also true, thus for a given level of leverage, investment and profit rates, multiple levels of financial fragility may occur. As one can check in Fig. 8, the size of the effect of the profit-distribution index is definitely not negligible. Taken alone, the index may explain considerable changes in the financial fragility index. Within the range of variability of the index, the expected financial fragility may change as much as 50%.

However, from what we discussed above, the profit-debt distribution index tends to move along with the leverage. For instance, when the leverage is increasing, generally the index is increasing, indicating a lower concentration of profits within the less levered firms and that more indebted firms are receiving more profits than before. Since the impact of a higher leverage and a lower concentration on the expected financial fragility have different signs (+ and -, respectively), the impact of a higher leverage on financial fragility is bumped. 38 Accordingly, this is fully in line with the discussion of what the index is capturing: since the leverage is increasing in the bottom half of the distribution (see Fig. 7), the trigger of a higher leverage is not necessarily very detrimental to systemic financial fragility. At the same time, the more levered firms are receiving more profits, more likely being able to fulfil the existing debt servicing. All this implies that the elasticity of systemic financial fragility to the aggregate leverage seems not to be very high. For this reason, the financial fragility index hardly ever becomes too high (greater than 1, indicating a prevalence of speculative and Ponzi financing), once we consider that the aggregate leverage is running in realistic levels. 39Therefore, as far as the systemic financial fragility is concerned, the distribution of profits amongst firms is crucial in order to determine whether a system is stable or not and should complement an aggregate analysis. Accordingly, a serious accounting of systemic fragility needs to be bottom-up because distributional issues matter for the dynamics of leverage and financial fragility itself. This is an unsettled issue in the literature, which tends to focus more on the distribution of wages and profits and tends to provide too an aggregate analysis, probably influenced by some of Minsky's own work. 40 The distribution of profits amongst firms does matter, both statically (immediately for financial fragility) and dynamically (because of the dynamics of leverage).

Conclusions

Minsky's FIH has been criticized because, in its second macro version, financial fragility tends to increase endogenously over the cycle along with the macroeconomic leverage ratio. This analysis does not consider the pro-cyclicality of profits and neglects distribution.

Our paper has taken these criticisms seriously by building an agent-based stock-flow consistent model which integrates the real and financial sides of the economy in a fundamentally dynamic environment. We have calibrated and simulated our model and shown that the dynamics generated are in line with empirical evidence both at the micro and the macro levels. Our model generates endogenous growth and persistent business cycles; aggregate profit is strongly pro-cyclical; aggregate debt, leverage, and net leverage are strongly pro-cyclical; and the leverage ratio is very persistent at the micro and the macro levels. Part of the value-added of this paper is the creation of a financial fragility index that allows us to show how financial fragility changes along the cycle.

In our model, in line with the critique of [START_REF] Lavoie | Minsky's financial fragility hypothesis: a missing macroeconomic link[END_REF], the Kaleckian profit equation is valid. Furthermore, considering the critique of Toporowski, we show that the distribution of profits amongst firms does matter for financial fragility. Our model yields fluctuations between Minskian regimes, in which the aggregate leverage increases along with investment and Steindlian regimes, where investment brings leverage down. Minskian debt regimes tends to exist in situations in which less levered firms are losing capacity to capture most of the profits. Our results suggest a dynamically inverted causality between cash flows and cash commitments: cash flows cause leverage at the micro level. However, the aggregate leverage dynamics depends on how profits are distributed among firms: it may be not sufficient to look to aggregate leverage and profit dynamics to assess the financial fragility of non-financial firms.

Consequently, our key findings are that the sensitivity of financial fragility to aggregate leverage is not as important as it is usually assumed in the literature; and that the distribution of profits amongst firms does matter for the stability of the system, both statically (immediately for financial fragility) and dynamically (because of the dynamics of leverage).

Therefore, the key economic policy message of this paper is that financial regulation should try to focus more on the distribution of profits amongst firms than on the aggregate leverage ratio. While multiple authors quoted in this paper tend to rightly focus on the issue of income distribution between wages and profits, our paper highlights the crucial importance of improving the distribution of profits within the firm sector.

Needless to say, there are important limitations to our model that are as many reasons to expand the model in order to enrich it and make it more realistic. Amongst others, a stimulating extension of the model, crucial for monetary policy, would be to introduce a banking sector that becomes more or less accommodative along the cycle, which can reinforce the cyclicality of the economy, and/or a central bank that implements restrictive or expansionary economic policies depending on the distribution of profits and hence leverage within the firm sector.

A Appendix

p k,f k f,j + F f =1 κ k=t-1 p k,f k f,j Inventories + F f =1 c f IN V f + F f =1 c f IN V f Bills +B H +B B -B 0 Loans - F f =1 L f + F f =1 L f 0 Deposits +D H + F f =1 D f -D 0 +N W H + F f =1 N W f +N W B -B + F f =1 κ k=t-1 p k,f k f,j + F f =1 c f IN V f

Figure 1 :

 1 Figure 1: Flow diagram at the firm-level highlighting the real-financial interactions. Arrows point the direction of influence.

Figure

  Figure 2: Aggregate demand and cyclical components

Figure 3 :

 3 Figure 3: Simulation results for the micro data.

  Firm-level leverage transition rates (pooled simulation) Note: Results are plotted for a single simulation unless we explicitly say otherwise.

Figure 5 :

 5 Figure 5: Trend components of the proportion of Minskian firms, weighted by the total assets of each firm, and the cross correlation of aggregate leverage and Minskian firms (complete series and bandpass filtered trends).

Figure 6 :

 6 Figure 6: Systemic financial fragility and related variables in a single simulation.

Figure 7 :

 7 Figure 7: Contours of a 2-dimensional kernel density estimation, showing the 2D distribution of the profit-debt distribution index and the contribution of each quartile of leverage to total leverage (quartile's leverage × share of quartile's assets). Data is a pool of all Monte Carlo replications.

Table 1 :

 1 Correlation structure of aggregate variables of the artificial economy, bandpass filtered series(6, 32, 12).

	Series				Cross correlations with output
		t -4	t -3	t -2	t -1	t	t + 1	t + 2	t + 3	t + 4
	Output	-0.69	-0.446	0.141	0.745	1	0.745	0.141	-0.446	-0.69
		(0.0038) (0.0056) (0.0043) (0.0014)	(0)	(0.0014) (0.0043) (0.0056) (0.0038)
	Investment	-0.503	-0.509	-0.201	0.32	0.792	0.942	0.675	0.135	-0.384
		(0.0032) (0.0054) (0.007) (0.005) (0.0018) (0.0006) (0.0016) (0.0042) (0.0056)
	Net investment	-0.785	-0.633	-0.079	0.577	0.949	0.819	0.294	-0.287	-0.583
		(0.0021) (0.0042) (0.0035) (0.0013) (0.001) (0.0016) (0.005) (0.0075) (0.0066)
	Consumption	-0.701	-0.484	0.097	0.717	0.997	0.757	0.152	-0.447	-0.702
		(0.0036) (0.0055) (0.0044) (0.0015) (0.0001) (0.0014) (0.0042) (0.0056) (0.0038)
	Government expenditure	0.857	0.471	-0.186	-0.742	-0.887	-0.573	-0.042	0.362	0.425
		(0.0022) (0.0023) (0.0015) (0.0021) (0.001) (0.0041) (0.0081) (0.009) (0.0061)
	Capacity utilisation	-0.763	-0.611	-0.057	0.602	0.974	0.839	0.298	-0.305	-0.619
		(0.0025) (0.0045) (0.0037) (0.0012) (0.0002) (0.0014) (0.0046) (0.0068) (0.0054)
	Employment	-0.72	-0.485	0.104	0.721	0.998	0.764	0.174	-0.41	-0.663
		(0.0033) (0.0053) (0.0039) (0.0012)	(0)	(0.0016) (0.0047) (0.0061) (0.0043)
	Inflation	-0.406	0.023	0.478	0.659	0.441	-0.035	-0.455	-0.555	-0.296
		(0.0058) (0.0053) (0.0044) (0.0042) (0.0043) (0.0051) (0.0056) (0.0051) (0.0047)
	Markup	0.041	-0.035	-0.104	-0.129	-0.099	-0.029	0.045	0.088	0.086
		(0.0033) (0.0033) (0.004) (0.0046) (0.0041) (0.0033) (0.0033) (0.0039) (0.0041)
	Productivity	0.334	0.564	0.657	0.527	0.195	-0.21	-0.514	-0.601	-0.473
		(0.0064) (0.0046) (0.0025) (0.002) (0.0024) (0.0027) (0.0025) (0.003) (0.0053)
	Change in inventories	-0.656	-0.292	0.31	0.768	0.782	0.342	-0.257	-0.633	-0.575
		(0.0179) (0.0087) (0.0135) (0.0237) (0.0207) (0.009) (0.0143) (0.022) (0.0165)
	Debt	-0.067	0.318	0.677	0.81	0.624	0.195	-0.263	-0.539	-0.54
		(0.0065) (0.0056) (0.0031) (0.0017) (0.0019) (0.003) (0.0037) (0.003) (0.0034)
	Leverage	-0.061	0.299	0.649	0.801	0.649	0.246	-0.214	-0.523	-0.569
		(0.0066) (0.0061) (0.0034) (0.0017) (0.0018) (0.0026) (0.0035) (0.0031) (0.003)
	Firms deposits	-0.379	-0.469	-0.286	0.133	0.578	0.79	0.643	0.225	-0.224
		(0.0042) (0.0048) (0.0076) (0.0074) (0.0048) (0.0027) (0.0035) (0.0053) (0.0062)
	Firms' liquidity ratio	-0.319	-0.667	-0.711	-0.355	0.236	0.731	0.853	0.558	0.057
		(0.0065) (0.0022) (0.0042) (0.0057) (0.0047) (0.0033) (0.002) (0.0042) (0.0074)
	Net leverage	0.148	0.609	0.88	0.773	0.313	-0.264	-0.659	-0.699	-0.432
		(0.0073) (0.004) (0.0009) (0.001) (0.0012) (0.0031) (0.003) (0.0021) (0.0061)
	Aggregate profits	0.285	-0.177	-0.593	-0.634	-0.217	0.41	0.837	0.781	0.285
		(0.0071) (0.0042) (0.0037) (0.0053) (0.0046) (0.0021) (0.0015) (0.0019) (0.0033)
	Financial fragility index	-0.477	0.036	0.631	0.943	0.773	0.22	-0.38	-0.686	-0.573
		(0.0064) (0.0057) (0.0031) (0.0013) (0.0018) (0.0044) (0.006) (0.0046) (0.0034)

Source: authors' elaboration based on model's simulation. Monte Carlo mean and standard deviations.

  reports Figure 8: Conditional effects of each variable (gross profit rate, aggregate leverage, investment ratio, and the profit-debt distribution index) explaining the financial fragility index, obtained by fitting a linear (OLS) model with robust (Newey-West) standard errors. We use the pooled database of all Monte Carlo replications.

		0.8				0.8
	Financial fragility index	0.4 0.6			Financial fragility index	0.4 0.6
		0.2
						0.2
		0.12	0.16	0.20	0.24	0.1		0.2	0.3		0.4
			(a) Gross profit rate				(b) Leverage
		0.9				0.70
	Financial fragility index	0.6 0.7 0.8			Financial fragility index	0.55 0.60 0.65
		0.5
						0.50
		0.4
		0.04	0.08	0.12	0.16	-0.7	-0.6	-0.5	-0.4	-0.3	-0.2
			(c) Investment to capital ratio			(d) Profit-debt distribution index

Table A1 :

 A1 Aggregate balance sheet of the economy

	Households		Firms	Banks Government
		F	κ
	Capital Stock	+
		f =1	k=t-1

Table A2 :

 A2 Aggregate transactions and flow of funds

		Households	Current	Firms	Capital	Current	Banks	Capital	Govt.
	Wages	+w

The discussion of the prospective turning points goes well-beyond the scope of this paper. See[START_REF] Minsky | Can "it" happen again? Essays on instability and finance[END_REF], Delli[START_REF] Delli Gatti | At the Root of the Financial Instability Hypothesis: "Induced Investment and Business Cycles[END_REF],[START_REF] Toporowski | Theories of Financial Disturbances[END_REF] and[START_REF] Lavoie | Post-Keynesian Macroeconomics: New Foundations[END_REF] for a discussion of this issue.

This notion is based on the accelerator effects of investment, starting from the firm-level, well in line with Minsky's views in his Ph.D. thesis[START_REF] Minsky | Induced investment and business cycles[END_REF][START_REF] Minsky | Induced investment and business cycles[END_REF]).

 3 Minsky argues that the "balance sheet at any moment of time of units that make up the economy are 'snapshots' of how one facet of the past, the present, and the future are related"(Minsky, 1982, p. 20). In principle, any Minskian model should feature a debt structure, but this is mostly absent in existing Minskian formal models. See Dos[START_REF] Santos | A Stock-Flow Consistent General Framework for Formal Minskyan Analyses of Closed Economies[END_REF],[START_REF] Nikolaidi | Minsky models: a structured survey[END_REF] and[START_REF] Nikolaidi | Three decades of modelling Minsky: what we have learned and the way forward[END_REF] for a survey on the features incorporated in the formal Minskian

literature.4 Among the vast field attempting to explain the determinants of firms' capital structure, two theories stand out: the pecking order and the trade-off theories(Frank and Goyal, 2008, 2009). On the one hand, the pecking order theory of debt was proposed by[START_REF] Donaldson | Corporate Debt Capacity: A Study of Corporate Debt Policy and the Determination of Corporate Debt Capacity[END_REF] and revived by[START_REF] Myers | The Capital Structure Puzzle[END_REF] [START_REF] Riccetti | Leveraged network-based financial accelerator[END_REF]. The core of this theory is that, due to adverse selection and asymmetric information, firms prefer internal funds, and only if internal funds is not sufficient firms look -in this order -to debt or equity financing[START_REF] Frank | Trade-off and pecking order theories of debt[END_REF]. On the other hand, the trade-off theory postulates that firms balance the tax saving nature of debt with the increased bankruptcy costs that comes with a higher leverage. Dynamic versions of the trade-off theory imply that firms have an explicit target of leverage in the long run[START_REF] Flannery | Partial adjustment toward target capital structures[END_REF]. While both theories provide compelling arguments, the empirical literature finds conflicting evidence on the relative strength of both. Given the dramatic differences in model's specifications in the literature,[START_REF] Frank | Capital Structure Decisions: Which Factors Are Reliably Important[END_REF] investigate the factors that are reliably important in determining firms' leverage, finding that a robust negative relation among profitability and leverage. In what concerns our model, this is the most important relation to be considered. See for instance[START_REF] Riccetti | Leveraged network-based financial accelerator[END_REF] for a model applying the trade-off financial structure in an agent-based framework.

The hybrid AB-SFC approach, with microfounded firms and other sectors treated as aggregate, is not unprecedented in the literature. See for instance[START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF] and Di Guilmi and Carvalho (2017) for similar approaches. For a survey of the AB-SFC models, see Di Guilmi (2017).

Besides being an important real-world phenomenon, credit rationing is often a feature highlighted in Minskian models as a cause of financial instability (e.g. Delli[START_REF] Delli Gatti | A new approach to business fluctuations: Heterogeneous interacting agents, scaling laws and financial fragility[END_REF]Gatti et al., , 2010;;[START_REF] Nikolaidi | Margins of safety and instability in a macrodynamic model[END_REF]. While not taking credit rationing into account is a limitation of the model in dealing with financial instability, it is not a major problem for the analysis of the emerging properties of financial fragility, as discussed below in the paper.

Despite some complications are introduced along with the government sector, its inclusion in the model is fully compatible with Minsky's view about the stabilising role played by the Big Government[START_REF] Minsky | Can "it" happen again? Essays on instability and finance[END_REF].

Our assumption is based on[START_REF] Dosi | An evolutionary model of endogenous business cycles[END_REF] finding that neither GDP growth and the stability of the system are changed if more complex expectation-formation are included. We have tried a smoothing mechanism for firms expectation of sales, using a 10 periods sales linear regression. No significant change of the main results were observed.

Except for firms in the technological frontier, in which case all R&D expenditures is channelled to innovation.

We further assume that for precautionary reasons each firm are willing to replace at most 25% of its physical capital in a single period. Moreover, firms replace capital-goods scrapped by the end of the technical lifetime only if they do not want to shrink the productive capacity.

Several authors highlight that firms plan to operate with excess capacity, for various reasons, ranging from keeping up with unexpected increases in demand (e.g.[START_REF] Steindl | Maturity and Stagnation in American Capitalism[END_REF][START_REF] Kaldor | Limits on Growth[END_REF] to the creation of barriers to entry (e.g.[START_REF] Sylos-Labini | La théorie des prix en régime d'oligopole et la théorie du développement[END_REF]. See Lavoie (2014) for a discussion.

The total investment is bounded to be at most 45% of the existing capital, in line the threshold found by[START_REF] Doms | Capital Adjustment Patterns in Manufacturing Plants[END_REF]. If the firm hits this ceiling investment rate, expansion is prioritised over replacement investment.

The thresholds growth of employment we set are time-variant, based on defined percentiles of the distribution of the growth rates of employment. Furthermore, given the evidence of downward rigidity of nominal and real wages (e.g.Holden and Wulfsberg, 2008, 2009), we set the threshold parameters in a way that downward revisions in wages are less frequent.

As argued by[START_REF] Skott | Macroeconomic implications of financialisation[END_REF], the net equity issuances have been negative in the United States since the 1980s, and as noticed by[START_REF] Frank | Trade-off and pecking order theories of debt[END_REF], in general equity financing is not very relevant for big open companies. However, small firms do often resort to equity financing (ibid.). While this may introduce some interesting dynamics, it is well beyond the scope of this paper.

The interest payments depends on the interest rate agreed along with the celebration of the loan contract. We assume the banking sector interest is horizontal to all firms, and is formed by an exogenous mark-up on the base interest rate of the economy. As noticed by[START_REF] Nikolaidi | Three decades of modelling Minsky: what we have learned and the way forward[END_REF], there is no consensus in the Minskian literature of whether the interest rate should be endogenous or exogenous. In general, an endogenous interest rate plays only an accelerating role(ibid., p. 225). Given that and considering our purposes, the gains of introducing an endogenous interest rate would be very limited.

In the same sense discussed by[START_REF] Dosi | Schumpeter meeting Keynes: A policyfriendly model of endogenous growth and business cycles[END_REF], the canonical replicator dynamics (e.g.[START_REF] Silverberg | Innovation, Diversity and Diffusion: A Self-Organisation Model[END_REF] involves strictly positive market shares, while in this case the market share may be zero. When this happens, the firm market share is set to be zero and the market shares for the other firms is recalculated.

With a constant amortisation schedule, the amortisation of debt corresponds to AM f = t-1 j=t-λ N L(j)/λ.

The case of bankrupt firms is the only circumstance in which capital goods are traded by firms in a secondary market.

Since GDP is given elsewhere, if we choose to take fix the initial government expenditure, either investment or consumption should serve as buffer -which clearly influences respectively firms' or households savings and therefore the net wealth of those sectors. The same holds for any source of taxes.

See the Federal Reserve Economic Data (FRED) series code A006RE1Q156NBEA.

To be sure, by no means we claim that our model is empirically calibrated or an empirical depiction of any

This results holds even in the absence of government countercyclical expenditure. Results are available upon request.

Since the price of firms' equity is implicitly assumed to be unit (there is no stock trading), the market value of total assets is equivalent to the book value of assets. This implies that our measure does not differentiate between book (total debt as % of the book value of assets) and market (total debt as % of the market value of assets) leverage ratios.

Notice that there are firms with high leverage in t and in t + 1 the leverage goes to zero. This is the case of bankrupt firms. Conversely, there are firms with zero leverage in t that experience a relatively high increase in leverage in t + 1. Very often these are the new entrant firms getting credit to invest and produce.

The ex post debt financing is measured by the amount of new loans taken by each firm, which is decided at the beggining of the production-investment process, discounted of the retained profits. The retained profits is the gross profits discounted of interest, taxes and dividends payments.

The cyclical fluctuations are largely related to the business cycle response of aggregate profits and the cyclical behaviour of the leverage.

Since all firms start equal, the initial shares of profits and debt are equivalent, so the index starts at 0. The equality setting is quickly and permanently reversed, as firms' heterogeneity start to show up. As soon as some firms succeed in increasing the relative labour productivity, their ability to capture profits augments, and the need for external funds diminishes. Accordingly, within that group of firms, the leverage goes down, whereas the profit rate goes up. As a consequence, the profit-debt distribution curve starts showing a similar shape we observe in Fig.6.

It is generally not completely offset because the marginal impact of leverage is higher than that of the profitdistribution index.

 39 The range in all Monte Carlo replications is: Min. (0.0689); 1st Qu. (0.2345); Median (0.2593); Mean (0.2583); 3rd Qu. (0.2838); Max. (0.3864), well in tune with historical values for the United States economy, as reported by Frank and Goyal (

2008).40 Minsky defends that the assessment of financial fragility can be performed using solely aggregate data in several passages. For instance, he says that "because information of detailed financial practices needs to be integrated into a system perspective, the aggregate flow of funds data on liabilities and cash flows can be interpreted so as to indicate the hedge-speculative finance dimensions of the economy."(Minsky, 1975a, p. 7).

Parameters exogenously defined to find the initial steady state values are described as pre-SS; SS-given means that the parameter value was adjusted to fit the initial conditions, while the free parameters are set independently of the process to obtain the steady state (described in section 2.4). SS-given are parameter values are rounded.