Henryk Runka

Roman Kiedrowski

Piotr Maćkowiak

Michał Konopczyński

Keywords: asymmetric production structures, current account, DSGE models, FDI, FDI intensity, heterogeneous firms, international macroeconomics, nominal convergence, plant delocalization, real adjustment

adjust, which is left in such a situation, is adjustment by reaction of variables

Résumé

L'appartenance à l'Union Economique et Monétaire (UEM) nécessite la mise en place d'une politique de convergence nominale avant l'adoption de l'euro. Pour le moment, 17 pays ont mené ce processus à terme. La conséquence essentielle pour chacun de ces pays membres est d'accepter une politique monétaire unique, commune à l'ensemble de la zone. De ce fait, le taux de change nominal ne peut plus être considéré comme une variable d'ajustement à des chocs asymétriques venant heurter les économies membres. Seul un ajustement des variables réelles est désormais possible à la suite de chocs asymétriques.

Les conditions de cet ajustement réel dépendent des relations économiques que les membres entretiennent entre eux (flux d'importations, d'exportations, flux d'investissements directs (FDI)…). La nature des relations réelles entre les pays dépend en partie de leur niveau de développement. Les économies émergentes, en particulier celle de l'est de l'Europe, ont été particulièrement attractives pour les firmes multinationales qui y ont installé des unités de production de biens à un coût en main d'oeuvre moindre que celui supporté dans leur pays d'origine. De ce fait, une des hypothèses retenues dans cette thèse sera de mettre en avant ce canal de FDI comme étant un élément important de l'ajustement international entre pays de niveaux de développement hétérogène, dans le cadre de l'union économique et monétaire, en reliant ces flux commerciaux et de FDI aux différentiels de productivité et aux salaires réels.

Deux aspects seront particulièrement développés dans ce travail de thèse. Le premier est de supposer que la stratégie de délocalisation d'unités de production est uniquement offerte aux firmes les plus productives dans leur économie d'origine, cela afin de supporter les coûts initiaux liés à la nouvelle localisation de leur production. A l'inverse, les firmes les moins productives ne peuvent procéder à ce choix. Elles sont même dans l'impossibilité de s'engager dans des opérations d'exportation des biens qu'elles fabriquent. De ce fait, elles restent cantonnées à la fabrication de produits non échangés. Ainsi, les décisions de FDI ont pour conséquences de déterminer la taille relative entre les secteurs dans les économies, la composition des paniers de consommation et des indices de prix à la consommation dans les économies. Les fondements microéconomiques à l'origine des choix des agents, en particuliers ceux des producteurs, ont ainsi une influence cruciale sur la performance macroéconomique des pays membres de l'union économique et monétaire.

La seconde hypothèse qui sera au coeur de notre thèse pour traiter de l'ajustement international réel au sein de l'union économique et monétaire est de tenir compte du fait que les connections commerciales entre les pays sont asymétriques. En effet, compte tenu de l'intégration progressive d'économies émergentes d'Europe de l'est, beaucoup d'économies développées d'Europe de l'ouest disposent d'unités de production initialement localisées dans les économies émergentes d'Europe de l'est, à l'époque où ces pays n'avaient pas encore rejoint l'union économique et monétaire. A l'inverse les pays émergents d'Europe de l'est disposent de peu (ou pas) de délocalisations de leurs entreprises dans les économies plus développées d'Europe de l'ouest. Ces choix de localisation ont des conséquences sur les structures productives de ces économies. Qui bénéficient ainsi de transferts de technologie mais doivent en rétrocéder les revenus à travers leurs compte courant.

La prise en compte de la possibilité d'effectuer des FDI dans les relations entre pays appartenant à une union monétaire est importante, à partir de l'instant où elle va affecter les performances macroéconomiques de ceux ci et modifier les conditions d'ajustements de la zone à la suite de chocs asymétriques entre les pays membres, une fois les critères de convergences nominaux remplis et l'euro adopté. Cet aspect est particulièrement critique pour les économies émergentes d'Europe de l'est candidates à la participation à l'UEM. Elles ont bénéficié de forts investissements en FDI, compte tenu du faible coût de leur main d'oeuvre.

Ainsi, elles ont enregistré une augmentation du nombre de variétés de biens qu'elles étaient en mesure de produire, une augmentation de la productivité totale de leurs firmes, et bénéficié de transferts de technologie, En adoptant cette perspective, l'adoption de l'euro apparaît particulièrement délicate pour un pays émergent qui a bénéficié de conditions nationales favorables, liées en particulier au cours de sa monnaie nationale face à l'euro. On peut illustrer ce point en retenant les relations entre la Pologne et l'Allemagne. Cette structure productive risqué d'être moins favorable à la Pologne une fois l'euro adopté et les conditions d'accueil des investissements directs étrangers moins favorables.

Cette thèse propose d'aborder la question de l'ajustement réel entre économies asymétriques du fait de leur structures productives, en mettant en avant les conditions microéconomiques du choix de localisation internationale de firmes hétérogènes. En termes de productivité individuelle. Dans ce cadre, les firmes ont le choix entre différentes stratégies de localisation (domestique ou étrangère), ce qui a des conséquences macroéconomiques importantes sur les performances macroéconomiques des pays. De ce fait, dans cette thèse nous utilisons un cadre d'analyse de type DSGE (« dynamic stochastic general equilibrium ») permettant de préciser le fondement microéconomique des choix de production et de localisation des entreprises et d'en préciser les conséquences macroéconomiques sur le moyen terme (en termes d'activité, d'investissement de consommation ou de solde de compte courant ou de solde à financer de la balance des paiements).

Les modèles DSGE constituent aujourd'hui un cadre de référence de la recherche en macroéconomie. Dans ces modèles les comportements représentés au niveau microéconomique sont micro fondés. Jordi Galí [2008] considère ce type de modèle comme constituent un outil central de la macroéconomie moderne pour expliquer dans un cadre unifié la majeure partie des phénomènes macroéconomiques en économie fermée ou ouverte, de manière théorique ou quantifiée.

Les modèles combinant la littérature de type DSGE avec les modèles retenant l'hypothèse d'hétérogénéité des firmes constituent aujourd'hui une littérature assez fournie.

Cette littérature a étendu les travaux pionniers de Krugman [1980] et Melitz [2003], développés dans le cadre de la théorie du commerce international, qui supposent que seules des firmes ayant un niveau de productivité élevé sont en mesure d'exporter. Helpman et al. [2003] ont étendu ce cadre en intégrant aussi la possibilité d'effectuer des investissements directs entre les économies. Plus récemment Contessi [2010] a endogénéïsé cette stratégie de FDI afin d'analyser les conséquences des choix de localisation des frimes multinationales sur les conditions d'ajustement macroéconomiques aux niveaux national et international.

Aujourd'hui, la littérature théorique à la disposition du chercheur est particulièrement fournie.

Malgré le nombre de publications dans ce domaine, les modèles actuellement disponibles ne prennent en compte qu'un type de FDI consistant à produire localement pour servir le marché sur lequel la production est installée. De ce fait, les modèles ne prennent pas en compte le fait qu'une partie des biens produits à l'aide des FDI à l'étranger sont en fait ré importés par l'entreprise propriétaire sur son marché national d'origine. D'autre part, de manière standard dans la littérature, les modèles actuellement disponibles supposent que les économies étudiées ont des structures parfaitement symétriques. Cette hypothèse semble assez inappropriée lorsque l'on aborde les relations commerciales entre économies émergentes et économies développées. Ces dernières présentent des structures productives plus productives, plus diversifiées et plus internationalisées que les économies émergentes.

Dans cette thèse, nous étudions les effets de la délocalisation des firmes et de l'asymétrie dans l'intensité des relations de FDI et dans les structures productives des pays formant une union monétaire. Nous centrons notre analyse sur les conditions réelles de l'ajustement international L'objectif de l'analyse est d'apprécier les conséquences de l'asymétrie dans les relations de FDI sur les conditions d'ajustement national et international au sein d'une union monétaire. Notre recherché est conduit en utilisant les outils développés par le programme de recherche des modèles DSGE. Dans cette thèse nous introduisons une série de propositions liées à l'extension des modèles existants qui apparaissent avoir des conséquences notables sur la dynamique des économies étudiées, tant sur le plan national qu'international.

Le programme de recherché initialement mis en place il y a quatre ans avait pour objectif de relier l'impact des critères de convergence nominal sur la dynamique d'une économie émergente bénéficiant de l'apport d'investissements directs étrangers provenant de pays membre de la zone euro. Ce programme reste toujours d'actualité. Toutefois, la complexité des modèles utilisés pour évaluer cette question, nous as conduit à centrer l'analyse sur leur fonctionnement réel, c'est à dire à nous placer dans une situation dans laquelle les ajustements nominaux en situation de rigidité des prix et des salaires -tels que ceux lies à l'ajustement du taux de change nominal -ne peuvent plus avoir lieu. Cette évolution de la problématique a permis de préciser plus avant les principales caractéristiques des modèles DSGE avec hétérogénéité des firmes. Les développements présentés dans cette thèse s'attache à cette question, tout en sachant que la problématique initialement retenue pour ce travail de these reste d'actualité et doit faire l'objet du prolongement de l'analyse présentée dans les pages de ce travail. En effet, la prochaine étape de notre travail consistera à articuler les modèles présentés dans les chapitres II et III de la thèse avec la prise en compte de rigidités nominales telles que celles présentées dans le chapitre I qui sert à introduire la méthode d'analyse des modèles DSGE.

La première extension des modèles que nous proposons est de prendre en compte deux origines à l'exportation de FDI : la délocalisation d'activité de production afin de servir à moinjdre coût le marché local et la délocalisation d'activités de production afin de benéficier dans l'économie étrangère de coûts de production moindres et de réeimporter les produits ainsi fabriqués. Cette représentation permet de prendre en compte le fait que certaines firms multinationales délocalisent leur production comme substitus à l'exportation, alors que d'autres le font pour des raisons simplement liés au coût de production.

La deuxième modification que nous proposons par rapport à la littérature existante est de prendre en compte des asymétries entre les pays, tant en ce qui concerne la part des secteurs liés aux FDI qu'en ce qui concerne l'existence de ce type d'exportations. Dans le schéma type que nous proposons , nous classons les firmes en quatre catégories en fonction de leur niveau croissant de productivité : les firmes qui ne servent que le marché national, les firmes localisées nationalement qui sont en mesure d'exporter leurs biens, les firmes qui ,décident de se localiser à l'étranger pour servir ce marché et les firmes qui décident de se localiser à l'étranger afin de bénéficier de coûts de production moindre et de réimporter leur production afin de la vendre dans leur pays d'origine. Pour prendre en compte des hétérogénéités structurelles entre ces pays on supposera dans un premier temps que la part relative de chacun de ces quatre secteurs est différentes (l'économie la plus développée ayant un secteur FDI plus important) puis, dans un second temps on comparera une économie exportant des FDI avec une économie (émergente) dont les entreprises servent soit leur marché national soit exportent leurs biens et services. Du point de vue macroéconomique, en ce qui concerne la structure de ces économies, le niveau de FDI va conditionner la productivité globale des facteurs de production.

La thèse est articulée autour de trois chapitres. Elle propose une démarche progressive afin d'apprécier les conséquences de l'asymétrie dans les relations de FDI entre économies qui ne disposent plus du taux de change nominal comme mécanisme d'ajustement international à la suite de chocs asymétriques.

Le premier chapitre a un caractère introductif. L'objectif est de présenter de manière simple, à l'aide d'un exemple, la méthode d'analyse développée par les modèles DSGE. Le but est de proposer au lecteur de se familiarise avec les différentes étapes de construction et de résolution de ce type de modèle en retenant le modèle type de la "nouvelle économie keynésienne" constitué de trois équations.

Le deuxième chapitre propose d'appliquer la méthode DSGE à la question de la localisation des activités de production dans une situation où les firmes sont hétérogènes de par leur niveau de productivité. L'objectif est d'étudier les conséquences des choix de localisation des firmes sur les fluctuations macroéconomiques de ces pays On étend le cadre de référence existant développé par Contessi [2010] afin d'élargir les causes de la délocalisation de la production à la recherche d'une production à moindre coût dans l'économie étrangère pour une réimportation du produit fini sur le marché d'origine de la firme qui procède au FDI.

Le troisième chapitre est plus particulièrement consacré à l'étude de l'asymétrie dans les possibilités pour les économies de procéder à des investissements directs. Plus particulièrement on étudie les conséquences nationales et internationales liées à l'apparition de chocs asymétriques entre une économie développée qui a la possibilité de s'ajuster à la fois à l'aide de ses flux d'exportation et des ses flux d'investissement directs et une économie émergente qui n'a la possibilité que d'exporter des biens et services.

Les principaux résultats obtenus dans le chapitre II montrent qu'une économie émergente ne peut principalement être qu'un pays de réception des investissements directs. En particulier à la suite de chocs, ce pays ne peut espérer une forte amélioration des termes de l'échange comme ce que peut enregistrer une économie développée. Toutefois, notre analyse montre que l'économie émergente bénéficie essentiellement de ces investissements directs à travers la consommation de ses agents et de l'augmentation de l'utilité de ceux-ci à travers l'effet de variétés obtenu par l'implantation d'entreprises étrangères.

Dans le troisième chapitre, on observe qu'à la suite de résultats asymétriques de chocs de productivité le pays émergent (domestique) ne peut s'ajuster qu'au travers son flux d'exportations. Par contraste le pays développé (étranger) peut décider de modifier la localisation de ses activités de production. Ainsi à la suite d'un choc domestique de productivité, le pays étranger peut décider d'intensifier ses exportations au détriment de ses investissments directs afin de réduire les couts de production associés à l'augmentation des salaires réels dans l'économie domestique. En cas de choc de productivité étranger, l'ajustement des firmes étrangères s'effectue de manière opposée, cette économie augmentnat sa production délocalisée et réduisant ses flux d'exportation.

En résumé l'analyse proposée dans cette thèse montre que des différences structurelles et la possibilité pour les pays de s'engager dans des investissements directs détermine de manière critique la réaction des variables macroéconomiques à des chocs asymétriques. Les différentes versions du modèle DSGE développé au sein de ce travail ont eu pour objectif de développer le cadre standard porposé jusqu'à présent en tenant compte du fait (1) que les investissements directs pouvaient être à la fois des substitus aux importations ou une solution retenue par les firmes pour réduire leurs coûts de production afin de réimporter des biens sur leur marché national et (2) que les pays devaient être traités de manière asymétriques, afin de relier leur niveau de développement aux types de variétiés de biens (non échangeables, exportables, délocalisables).

Mots clefs : structures de production asymétriques, compte courant, modèles DSGE, Investissements directs, firmes hétérogènes, macroéconomie internationale, convergence, ajustement réel, délocalisations

Summary

Full membership in the Economic and Monetary Union (EMU) involves not only adoption of the euro currency, but also following requirements of the nominal convergence. Seventeen member countries of the European Union (EU) have completed this stage by complying with the nominal convergence criteria [START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] . For each economy, this entailed adjustment of some of its main economic indicators to reference values of the criteria 2 . Once the economy have completed the nominal convergence strategy, it started to use the common currency and follow rules of the common monetary policy of the European Central Bank (ECB). Hence, the nominal exchange rate cannot be used anymore as an international adjustment tool of an economy to asymmetric shocks. The only adjustment, which is available for such economies, is the real one through variables in real terms.

The real adjustment of an economy depends on economic interrelations between countries, that relate to trade connections shaped by shares of export, import and the foreign direct investment (FDI) in the total number of firms in the whole economy. Certain economic interdependences between two countries result from their levels of development. Emerging economy may be an attractive trade partner for the developed one, which can be interested in exporting or establishing affiliates abroad. If we consider trade and FDI relations between two countries, then we can assume that firms decide which production and selling strategy to choose on the basis of observation of the real exchange rate, as well as real wages in both economies.

Two issues of real side of an economy are especially important here. The first one relates to the fact that more productive firms can follow a strategy which is unavailable for the [START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] The nominal convergence criteria have been formulated and adopted in the Maastricht Treaty in 1992, and then in the Lisbon Treaty in 2007. Text of the Lisbon Treaty and comments on its articles can be found in Priollaud, Stritzky [2008]. less productive producers. Besides domestic production and selling, they can engage in export or FDI. This way, decisions of firms determine scale of production sectors, composition of consumption baskets and price indices in both countries. The microeconomic underlying decisions of economic agents, especially producers, influence the economy performance on the macro scale.

The second issue, that is significant for the real adjustment of an economy to asymmetric shocks, is that trade connections between countries can be highly asymmetric.

In economic reality we can find examples of situation, in which some developed economy has relatively many multinationals located in an emerging country and the symmetric relation does not occur. Such asymmetric trade relations are determined by differences in production structures among countries. The production structure, by which we understood a share of firms engaged in a given economic activity in the total number of firms in the economy, is one of the indicator of the economy development level, because only the more productive firms can export or set multinationals abroad. Engagement in the outward foreign direct investment determines productive capacity of an economy. In turn, FDI hosting causes capital accumulation growth and increasing efficiency of the production factors.

Taking into account significance of the foreign direct investment as one of the economic growth determinants, we can state that FDI intensity and differences in this regard between countries are crucial for the international adjustment of economies to asymmetric shocks, once the nominal convergence strategy is completed and economies share the common currency and follow the single monetary policy. This research issue is especially important form the point of view of emerging economies, that have benefited from the production delocalization of foreign firms. The hosting economy experiences, among others, lower prices, increased product variety, higher productivity and better accessibility of foreign knowledge and technology. From the perspective of an emerging economy, the adoption of the euro is especially challenging, especially when one takes into account that its real connections with developed economy can be highly asymmetric. The example here are trade and FDI relations between Polish and German economies. After completing the nominal convergence strategy, economies have to rely on the real adjustment, in situation where many real aspects of their functioning are asymmetric, e.g. the FDI intensity, production structures, abilities of producers to export or engage in the foreign direct investment. This issues may become crucial for the international adjustment of economies that form a monetary union.

The problem we stated above, about how asymmetries in the FDI intensity and differences in production structures influence the real adjustment of economies, links the macroeconomic perspective of the economy performance with the microeconomic foundations of assumptions about behaviour of firms, that make their decisions on the basis of conditions specific for them. Hence, such firms are heterogeneous in some regard. For example, heterogeneity in productivity of firms means that each of them is characterized by specific productivity level. On this basis, firms choose various production and selling strategies. Decisions of firms, in turn, translate into outcomes on the macroeconomic scale, that means for the whole economy. This way, we can analyse significance of FDI and differences in the FDI intensity, as well as differences in production structures of economies.

The theoretical framework that combines microeconomic assumptions about decisions made by economic agents and economic outcomes on the macro scale are dynamic stochastic general equilibrium (DSGE) models with heterogeneity in firms productivity. DSGE models are nowadays commonly used research tool of macroeconomic analysis. In these models, macroeconomic phenomena are treated as results of microeconomic behaviour patterns revealed by various groups of economic agents. In opinion of many economists, DSGE models can be viewed as a leading stream of modern macroeconomic theory. Galí [2008] defines them as a central tool for macroeconomic analysis. DSGE models methodology has emerged in course of searching for a theory which would serve explaining economic phenomena from the point of view of both qualitative and quantitative science.

The literature on DSGE models with the assumption about heterogeneity of economic agents is now quite broad and relates to modelling heterogeneous behaviour of economic agents of various types. Describing heterogeneity started in the trade theory, by differentiating levels of productivity of firms in the work by Krugman [1980]. Melitz [2003] proposed a DSGE model which allows to regard the fact that only highly productive firms can export. Helpman et al. [2003] incorporate another kind of the economic activity besides exporting, mainly the foreign direct investment. Contessi [2010] endogenizes this strategy of internationalizing of production to analyse implications of the entry of multinational firms.

Studying the present literature on the DSGE models and the trade theory, we can notice that the models do not account for the nature of FDI, consisting in the fact that international firms can have various reasons to locate their production abroad. They consider various production and selling strategies, choosing to sell on the local market only or to export. They can face various conditions on the markets of production, because of asymmetric bilateral trade relations between economies. The papers on the trade theory discuss these issues but DSGE models do not incorporate them. The problem is to set appropriate assumptions about the nature of FDI and accounting for them in the theoretical framework.

The standard way of modelling two economies in DSGE models with heterogeneous firms is to assume they are fully symmetric. There is small room for accounting for asymmetry in bilateral trade relations between them. Usually in such cases one refers only to comparison of the scale of economies. Such description does not correspond to economic reality, where one can notice significant differences in the foreign direct investment shares between two economies. For example, when one of them is a developed country and the other one is the emerging one.

In the thesis, we study the effect of plant delocalization and asymmetries in the FDI intensity and differences in production structures between two economies that do form a monetary union. Thus, the focus of our analysis is on the real aspects of economy functioning.

The aim of the dissertation is to study consequences of the asymmetric trade and FDI relations on the real international adjustment. The research is conducted by using the DSGE models methodology. We propose some extensions of models existing in the literature to incorporate the FDI nature and asymmetries in shares of production sectors, especially in the FDI intensity.

In the thesis we contribute to the DSGE models literature by providing propositions of specific extensions and modifications of existing models, that have important implications for the resulting dynamics of national and international variables in response to asymmetric shocks. These original propositions can be developed further, thus giving rise to a few directions of future research in evaluation of the effect of the nominal convergence criteria on real side of economy.

The initial objective of the thesis, to study links between the nominal convergence criteria and the real side of economy, is still the open agenda in our research program due to complexity of modelling and computations within such frameworks as DSGE models. The first step to get to that has been accomplished by providing a rich theoretical construction with the focus on studying the real side of economy. The next stage will consist in completing the model with new aspects, presented in the first chapter of the thesis, such as the nominal rigidity and a role of the monetary policy. This will allow for studying another issues of the nominal convergence.

The first extension of the DSGE model with heterogeneity in productivity of firms, which we propose, consists in accounting for the nature of FDI, that means differentiation of choices made by firms engaged in FDI, concerning the strategies of selling their products. Some of multinationals delocalize their production abroad to sell on the local market, but part of them, depending on conditions prevailing on the goods and labour markets, choose to export back to their economy of origin. In our extension of the DSGE model with heterogeneous firms, we distinguish these two different strategies of selling, conducted by multinational firms.

Another modification, that we introduced to the heterogeneous firms DSGE models existing in the literature, is accounting for asymmetries in shares of production sectors.

In a given economy, among others, there are firms which produce and sell only domestically.

More productive companies, besides domestic selling, can also choose to export their products abroad. We assume that even more productive firms engage in FDI to produce and sell in the economy in which they locate their subsidiaries. The most productive multinationals, in turn, export their products back to the economy of origin. Thus, we can distinguish four different segments of an economy connected with various production and selling strategies, which we refer to as production sectors. The crucial is incorporating, into the model assumptions, the fact that economies may differ in shares of particular sectors in the total number of firms in the whole economy. We account for such an assumption by considering, for the two economies, different values of parameters shaping the model dynamics. These values are especially important for the long-term tendencies of shaping levels of model variables.

The differences in the FDI intensity can also exhibit at the other level, namely in structures of economies. To take this into consideration, we propose the model construction which is asymmetric. We assume that one economy, identified with an emerging market, has only two production sectors, domestic selling and export, characterized by firms with different levels of productivity. In the other economy, the developed one, there are firms which can also engage in the foreign direct investment to sell abroad or to export back to their economy of origin. We introduce such a form of asymmetry into the DSGE model with heterogeneous firms and study its consequences for the real adjustment of economies to asymmetric shocks.

In the first chapter of the thesis, which has an introductory character, we provide synthetical and comprehensive description of the DSGE methodology and explain in detail the essence of DSGE models as a research tool. Our aim is to familiarize the reader with main aspects of DSGE models constructing, their theoretical properties, as well as issues connected with solving model equation systems and a qualitative analysis in form of studying impulseresponse functions. All stages of proceeding with DSGE models are explained by using an example of a small simple closed economy model.

In the second chapter we apply the DSGE methodology, presented in the first chapter, to analyse effect of plant delocalization and FDI hosting on output fluctuations. The aim of this chapter is to describe specific situation of two countries, when one of them is an emerging country and the other is a developed economy. We extend and modify existing theoretical constructions to account for nature of FDI and differences of economies in the FDI intensity.

In the third chapter we show how to develop the theoretical construction framework, introduced in the second chapter, to describe the differences in the FDI intensity at the construction level of the presented model. We compare results of various versions of the model by studying differences in the output fluctuations arising from the assumed frameworks describing specific economic situation for the set of two economies.

The synthesis of the DSGE methodology and detailed presentation of the example of a simple DSGE model, conducted in the first chapter, allow us to describe theoretical foundations, we can refer to in the next chapters. Thanks to this, we can focus on the specifics of the assumption about heterogeneity in firm productivity and use all computations techniques, presented earlier, without going into details again.

The results of qualitative analysis, conducted on the basis of the symmetric model presented in the second chapter, allow us to state that when an emerging economy is mainly the host for FDI, it cannot expect as strong the terms of trade improvement as it could, if it had as big the FDI share as the developed economy. Moreover, studying the variety effect in set of two economies described by different values of respective parameters describing dynamics of variables, we can notice that in emerging markets consumers benefit in terms of their utility much from variety of goods coming from the foreign multinationals.

In the third chapter we prove, that facing asymmetric shocks in aggregate productivity, the domestic as well as the foreign one, home producers from an emerging market can adjust their reaction to the shock by only increasing or decreasing the exporting activity. In turn, foreign producers from a developed economy can shift part of their economic activity from one production sector to another. In case of the domestic aggregate productivity increase, they decide to intensify their engagement in export over FDI. In case of the foreign aggregate productivity shock, their reaction is opposite, that means foreign producers move their activity into direction of more productive firms, setting more subsidiaries abroad and decreasing the export intensity.

Summing things up, the analysis of proposed theoretical constructions and the results obtained on its basis, allows us to state that the real aspects of economy functioning, such as trade connections between countries and differences in production structures, determine economic performance and behaviour of economies in terms of output fluctuations. When two countries form a monetary union, the nominal exchange rate is no longer available as the adjustment tool to asymmetric international shocks. The only possibility of an economy to

Introduction

From nominal convergence to real adjustment Among the twenty-seven members of the European Union (EU), seventeen countries have adopted the euro following a nominal convergence strategy [START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] . Fulfilment of the nominal convergence criteria is a necessary condition for a country to become the part of the third Economic and Monetary Union (EMU) stage before being able to adopt the euro currency.

The first attempts to form EMU in the 70's were unsuccessful and failed because of the Bretton Woods system fall in 1971 2 . This proved that there was a need to conduct further consultations and currency interventions, as well as coordination of economic and monetary policies. In the late 80's the nominal convergence idea appeared 3 . It was then implemented in the 90's for the founding countries of the EU in the form of the nominal convergence criteria defined in the Maastricht Treaty which was signed on 7th February 1992.

The nominal convergence strategy focuses on main economic indicators. The monetary criteria relate to inflation rate and nominal long-term interest rate. The fiscal criteria concern fiscal deficit and public debt in relation to the gross domestic product (GDP). There is also the exchange rate criterion. All criteria are connected with some reference values.

The EU members which have not adopted the common currency yet are committed by the Treaty to enter the third stage of EMU upon the time of complying with all convergence criteria. Poland entered the EU in 2004 and since then is still on its way to adopt the euro with smaller or bigger achievements. According to Convergence Reports published [START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] The first stage of the Eurozone functioning was in 1999 when eleven founding countries started to use the euro as an accounting currency. In subsequent years the enlargement included: Greece in 2001, Slovenia in 2007, Malta and Cyprus in 2008, Slovakia in 2009. During the last enlargement in 2011 the euro has been adopted by Estonia. On 1st of July 2012 Andorra is going to adopt the euro but this country does not belong to the EU. by the European Commission (EC) and the European Central Bank (ECB), in 2008 Poland fulfilled all the nominal convergence criteria except the exchange rate criterion [START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF] . Currently, after the international financial and economic crisis of 2008, at the beginning of 2013 Poland has not fulfilled any of the criteria except one of the fiscal criteria [START_REF] Schorfheide | Bayesian Analysis of DSGE Models[END_REF] .

Once the nominal convergence strategy and the adoption of the euro has been done, EMU participating countries can no longer use their nominal exchange rate to adjust to asymmetric shocks. The only adjustment which is left is the real one that means the adjustment through variables expressed in real terms. Relative prices, such as the terms of trade or the real exchange rate, shape quantities such as the trade in goods and services, financial claim or the foreign direct investment (FDI). Thus, in the lack of the nominal adjustment tools it is crucial to evaluate what are similarities and differences between economies in this regard and what is significance of trade and FDI relations. The focus moves to the real side.

The adoption of the euro is challenging for Poland due to the fact that the real relations between Poland and main economies of the EU, like the German or the French ones, are highly asymmetric [START_REF] Aguiar | Emerging Market Business Cycles: The Cycle Is the Trend[END_REF] . This aspect may become critical for international adjustment in a monetary union. Emerging countries like Poland are rather concentrated on domestic [START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF] Over the reference period from April 2007 to March 2008, Poland recorded a 12-month average rate of HICP inflation of 3.2%, which was at the reference value stipulated by the Treaty and calculated on the basis of inflation rates of Malta, Holland and Denmark. In the reference year 2007 Poland recorded a fiscal deficit of 2.0% of GDP, that means below the 3% reference value. The general government debt ratio amounted to 45.2% of GDP in 2007, that means below the 60% reference value. In the two-year reference period from 19 April 2006 to 18 April 2008, the Polish zloty did not participate in ERM II, but traded under a flexible exchange rate regime. Long-term interest rates averaged 5.7% over the reference period, from April 2007 to March 2008, and were thus below the reference value for the interest rate criterion. See European Commission [2008] and European Central Bank [2008]. [START_REF] Schorfheide | Bayesian Analysis of DSGE Models[END_REF] In January 2013 Poland didn't fulfill the price stability criterion. A 12-month average growth rate of HICP index amounted 3.5% and exceeded the reference value which was 2.7% as the average of inflation rates in Sweden, Ireland and Greece. In the reference year 2011 Poland recorded a fiscal deficit of 5.0% of GDP and the general government debt ratio amounted to 56.4% of GDP. The Polish zloty did not participate in ERM II.

In January 2013 Poland didn't fulfill the interest rate criterion. An average long-term interest rate for the last twelve months amounted 4.9% and was higher than the reference value which was 3.6%. See Ministerstwo Finansów RP [2013]. production and export. Developed economies like the German one usually export a lot and engage much in FDI. Let us concern the example of such specific situation revealed in the data as in Table 1 below. The Polish economy during the regarded period intensified its engagement in FDI.

However, the differences, in comparison to developed economies, are still very significant.

The production structures of Polish and German economies have not converged. The production structure is one of the indicator of the development level because only the more productive firms can export or set multinationals abroad. As Melitz and Redding [2012] point out such firms are larger, more capital intensive more skill intensive and pay higher wages that other firms within the same industry. Thus, we can observe the high asymmetry in the development levels of economies in terms of their production structures.

Comparing FDI relations between these two countries we can observe that Germany has relatively many multinationals located in Poland in terms of their outward stocks and inflows in the partner country. Poland has much less companies engaged in FDI in Germany.

This clear difference is illustrated by the data in Table 2 of inward and outward position of German economy by partner country [START_REF] Andrle | The Role of Trends and Detrending in DSGE Models[END_REF] .

If we sum up trade relations of these two countries we can notice that they have different share of foreign firms in their markets, hence different levels of competition with the foreign firms. As we see there exists considerable asymmetry between Polish and German economies. The latter has much more power in determining what are the varieties in its partner economy, what are prices for this varieties, and thus it has much more power in affecting the price index of the other country. In this thesis, the problem that we want to analyse is to determine, what should be the adjustment between Poland and Germany in real terms, when there is no room for the nominal exchange rate adjustment. In this real adjustment studying one should take into account the existing asymmetries in the FDI intensity and FDI relations. In this regard, the aim is to analyse the effect of plant delocalization and FDI on output fluctuations between two countries that do form the monetary union. Among real aspects of relations between economies, FDI is very important concerning the fact, that the foreign direct investment is claimed to be one of the most significant determinants of the economic growth. On the one hand, engagement in the outward foreign direct investment determines productive capacity of the economy. On the other hand, as Borensztein et al. [1998] point out, FDI hosting causes capital accumulation growth and increasing efficiency of the production factors. For emerging markets, the foreign direct investment plays a key role in economic development. In opinion of Nytko [2009], as well Ozawa [1992], development of such economies is driven by investment, especially the inward one from developed economies.

The question of the real adjustment, between economies which have different production structures, is important from the point of view of emerging countries, that have benefited from the production delocalization of foreign firms. These firms have been encouraged by the specific conditions prevailing on the domestic market of the other economy such as lower real wages, smaller competition, bigger sales. Lejour et al. [2009] emphasize that openness to import and inward FDI positively influences productivity and income. From the point of view of individuals new factors of competition occur causing that firms exit and employees lose their jobs. But in the larger scale the overall benefits overweight. The hosting economy experiences among others lower prices, increased product variety, higher productivity and better accessibility of foreign knowledge and technology.

The issues of FDI and differences in the FDI intensity are real aspects of functioning of economies and relations between them. They reveal some problem from the macroeconomic perspective. If such connections and differences exist, they influence responses of national and international variables to asymmetric shocks. However, the problem relates also to microeconomic foundations. The given trade and FDI relations between countries depend on decisions of producers. Moreover, the firm decision is made on the basis of conditions specific only for it. In this regard firms are heterogeneous. The framework that accounts for all this issues is a dynamic stochastic general equilibrium (DSGE) model with heterogeneity in firms productivity.

Theoretical foundations of the thesis

We combine two leading trends of the modern economics, that is DSGE models and the assumption of heterogeneous firms, to study how firms react to shocks transmitted internationally, when there are asymmetries between economies and at the same time the only possible adjustment is through the real variables. We focus on the theoretical aspects only, thus we want to build a reference model which is well adopted for the purpose of the addressed issues. The literature on DSGE models with heterogeneity is now quite broad and relates to modelling heterogeneous behaviour of economic agents of various types. It has become very popular and even standard, when it comes to DSGE modelling. In the international trade literature, studies by Helpman [2006] proved that not all firms within an economy or an industry export or engage in FDI, rather only most productive of them. This displays the fact that firms are heterogeneous within the same sector. Describing heterogeneity started with differentiating levels of productivity of firms in the work by Krugman [1980]. The heterogeneity assumption was then developed in many papers. Melitz [2003] proposed an extension of previous models in the form of monopolistically competitive firms in a general equilibrium setting.

The framework used by Melitz [2003] and then discussed in Ghironi, Melitz [2005] allows for consideration of the fact that only highly productive firms can export. Helpman et al. [2003] incorporate another kind of the economic activity besides exporting, mainly the foreign direct investment. Contessi [2010] endogenizes this strategy of internationalizing of production to analyse implications of the entry of multinational firms.

We add a new dimension to the existing literature on DSGE models with heterogeneous firms. First, we complete goods market with a new segment of production, namely products offered by multinationals which produce abroad and export back to their economy of origin. Second, we account for asymmetries in the FDI intensity that occur between economies.

Studying the present literature on DSGE models and the trade theory, we can notice that the models do not account for the nature of FDI. The international firms can delocalize their production to sell on the host market, export to other economies or to import from abroad. The papers on the trade theory discuss these issues but DSGE models do not incorporate them. This is quite new approach in the DSGE literature to account for firms that set their affiliates abroad to re-export back to their economy of origin. We propose how to incorporate such assumption in the model and study its effects on the dynamic paths of variables.

The standard way of modelling two economies in DSGE models with heterogeneous firms is to assume they are fully symmetric. There is small room for asymmetry in bilateral trade relations between them. Such situation does not correspond to the reality when one can notice significant differences in the foreign direct investment shares between two economies, as we discussed earlier. We address to this issue by proposing various ways of accounting for asymmetries between countries in the FDI intensity. We extend some model framework existing in the literature, by incorporating asymmetry assumption at various levels. First, we regard the asymmetry resulting only from a choice of different respective parameters characterizing described economies. Then, we modify the model by assuming the asymmetry at the construction level in the form of different production structures.

In the thesis, the issue of the nominal convergence is considered within an assumption that two regarded economies have completed the nominal convergence strategy. Thus, they form a monetary union and use the same currency. Then, it is worth studying significance of differences in the level of development, in the sense of the FDI intensity asymmetries between such economies. Since the nominal adjustment is no longer possible, we focus on real aspects of the adjustment. We contribute to the literature by providing propositions of extensions and modifications of existing models, that have important implications for the resulting dynamics in response to a shock. We also want to show that these propositions can be developed further, thus they give rise to a few directions of future research in evaluation of the effect of nominal convergence on real side of economy.

We introduce some new aspects to the existing DSGE models literature, namely the nature of FDI and the way of accounting for asymmetries in the FDI intensity between countries. Incorporating these two assumptions, into the DSGE model with heterogeneity in productions of firms, causes that our model becomes quite complex. But in return, we obtain a framework which accounts for some important relations found in the economic reality, connected with FDI. The focus is on the real international adjustment between countries. The issues of modelling and computations within such a framework turn out to be quite heavy. Thus, the initial objective of the thesis, to study links between the nominal convergence criteria and the real side of economy, is still the open agenda in our research program. The first step has been accomplished by providing a rich construction with the focus on the real side of economy. The nest stage will consist in completing the model with aspects presented in the first chapter of the thesis, namely the nominal rigidity and a role of the monetary policy. This will allow for studying also the nominal convergence issues.

Research issues formulated in the thesis are solved by constructing various versions of a DSGE model with heterogeneous firms. We combine two main aspects of the literature.

The international trade approach is the origin of microeconomic assumption about heterogeneous firms, which differ in their relative productivity levels. Each firm in the economy, depending on its heterogeneous productivity, can decide which producing and selling strategy it wants to follow. The macro perspective, that means studying dynamic paths of national and international variables, is obtained by dealing with the DSGE model construction. The combination of these two aspects allows us for the analysis of macroeconomic consequences of FDI and asymmetries in the FDI intensity in a set of economies forming a monetary union.

We propose two ways of incorporating the asymmetric FDI relations into the model.

First, in the second chapter of the thesis, we assume that the model framework is fully symmetric, that means each variable and equation describing given decision rule of domestic agents have their counterparts for the foreign economy. But we allow for different values of parameters shaping shares of sectors in the economy. This way, we can account for asymmetric shares between economies.

In the third chapter we propose a version of the model, in which the asymmetry assumption is introduced at the construction level, what has more significant consequences for results. The home economy, which we refer to as the emerging one, has only two sectors of production, domestic selling and export. In the foreign developed economy there are also FDI, which locate abroad to sell at the local market or to export back to their economy of origin.

Organization of the thesis

In the three chapters of the thesis we build the methodology well suited to study how asymmetries in real relations affect the real adjustment between two economies in the monetary union. To address this issue, we propose a DSGE model with heterogeneity in firm productivity which account for the nature of FDI, differences in the intensity, as well as asymmetries in production structures of economies. The first stage is to introduce the reader to the DSGE methodology by describing and explaining the theoretical foundations and technical approach, what we do in the first chapter. Next, in the second chapter we build the reference framework relating to the models existing in the literature and extending them with various assumptions connected with the real side of economy. Finally, in the third chapter we fully account for asymmetric relations between economies found in reality by introducing asymmetry in the production structure at the theoretical construction level.

The first chapter of the dissertation is entitled "Introduction to methodology of DSGE models". It has mainly the introductory character and provides an example of a simple small scale model used in monetary policy analysis. The main objective of this chapter is to present comprehensive synthesis on DSGE models with special emphasis on the solution procedure.

We start by describing the benchmark framework. Then, we discuss methods of solving.

Analysis of the model concerns its static and dynamic properties. Throughout the chapter the exemplary model does serve as the benchmark by which all detailed questions are explained.

From the theoretical perspective, presented in the first chapter, it is worth mentioning that DSGE models can be used as the framework which displays the role of monetary authorities in affecting both the nominal and real side of the economy. The monetary nonneutralities are consequences of the nominal rigidities introduced into the model in a form of sticky prices.

As a result of the synthesis on the DSGE methodology and detailed presentation of the simple DSGE model, conducted in the first chapter, we obtain theoretical foundations, we can refer to in the next chapters. We will use part of the presented assumptions to describe production side of economy in a two country complex model with a key role of the foreign direct investment. Thanks to descriptions and explanations of DSGE issues presented in the first chapter, we can focus on the specific assumption of heterogeneous firms and use all computations techniques without going into details.

In the second chapter of the thesis, entitled "Symmetric DSGE model with heterogeneous firms", our aim is to apply the DSGE methodology to analyse the effect of plant localization and FDI hosting on the output fluctuations. First we present in detail the version of the model, which describes the two economies analogously, thus in a fully symmetric way. This is a two country model of open economies with heterogeneity in firm productivity. We contribute to the literature on DSGE models by accounting for the nature of FDI. We allow also for some kind of asymmetry that comes from different values of parameters determining behaviour of agents in two economies. The focus is on real side of economy, in situation when there is no room for the nominal adjustment, due to the monetary union between countries, the same currency and common monetary policy. Prices are assumed to be flexible because there is no role for the monetary policy. We regard issues of the real adjustment through trade and FDI.

Among results of study conducted in the second chapter, it is worth indicating the following. According to the assumed framework, reaction of terms of trade to the exogenous shock in aggregate productivity is influenced by reaction of numbers of exporting firms and multinationals, as well as by reaction of average optimal prices set by this firms. Thus, we account for the another source of the terms of trade dynamics. From the point of view of emerging markets it reveals the fact, that the economy which is mainly the host for FDI cannot expect as strong the terms of trade improvement as it could, if it had as big the FDI share as the developed economy.

We prove also that the variety effect, consisting in the higher depreciation of the CPIbased real exchange rate than the welfare-based rate, is most clear when one economy gains higher variety due to existence of numerous foreign exporters and foreign multinationals selling to the home consumers. That means the variety effect does not result simply from the aggregate productivity increase but from the existence of multinationals. One can expect that in emerging markets, consumers benefit in terms of their utility much from variety of goods coming from foreign multinationals.

The model developed in this chapter shows also, that under the permanent aggregate productivity increase, the home economy becomes relatively more attractive environment, for consumers to buy, but especially for producers, to sell and invest in FDI.

The third chapter, entitled "Asymmetric model with heterogeneous firms", presents another way of dealing with asymmetric relations between economies in terms of different shares of multinationals. Our objective is to link the production structure of the economy to its level of development, in sense of the FDI intensity. We modify the model from the previous chapter and propose a version, in which the asymmetry is introduced directly in the framework. That results in the fact, that the home economic agents behave differently than agents in the foreign country. They take different decisions and have different possibilities.

Hence, the dynamics of the two economies also differ.

To evaluate results obtained in the third chapter, we compare various versions of the model by studying differences in the output fluctuations arising from the assumed frameworks, describing specific economic situation for the set of two economies. The analysis in the form of studying the impulse-response functions reveals, that accounting for the asymmetry at the construction level gives qualitatively different results than the symmetric framework. Because the way, the asymmetry in the FDI intensity is incorporated into, has the great significance for the results in fluctuations of variables, we can state that real aspects of economy like trade connections and production structure determine economic performance and behaviour of economies in terms of output fluctuations.

Our modification of the model existing in the literature accounts for consequences of asymmetries in production structures that can be observed in reality. Home and foreign economic agents of the same type operate in different buying, selling and hiring labor conditions, thus they have different possibilities of reactions and respond differently facing the similar shock of their economy's aggregate productivity. This translates into the differences in performance of economies, thus has significance from the macroeconomic point of view.

In the third chapter we prove, that facing asymmetric shocks in aggregate productivity, the domestic as well as the foreign one, home producers adjust their reaction by only increasing or decreasing the exporting activity, while foreign producers can shift their activity from one sector to another. When the home economy is hit by the positive productivity shock, then response of numbers of foreign firms is not just deterioration, but the shift in the production structure in the less productive firms direction. Analogously, when the foreign economy is hit by the positive productivity shock then response of numbers of foreign firms is the shift in the production structure in the more productive firms direction.

In the thesis we study, how FDI and asymmetries in the FDI intensity, shape international real adjustment between two countries. Before going into details of this research question, we present theoretical foundations and computational issues connected with the tool we use, that is DSGE models. Then we construct a reference model and describe comprehensively its basic assumptions. Next, various versions of this model are presented and analysed in form of studying and comparing the implied impulse-response functions.

Chapter I Introduction to methodology of DSGE models 1.1. Introduction

The aim of this chapter is to introduce the reader to the methodology of dynamic stochastic general equilibrium (DSGE) models and to explain their characteristics as a research tool.

We present here selected aspects of construction, computations and qualitative analysis in a synthetic way using an example of a simple small scale model. We focus rather on methodological issues than the specifics of the presented model. Thus, this chapter can be viewed as a reference for more complex models which we exploit in the next chapters.

Thanks to this when we work with various versions of the basic model of the thesis, that is a DSGE model with heterogeneity in productivity, we are able to concentrate on specific assumptions and their consequences.

In opinion of many economists DSGE models can be viewed as a leading stream of modern macroeconomic theory. Galí [2008] defines them as a central tool for macroeconomic analysis. It is believed that DSGE models have attracted so much interest because of solid theoretical foundations. Thus, they can serve well the purpose of studies from a theoretical perspective. But recently they gain also the great feature of being a useful tool for forecasting and quantitative analysis as it was pointed by An, Schorfheide [2007]. This chapter provides an example of a simple closed economy model used in monetary policy analysis [START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] . By presenting it, we want to describe and explain the main aspects of construction of DSGE models, their theoretical properties, issues of solving and qualitative analysis, as well as possible applications. Throughout the chapter, the exemplary model does serve as the benchmark by which all detailed questions will be explained. At the same time, we try to refer to broader aspects of DSGE models in the context of available literature and their implementation we can encounter.

DSGE models are nowadays a commonly used research tool of macroeconomic analysis. They have emerged in course of searching for a theory which would serve explaining economic phenomena from the point of view of both qualitative and quantitative science. Whether this has been accomplished is debatable and still a matter of ongoing research and development in this field.

The construction of DSGE models results from combining foundations of Real Business Cycle theory (RBC)2 with methodological elements of microeconomics and approaches used in quantitative sciences 3 . Conceptual dimension of DSGE models is in turn provided by various economic schools and trends like New Keynesian, New Open Economic Macro (NOEM) and New Institutional Economics, depending on the aim of their analysis [START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF] .

This complex theoretical background has been constantly enriched by sequential assumptions and concepts, coming from commonly known foundations of economic theory, as well as some very new approaches developed specially within the framework of the DSGE methodology [START_REF] Schorfheide | Bayesian Analysis of DSGE Models[END_REF] . In principle, macroeconomic phenomena are treated here as results of microeconomic behaviour patterns revealed by various groups of economic agents who face intertemporal optimization problems.

Detailed issues of interest in macroeconomic analysis are encompassed in DSGE models by adding and modifying entire parts of the model or just some of its assumptions.

Regarding the aim of constructing such a model, qualitative and quantitative conclusions can be made. The former are always the direct outcome of dealing with DSGE model building.

But the latter require further transformations and more advanced computational techniques.

Thus, we can divide cognitive properties of DSGE models into that helping to understand how the economy works and develop economic intuition and that serving for making conclusions about real existing economy [START_REF] Aguiar | Emerging Market Business Cycles: The Cycle Is the Trend[END_REF] .

In DSGE models economic agents are modelled as forward-looking. At the time they form their expectations they exploit information available in the full structure of the model.

Thus, the current choices depend on future uncertain outcomes and expectations about the future determine today's outcome. This is what describes the dynamics of the economy.

Another feature of DSGE models is their stochastic character, which consists in inclusion of shocks that affect the economy. The equilibrium in DSGE models relates to the situation when the economic agents act in accordance with the decision rules resulting from solving their optimization problems. This is the partial equilibrium, at the micro level. The general equilibrium takes place when one accounts for behaviour of all agents of all types and for rules according to which the markets operate.

Specification of a DSGE model means deriving sequential forms of a dynamic equation system. The first step is to describe behaviour of all agents acting in the economy and the economic environment. The economic agents are rational and anticipating, which means they take into account past, current and future constrictions in the process of stating decision and behaviour rules. These rules having dynamic and intertemporal nature are followed by agents in order to achieve individual optimum and usually take a form of first order conditions. Taking into account such determination of partial equilibrium for all economic agents together with principles of market functioning gives us description of the general equilibrium. It consists of macroeconomic balance conditions and institutional restrictions and allows to coordinate clashing interests of agents.

The core of DSGE models is an assumption that economic agents act in the conditions of uncertainty. There are various explanations of implementing such approach [START_REF] Andrle | The Role of Trends and Detrending in DSGE Models[END_REF] . Whatever the source of randomness, it is expressed by allowing some of the parameters to be random and affected by disturbances called commonly shocks. These disturbances are in turn described by stochastic processes which determine fluctuations or evolution of the parameters. The uncertainty influences decisions of agents who know only expectations of parameter future values, but this knowledge is enough to take decisions and optimize. In this sense, random parameters become exogenous variables of the model. The economy can be subject to many shocks, but they are independent, thus allowing for their structural analysis.

DSGE models are more likely believed to be a reliable tool of theoretical analysis rather than the base for performing forecasts and explaining empirics of economies. Here of great importance is the quality of a model fit to the data and complexity of computational aspects. This issues are discussed in Tovar [2008].

As the economy is disturbed by shocks, the economic agents must each time adjust their responses in pursuit of achieving the optimum. Their microeconomic equilibrium is thus time variant and the reaction to impulses triggered by randomness determines the economy dynamics. In order to come back to microeconomic equilibrium, the agents absorb effects of disturbances according to their decision rules. This allows the whole economy to reach the equilibrium in general macro scale.

The chapter is organized as follows. First we present short characteristics of DSGE models as a research tool. Then we proceed by introducing an example of a simple small scale model of a closed economy discussed comprehensively in following subsections. We describe behaviour of the economic agents categorized in three blocks: consumers, firms and monetary authorities. We derive conditions of the partial and general equilibrium. This is what completes the construction of the theoretical model. Then we describe a selected method of solving DSGE models and the whole resulting solution procedure. We explain in detail their basics, as well as exploit them for the exemplary model. This way in the next chapters we can use these methods without explaining their details. Here computational issues are presented directly and comprehensively. We refer also to the source literature, as well as to the Mathematical appendix of the thesis. At the end of this chapter we provide qualitative analysis of the model which is conducted by studying responses of the model variables to disturbances of various kind.

Closed economy model

We present the framework of the DGSE models using an example of a small scale model describing the closed economy. The aim is to provide coherent and comprehensive insight into how DSGE models are constructed and how they work. This should be considered as a process whose subsequent stages serve preparing the model for theoretical and empirical analysis. We explain what for various forms of the model are needed and how to use them.

Such approach to present the topic is adopted from a paper by Grabek et al. [2007], [2011],

whereas the model comes from Galí [2008]. We combine here relative simplicity of the exemplary model with synthetical description of the construction process.

The first and most important step in building a DSGE model is to design its theoretical form by describing the economic environment and relations between agents that take place in the economy and are the subject of our research. Due to properties of DSGE models, embedded in the RBC theory and in its stochastic nature, this takes the form of a nonlinear system of expectational difference equations. At this stage the aim is to express links between all variables of interest so that to be able to study the research problem [START_REF] Ball | Real Rigidities and the Non-neutrality of Money[END_REF] . We characterize the environment in which economic agents act, determine a set of their decision rules and specify the uncertainty accompanying the process of decision making. Afterwards, to take into account behaviour of all participants of the economy we describe the general equilibrium conditions.

The basic structure of a DSGE model can be expressed by classifying economic agents in a few categories and then describing interrelations between these blocks which take place in the uncertainty circumstances. In our closed economy model we have three groups of agents, namely households, firms and monetary authority [START_REF] Bernard | Plants and Productivity in International Trade[END_REF] . They form three standard blocks of the construction which can be found in most of DSGE models.

Regarding the demand block, decisions of economic agents are made here on the basis of the real interest rate and expectations on future real activity. Their behaviour rules determine the current real activity. In the supply block we describe in what way inflation is derived from the level of this variable, as well from agent anticipations of future inflation.

A monetary policy block describes how the central bank sets level of the interest rate depending on inflation from the supply block and real activity from the demand side.

The whole construction of a DSGE model is constituted by interrelations and mutual influences of the economic agents, then by their way of dealing with decision problems in the form of dynamic equation system and finally by adding randomness that means some sources of uncertainty.

As in every theoretical model we make some assumptions simplifying its construction and analysis, because we are not able to take into account all economic relationships.

Moreover, our model is supposed to be relatively simple among DSGE models, since it serves [START_REF] Ball | Real Rigidities and the Non-neutrality of Money[END_REF] It is worth noticing that in the theoretical form of every model the variables, both micro and microeconomic, have just conceptual character and it is necessary to make the further operationalization. We clearly describe this process of deriving the model in such representation that can bring analytical conclusions. [START_REF] Bernard | Plants and Productivity in International Trade[END_REF] In the DSGE models literature one can describe also decision problems of such agents as banks and government. It means that they just have determined rules of their behaviour, usually the central bank and government, or are treated as optimizing participants of the economy. For example the financial system with a role for intermediaries has been extensively studied with DSGE models proposed by Christiano et al. [2005].

Regarding the open economy, one considers as well foreigners in the sense of home country counterparts of all agent categories.

as an introductory example. Thus, we ignore the process of capital accumulation, do not model the labour market in detail, as well as assume that financial markets act smoothly, so that the central bank can perfectly control the short term interest rate.

The presented model is the basic New Keynesian (BNK) model in which we assume product differentiation, monopolistic competition and staggered price setting [START_REF] Blanchard | The Solution of Linear Difference Models under Rational Expectations[END_REF] . Prices are assumed to be sticky in the sense that firms cannot change prices for their goods each time they want [START_REF] Blanchard | Monopolistic Competition and the Effects of Aggregate Demand[END_REF]

Consumers

In the economy there is a representative consumer consisting of homogenous eternally living households [START_REF] Blinder | Asking About Prices: A New Approach to Understanding Price Stickiness[END_REF] . It faces intertemporal and intratemporal problem. Within its lifetime it has to choose consumption and leisure between periods. Within one period it has to choose which goods to consume.

Intertemporal problem

Each period the representative household chooses how much to consume and how long to work. It also knows that it will make similar choices in the future. Thus, each choice influences all periods within the lifetime because the consumer can save for the future or borrow against future income. It can decide also how much labour income to earn the current period and how much in the future. Taking this into account the household maximizes its lifetime expected discounted utility: [START_REF] Blanchard | The Solution of Linear Difference Models under Rational Expectations[END_REF] An early version of such a model can be found in Yun [1996]. In his model he used the staggered price-setting framework proposed by Calvo [1983]. Another way of introducing nominal inertia are quadratic costs of price adjustment, presented in Rotemberg [1982]. Hairault, Portier [1993] exploited this method in their early version of a monetary model. We propose the BNK model presentation on the basis of Galí [2008].

), , (

0 0 t t t t t L C U E ∑ ∞ = β (1.
ϕ γ ϕ γ + - - = + - t t t t t L C L C U (1.3)
that is additively separable in consumption and hours of work. The utility depends positively on the level of current consumption and negatively on the hours of work. The parameter ϕ expresses the elasticity of marginal disutility with respect to labour supply. The parameter 0 > γ denotes the coefficient of relative risk aversion [START_REF] Bourrinet | Les paradoxes de la zone euro[END_REF] . This utility function is called the constant relative risk aversion function (CRRA) 15 . For 0 > γ it is concave, which means the 13 Galí [2008] proposes to interpret t L as the number of employed households' members. We exploit this interpretation later in the further analysis. [START_REF] Bourrinet | Les paradoxes de la zone euro[END_REF] The value 1 = γ implies the log utility . ln ) (

t t t C C U =
representative household is risk averse. The higher is the curvature of the utility function, the higher is the risk aversion. The constant relative risk means that the consumer has a constant attitude towards risk expressed as a percentage of its current consumption. As consumption increases, he holds the same percentage γ of consumption in risky assets, that means in future consumption, which has the same expected value as the current one. The coefficient γ is at the same time the inverse of the intertemporal elasticity of substitution. The lower , γ the higher is the elasticity and the consumption growth is more sensitive to changes in the real interest rate.

To find the maximum of the utility function in (1.1) subject to the budget constraint we use the method of Lagrange multipliers [START_REF] Bullard | Learning about monetary policy rules[END_REF] :

}]. { [ 1 0 0 j t j t j t j t j t j t j t j t j j t j j j t j t T L W B B Q C P U E + + + + - + + + + ∞ = + ∞ = + + - - + + = ∑ ∑ λ β β L (1.4)
Calculating necessary conditions for the existence of an optimum, we set the behaviour rules of the representative household in the form of first-order conditions also called Euler equations [START_REF] Calvo | Staggered Prices in a Utility-Maximizing Framework[END_REF] :

, 0 = + = ∂ ∂ - t t t t P C C λ γ L (1.5) , 0 ) ( 1 1 , 0 = - = ∂ ∂ + = = t t t t j j t E Q B λ β λ L (1.6) . 0 = - - = ∂ ∂ t t t t W L L λ ϕ L (1.7)
From the first-order conditions (1.5)-(1.7), after some transformations, we get the following decision rules of the household18 :

,

ϕ γ t t t t L C P W =
(1.8) [START_REF] Bullard | Learning about monetary policy rules[END_REF] The Lagrange multiplier t λ of the budget constraint tells us how much the optimal lifetime utility would change if this constraint was relaxed by one unit, for example through an increase in income from an additional source. It is the marginal cost of the budget constraint, also called the marginal utility of income or the shadow price. See Klima [2005] on this.

. . Consumption consists of all these goods and takes the form of a consumption index: [START_REF] Eichenbaum | Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy[END_REF] . The integral is raised to the power ) 1 /( -σ σ to make the [START_REF] Eichenbaum | Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy[END_REF] The parameter σ measures the curvature of the aggregation. Expression ) 1 ( -= σ σ µ is interpreted as a desired mark-up over the marginal cost, the one the intermediate firm would charge if prices were flexible. Thus, when 1 > σ our way of aggregation reveals the existence of monopolistic power among the intermediate firms. The less sensitive is the final good producer to changes in prices of intermediate goods, the higher markup consumption function display constant return to scale [START_REF] Contessi | How Does Multinational Production Change International Comovement?[END_REF] . Solving the maximization problem of the final producer, we get a demand function for a single variety [START_REF] Cooley | Inflation Tax in a Real Business Cycle Model[END_REF]

1 1                 = + - + t t
, ) ( 1 1 0 1 - -         = ∫ σ σ σ σ di i C C t t (1.
: , ) ( ) ( t t t t C P i P i C σ -       = (1.11)
and a standard CES price aggregator:

, ) ( 1 1 1 0 1 σ σ - -       = ∫ di i P P t t (1.

Firms

The DSGE models methodology combines concepts of the New Keynesian with the RBC structure characteristics. Referring to microeconomic foundations, the key element is an assumption of monopolistic competition. In our exemplary model the intermediate firms have monopoly power to set individualized prices for their differentiated intermediate products, whereas the final good producer only buys all this output and aggregates it into the is charged by the intermediate firms. Dixit, Stiglitz [1977] proposed two forms for the aggregator: the CES function and some more general additive form. [START_REF] Contessi | How Does Multinational Production Change International Comovement?[END_REF] When consumption of each variety raises λ times then aggregate consumption also raises λ λ = 1 times. [START_REF] Cooley | Inflation Tax in a Real Business Cycle Model[END_REF] Computational details of this derivation are given in Appendix A. 1.2. final consumption good [START_REF] Corsetti | Varieties and the Transfer Problem: the Extensive Margin of Current Account Adjustment[END_REF] .

Technology

There is a continuum of intermediate firms represented by the interval ] 1 , 0 [

. Each of them uses homogenous labour services having no direct impact on the price of this labour. The production of i-th firm at time t, denoted by ), (i Y t is described by the function: we can state that the first-order conditions for this optimization problem are:

α - = 1 ) ( ) ( i L A i Y t t t , ( 1
, 0 ) ( ) 1 ( = - - - = ∂ ∂ -α α λ i L A W L t t t t t t L (1.18) . 0 ) ( = + = ∂ ∂ t t t i P Y λ L (1.19)
This results in the following decision rule: [START_REF] Corsetti | Varieties and the Transfer Problem: the Extensive Margin of Current Account Adjustment[END_REF] The other way to introduce monopolistic competition among producers is to assume that firms sell differentiated varieties directly to consumers who then aggregate them to a price index. However, in both cases the aggregating is not just mechanic summation but distinct type of economic activity of agents. [START_REF] Dejong | Structural Macroeconometrics[END_REF] Random variables a t ε are independent and identically distributed with the mean 0 and the finite variance.

We assume that they are normally distributed. In the time series literature such sequence is called a Gaussian white noise process. See, for example, Hamilton [1994]. (1.20) according to which the firm hires labour as long as the real wage is less than or equal to the marginal product of labour ) (i MPL t [START_REF] Dixit | Monopolistic Competition and Optimum Product Diversity[END_REF] . Given the level of technology, equation (1.20) expresses relation between the real wage and labour demand.

, ) ( ) 1 ( ) ( α α - - = i L A i P W t t t t

Optimal price setting

The intermediate firms take the aggregate price level t P as the given price for the aggregate consumption t C . They are monopolistically competitive, thus they have some market power to set prices for their differentiated goods. However, they cannot change the prices freely because changing them at every point in time is costly [START_REF]Convergence Report[END_REF] . Here we follow the Calvo [1983] pricing mechanism 26 .

The intermediate firms do not adjust prices continuously and in some cases they leave their prices unchanged even for long periods of time. Firms can change prices only at the time when they receive a price-change signal, allowing them for choosing their optimal relative price. In every period only a fraction ) 1 ( θ of firms is free to reset its price, while the remaining ones have to maintain their old prices [START_REF] Flanders | Differentiation under the Integral Sign[END_REF] . The former receive the price-change signal in given period, the latter do not.

A subset ] 1 , 0 [ ∈ t S
of firms, that are able to set an optimal price * t P at period , t [START_REF] Galí | Monetary Policy, Inflation, and the Business Cycle. An introduction to the New Keynesian Framework[END_REF] maximizes the discounted stream of expected future profits, taking into account that in the future there is some probability they can change prices and some that they cannot. For each firm in the subset t S there is probability k θ , k periods from now, of being forced to retain the price chosen at t . As the intermediate firm is a rational monopolist, it sets its price as the markup over the marginal cost to maximize the profit. However, due to the price rigidity, [START_REF] Dixit | Monopolistic Competition and Optimum Product Diversity[END_REF] Which can be seen from equation (1.14) and the definition of the marginal product of labour. [START_REF]Convergence Report[END_REF] Theories of price stickiness are broadly discussed in Blinder et al. [1998]. One of the most popular and at the same time simplest theories concerns costs of changing prices, called menu costs. 26 All computational details on the optimal price setting are presented in Appendix A.1.3. [START_REF] Flanders | Differentiation under the Integral Sign[END_REF] What we actually assume is that these firms reset their prices so that to catch up with recent inflation, according to some indexation rule. [START_REF] Galí | Monetary Policy, Inflation, and the Business Cycle. An introduction to the New Keynesian Framework[END_REF] We consider here a representative firm from the subset .

{ } , 0 ) ( 0 * , = Ψ′ - ∑ ∞ = + + + + k t k t k t t t k t k t t k t Y P Y Q E µ θ (1.23) where ) 1 /( - = σ σ µ and ) ( t k t k t Y + + Ψ′
by definition is the nominal marginal cost in period k t + for a firm whose price was last set in period .

t

We can notice that in the case of no price rigidities all expressions under the summation sign in (1.23) vanish, except the one with 0 = k . Thus, if prices were fully flexible, the firm would set its price at the level:

) ( * t k t k t t Y P + + Ψ′ = µ (1.24)
and µ can be interpreted as the desired markup over the marginal cost in the absence of constraints on the frequency of price adjustment. Let us notice that this frictionless markup is the higher, the smaller is the elasticity of demand for the given intermediate good. The more rigid is the demand, the higher markup is charged by the firms and through this the higher prices of their goods.

Assuming stickiness in prices of the form (1.21), from (1.23) we can state that the price setting rule for firms facing sticky prices is [START_REF] Galí | Macroeconomic Modeling for Monetary Policy Evaluation[END_REF] :

{ } { } , ) ( ) ( 0 1 1 0 1 1 1 1 * ∑ ∑ ∞ = - + - + ∞ = + - + - + - + - Π = k k t k t k t k k t t

Monetary policy

The monetary policy sets the short-term interest rate that affects prices and shapes inflation.

The interest rate is set by monetary authority in a quite complex procedure using a lot of information sets. This interest rate can be approximated in the model by assuming that the monetary authority controls the nominal rate with respect to some baselines for some economic variables like real interest rate, inflation or output. The issue is to define the appropriate baselines for a given economy depending on its degree of openness, degree of development, trade contacts with other economies, targets of monetary policy or participating in some economic formations.

The policy rule describes how the interest rate should react when there are some movements in the macroeconomic variables regarding the baselines. In the model the applied policy rule has the form: ). , 0 ( . . . ~2

1 v v t v t t v t N d i i v v σ ε ε ρ + = - (1.27)
The interest rate can be approximated according to various rules which show how the monetary policy should manage changes in the rate. This way of monetary decision making was proposed by Taylor [1993] and now is referred to as the Taylor rule. According to the rule (1.26), the monetary policy consists in adjusting the nominal interest rate to movements in the current inflation t Π and in the output gap . ~t Y [START_REF] Galí | European Inflation Dynamics[END_REF] The parameters π φ and y φ are measures of the influence of the inflation rate and the output gap. In standard calibrations [START_REF] Galí | European Inflation Dynamics[END_REF] The name "gap" is more obvious when we log-linearize equation ( The monetary policy, reacting to the movements in output and inflation, changes the nominal interest rate according to its policy rule, thus it affects real activity and prices. Hence,

n t
Y is regarded as a target of monetary policy.

Aggregation and general equilibrium

We will present the model in the form which allows for solving its underlying equation system. To proceed with the general equilibrium, we need to express the model relations using the aggregate variables determined at the level of the whole economy.

After describing the behaviour of individual agents in the economy, especially the way the individual intermediate firm takes its decisions and how it determines the values of variables characterizing the given firm, we proceed with aggregated variables.

Aggregate price dynamics

In equation (1.12) the price index was presented as if the prices were flexible. But they are rigid to the extent shaped by the probability θ . Considering the aggregate price level, we have to take into account that it is affected by the common optimal price The aggregate price level is the average of the optimal price * t P and the past price index 1 t P [START_REF] Ghironi | International Trade and Macroeconomic Dynamics with Heterogeneous Firms[END_REF] The values correspond to the interest rate policy of the Federal Reserve by Greenspan in years 1986-1999. See Taylor [1993], [1999]. [START_REF] Golub | Matrix Computations. Third Edition[END_REF] Formal steps of getting this representation are given in Appendix A. 1.4. weighted with probabilities of their occurring in the period .

t It includes also the strength of reaction of the final good producer to the changes in prices of the intermediate goods.

From (1.29) it follows that:

, ) 1 ( 1 1 * 1 σ σ θ θ - - -         - + = Π t t t P P (1.30)
which expresses the fact that inflation rate between two periods is influenced by the existence of firms which reoptimize their prices. Such firms choose the common optimal price that is different from the past aggregate price level.

Aggregate output and employment

Market clearing in all of the markets of goods requires that:

]. 1 , 0 [ ), ( ) ( ∈ ∀ = i i C i Y t t (1.31)
Aggregation of output takes the form:

, ) ( 1 1 0 1 - -         = ∫ σ σ σ σ di i Y Y t t (1.32)
and is consistent with the aggregation of consumption according to (1.10) which together with (1.31) gives us:

.

t t C Y = (1.33)
Market clearing in the market of labour: . ) (

∫ = 1 0 ) ( di i L L t t (1.
1 0 1 1 ∫ -         = di A i Y L t t t α (1.35)
Using the goods market condition (1.31) and the definition of the demand for a single variety (1.11), we derive the relation between technology, the aggregate output and the aggregate employment: . ) (

1 1 0 1 1 - - - -                   = ∫ α α σ α di P i P L A Y t t t t t (1.36)
It can be shown that in a neighbourhood of the steady state inflation 1 = Π the integral in (1.36) is equal to one up to a second-order approximation [START_REF] Grabek | SOEPL 2009 -An Estimated Dynamic Stochastic General Equilibrium Model for Policy Analysis And Forecasting[END_REF] . Thus, the approximate relation between the aggregate output, employment and technology can be given as:

.

1 α - = t t t L A Y
(1.37)

Real marginal cost

The real marginal cost is a ratio of the real wage and the marginal product of labour.

According to equation (1.20) the average real marginal cost in the economy can be expressed as follows:

. 1

1 1 α α t t t t t L A P W MC - - ⋅ = (1.38)
Using the household decision rule (1.8) and the definition of the aggregate output, this cost takes the form:

. 1

1 1 1 1 α ϕ α α ϕ γ α - + - - + + - = t t t A Y MC (1.39)
Equation (1.39) enables us to find the relation between the equilibrium level of output under flexible prices and other variables of the model:

( ) , 1 1 1 1 1 α ϕ α α ϕ γ α - + - - + + - = t n t A Y MC (1.40)
where µ

/ 1 = MC
and µ is the desired markup, the one producers would charge if prices were flexible.

General equilibrium and model summary

In previous parts we have presented microeconomic decision problems of the economic agents considered separately. Resulting rules of behaviour constitute conditions of the partial equilibrium. Now we would like to take into account behaviour of all agents, but simultaneously, to describe the general equilibrium.

In the general equilibrium all rational and anticipating economic agents try to reach their individual optimum. After solving its decision problem, each agent is characterized by a set of behaviour rules. These rules are first-order conditions of the partial equilibrium of the agents. The general equilibrium will occur when we account for all decisions rules of all agents, behaviour of agents which do not solve optimization problems directly like the [START_REF] Grabek | SOEPL 2009 -An Estimated Dynamic Stochastic General Equilibrium Model for Policy Analysis And Forecasting[END_REF] See the proof in Galí [2008].

monetary authorities, and rules according to which the markets operate. Part of these rules are macroeconomic balance conditions which in our model consist in the market clearing conditions.

Particular equilibrium conditions were mentioned earlier, while aggregating variables. Now we summarize the general equilibrium of the model. We define the equilibrium as a sequence of quantities:

{ } { } , , , , 0 0 ∞ = ∞ = = t n t t t t t t Y Y Y C Q (1.41)
and a sequence of prices:

{ } { } , , , , , 0 * 0 ∞ = ∞ = Π = t t
{ } { } ∑ ∑ ∞ = - + - + ∞ = + - + - + - + - Π = 0 1 1 0 1 1 1 1 * ) ( ) ( k k t k t k t k k t t

Solution procedure

To find out how the model behaves for a given set of initial conditions and parameter values, one has to exploit some computational methods. We present here possible procedure of solving DSGE models [START_REF] Green | Aggregation in Economic Analysis[END_REF] . There are two distinct and broad classes of solution methods:

perturbation and projection methods. The perturbation methods are convenient while dealing with a complex model with many predetermined variables [START_REF] Hairault | Money, New-Keynesian macroeconomics and the business cycle[END_REF] . However, they are useful only [START_REF] Green | Aggregation in Economic Analysis[END_REF] We try to avoid a commonly used term 'solving a DSGE model'. In our case this abbreviation means solving the reduced form of the model, that is the linear equation system resulting from the model equations' approximation. It is particularly often met in technical language. But the term is so popular, that has become conventional and one can find it often in many textbooks. In the programming appendices we also use it. [START_REF] Hairault | Money, New-Keynesian macroeconomics and the business cycle[END_REF] We use one of the perturbation methods to solve more complex models of Chapters II and III. Whereas in Chapter I the solution method is imposed by the techniques exploited in the software used, mainly the DYNARE. Thus, for the sake of detailed explanation, we will limit ourselves to presenting only the method actually used by us to solve the models of all chapters. The projection methods are widely discussed in Lim,

McNelis [2008].

if we concern shocks representing small deviations from the steady state [START_REF] Hamilton | Time Series Analysis[END_REF] . In the class of perturbation methods the most common are linearization and log-linearization. Comparing to the projection methods they are much less computationally demanding. The idea is to transform the model equation system which is usually nonlinear into a linear one.

It is then much easier to solve such a system. The issue it to get a sufficiently good linear approximation of the model equations. If the model is not far from the steady state, its linear version is good enough to approximate the original model.

The effect of the log-linearization is expressing the model variables as percentage deviations from their steady state values, thus from their values in the long-run deterministic equilibrium. This points out, that the first step of the solution procedure, in case of the loglinearization, is to state the steady state of the model. Thus, the necessary condition is that such a state exists and is unique.

Steady state

Determining the steady state of a model consists in finding values of all the model variables in the specific situation which is compatible with the long-run deterministic equilibrium.

Thus, we consider the case when there are no disequilibrium sources at the macro and micro level. All economic agents reach their optimum and at the same time the grounds of arbitrage vanish. Prices are fully flexible. All past shocks have been absorbed and the stationary stochastic disturbances have no influence on values of exogenous variables. All in all the model variables tend to have unchanged values. Their dynamics is consistent with the longrun tendencies.

In our model equation system of eight variables constituted in Table 1.1, the steady state can easily be found by analytical means. The only assumption we make additionally is about the value of the steady state gross inflation rate. When we assume that it is equal to one, the values of the remaining variables are as follows: σ The real marginal cost is equal to the inverse of the desired markup. The output is equal to its natural level and the gross interest rate is determined by the discount factor.

, 1 1 σ σ µ - = = MC (1.51) , 1 ) 1 ( 1 α ϕ α γ α µ α + + - -         - = Y (1.

Log-linearized model

The original system of the DSGE model equations is usually nonlinear. Solving it directly with chosen values of parameters is quite complicated and time consuming and in many cases even impossible when one deals with more complex models. Thus, it is very useful to transform the nonlinear system into the much simpler linear one, that can more easily be subject to further computations. Among linear techniques of approximation the loglinearization is the most popular, due to its ease of interpretation [START_REF] Heer | Dynamic General Equilibrium Modelling[END_REF] .

Instead of dealing with endogenous variables in levels, we consider their percentage deviations from the steady state. Then, after obtaining the model solution and the impulseresponse functions, we are able to understand the underlying behaviour of the model economy on the grounds of the linear equation system. The special focus is on the parameters used in assumptions made during the model constructing with their basic meaning and the role, they play in interpreting results obtained from the transformed linear system.

The basic idea of log-linearization consists in converting the original variables into their log-deviated counterparts in the following way:

, ln ln X X x t t - = (1.56)
where t X denotes the variable in level and X means its steady state value.

Let us notice that expression (1.56) can be given also as: The inflation rate and the output gap are expressed using their log-deviated counterparts as in the definition (1.56).

. 1 ln       - + = X X X x t
The log-linearization of the remaining equations from Table 1.1, except for the price setting rule (1.43), yields 40 :

) )( 1 ( 1 * - - - = t t t p p θ π
(1.60) [START_REF] Helpman | Export versus FDI[END_REF] Basics and details of the log-linearization technique are presented in Appendix A.1.5. [START_REF] Helpman | Trade, FDI, and the organization of firms[END_REF] π which must hold for the finalgood market to clear. We will refer to it as the dynamic IS equation (DIS). Computing levels of the total output in subsequent periods, we get a link between current output and the entire future expected path of real interest rates, which is given as follows:

.

) ( 1 0 ∑ ∞ = + - - = k k t t r y ρ γ (1.66)
The current output is determined both by the current level of the short-term rate and future expected interest rates ,which are expectations of future monetary policy.

Log-linearizing of the price setting rule (1.43)

σ α α α + - - = Θ
This equation is often referred to as the New Keynesian Phillips curve (NKPC) [START_REF] Hopenhayn | Entry, Exit and Firm Dynamics in Long Run Equilibrium[END_REF] . The parameter λ is a measure of sensitivity of the inflation rate to changes in the marginal cost.

From the Phillips curve we can see, that there is a positive relation between inflation and real activity through the marginal cost. Higher economic activity involves more hours of work, resulting in higher wages and thus leading to higher marginal costs. Firms facing higher marginal costs raise, in average, their prices causing an increase in aggregate inflation.

Thus, the deviation of marginal costs from their average level measures labour market tension.

The Phillips curve is a forward-looking relationship. Computing levels of the aggregate inflation in subsequent periods, we get a link between current inflation and the entire future expected path of the marginal cost and, through it, between current inflation and [START_REF] Hopenhayn | Entry, Exit and Firm Dynamics in Long Run Equilibrium[END_REF] Computational details on getting the NKPC are given in Appendix A.1.6.

the expected real activity:

∑ = + = k k k t t k t mc E 0 }. { β λ π (1.68)
The current inflation is determined both by the current level of the marginal cost and future expected marginal costs, which are expectations of future monetary policy. Future expected marginal costs depend on future expected real activity, which in turn depend on expectations of interests rates, as equation (1.66) shows. Thus, inflation today depends on the entire future course of monetary policy.

Equations (1.66)

Solving the model

The model is complete in the sense there are as many equations as decision variables. Closing the model was possible thanks to the introduction of the monetary policy rule. But even if the model is closed, it can have no solution or if this solution exists, it does not have to be stable one.

Solving the system of the model equations is achieved by numerical methods and means deriving the reduced form of the model, in which each endogenous variable depends only on the past endogenous variables and on the exogenous variables. To solve the model constituted in system (1.72)-(1.74), we use the method by Blanchard, Kahn [1980] implemented directly in the DYNARE software [START_REF] Justiniano | Investment Shocks and Business Cycles[END_REF] . This is the first technique proposed for solving the linear rational expectations models [START_REF] King | The Solution of Singular Linear Difference Systems Under Rational Expectations[END_REF] . The method uses the log-linear approximation of optimality conditions for the original optimization problem underlying the model [START_REF] King | System Reduction and Solution Algorithms for Singular Linear Difference Systems under Rational Expectations[END_REF] .

The Blanchard-Kahn method is based on matrix calculus and determines properties of eigenvalues of some system matrices. The problem of the eigenvalues translates into the problem of appropriate values of the structural parameters of the model or their combinations.

The method allows to state if there exists the locally unique stable solution to the system. The Blanchard-Kahn method uses the actual nonlinear structure of the model, although [START_REF] Justiniano | Investment Shocks and Business Cycles[END_REF] As we use the DYNARE software, the method for solving the model exploited and described here is the one used by Mancini Griffoli [2007-2008]. [START_REF] King | The Solution of Singular Linear Difference Systems Under Rational Expectations[END_REF] For a review of solution methods see, e.g., DeJong, Dave [2007]. [START_REF] King | System Reduction and Solution Algorithms for Singular Linear Difference Systems under Rational Expectations[END_REF] A broad discussion and explanation of this method is given in Sims [2002].

it approximates the first-order conditions. Thus, the first step is to get the linear version of the model as in the previous part. The next stage is to write the linear model in a state space representation. For our log-linearized model (1.72)-(1.74), this representation is of the form:

), ( ~1 1 t n t T t t t t T t t v r E y E y - +       =       + + G B π π (1.76)
where , ˆρ -= n t n t r r and:

, ) ( 1       + + - Ω = y T φ γ β κ κ γ φ β γ π B , 1       Ω = κ T G (1.77) with ). /( 1 π φ κ φ γ + + = Ω y
In order to use the Blanchard-Kahn method [START_REF] Kleiber | Statistical Size Distributions in Economics and Actuarial Sciences[END_REF] , directly we rewrite the model (1.76) as follows:

), ( 1

1 n t t T T t t T t t t t r v y E y E - +       =       + + G Z Z π π (1.78)
where:

.

1 ) ( 1 1       - - + + = = - γ κ γ φ β φ γ β κ β γ π y T T B Z (1.79)
The Blanchard-Kahn condition of locally unique stable solution to the system (1.78) states that there are as many eigenvalues of the matrix , T Z greater than one in modulus, as there are non-predetermined variables. Thus, we know that there should be exactly two eigenvalues outside the unit circle. This condition is not guaranteed a priori.

Impulse-response analysis

In the class of DGSE models one describes model dynamics usually by means of impulseresponse functions (IRFs). This tool is often used in analysis of many other class of economic models, for example the classic structural models or the econometric ones. But when it comes to a DSGE model, we can exploit also its microeconomic basis to interpret results representing the macroeconomics. The IRFs display dynamic features of the model and they are the basic source of knowledge about interrelations, the direct ones and these ongoing in time.

To get impulse-response functions, we pose some disturbances to the dynamic system, which allows us to do the theoretical analysis [START_REF] Krugman | Scale Economies, Product Differentiation and the Pattern of Trade[END_REF] . Numerical simulations conducted in the DYNARE with Monte Carlo trials give the IRFs [START_REF] Kydland | Time to Build and Aggregate Fluctuations[END_REF] . On the basis of these functions one can verify the usefulness of the model in explaining some intuition behind the assumptions and interpret the analytical results.

Discussing the shape of the IRFs and comparing them serves the purpose of describing dynamics of the model and understanding interrelations among the variables. We study what is the reply of the endogenous variable subjected to some disturbance, what is the direction of this response, its scale, whether there is some delay and when the maximal reaction occurs.

Future shocks are simulated from their distribution in multitude Monte Carlo trials. Then all obtained responses of endogenous variables to these disturbances constitute the average reaction of the model equation system.

Under a transitory shock the model eventually returns to the steady state. In this case, contrary to a permanent disturbance, the model is assumed and constructed to be the stochastic one. We do not know the occurrence of all future shocks. Only the distribution of them is given at the time of computing the model solution. Economic agents know that the future values of innovations are random but will have zero mean.

Here we deal with the monetary model. The nominal frictions in the form of sticky prices were introduced in order to analyse the role of money and monetary policy. We will [START_REF] Krugman | Scale Economies, Product Differentiation and the Pattern of Trade[END_REF] For the disturbance we will also use the term "shock". Actually it is an abbreviation commonly found in the DSGE models literature. But what we in fact mean by the disturbance is the change in the exogenous variable described by some stochastic process. The shock is in turn the change only in part of this process which we usually assume to be the white noise and call innovations or an innovation process.

examine what are the effects of the monetary policy shock on real variables of the model.

In the model with no nominal rigidities there would be no such effect.

Calibration

All parameters used in the model in its theoretical form influence decisions of economic agents on the microeconomic level, also these ones which describes disturbances processes.

But in the steady state all disturbances vanish and have no effect on parameters, and hence no effect on steady state values of variables. Thus, with the purpose of the steady state analysis, we will focus only on parameters that determine long-run tendencies. To study dynamic properties of the model, we have to solve the underlying equation system. Thus, we need to set values for all parameters of the model. Following Galí [2008] we use calibration of the model parameters as in Table 1.3. These values are commonly used in the literature and usually related to studies using some micro data.

The values of parameters α and σ are widely used in the business cycle literature.

The intratemporal elasticity between intermediate goods set to 6 implies a steady state markup of 20 % in the goods market. By the given calibration, the measure λ of the sensitivity of the inflation rate to changes in the marginal cost is equal to 0.0425. The steady state quarterly interest rate i equals one. And the average price duration amounts to three quarters, which is consistent with empirical evidence [START_REF] Kuhn | Nonlinear programming[END_REF] . The values of coefficients in the interest rate rule (1.74) are consistent with variations observed in the data on inflation and the interest rate given in the annual rates [START_REF] Lasalle | The Stability and Control of Discrete Processes[END_REF] . Because in our model periods are interpreted as quarters, the output gap coefficient has to be divided by 4. The value of the discount factor implies the steady state real return on financial assets of about 4 percent per year.

Monetary policy shock

We analyse changes of variables' values in response to transitory increase in the stochastic component of the interest rate rule. The size of the disturbance is one standard deviation of the shock, which we assume to be 0.25%. It means that t v increases from 0 to 0.0025 when the shock hits the system. We have to remember that all variables are expressed as percent deviations from the steady state values. Thus, each of them comes back to its steady state value that is zero.

The changes in variables have only temporary character, because each variable is stationary. Hence, after about three years all variables return to their long-term values. With persistency equal to 0.5, the shock disappears after about one and a half year. Hence, the monetary authority has to reduce also the money [START_REF] Kuhn | Nonlinear programming[END_REF] Galí, Gertler, López-Salido [2001] and Sbordone [2002] provide estimations based on aggregate data. Galí [2007] points out also some micro evidence. [START_REF] Lasalle | The Stability and Control of Discrete Processes[END_REF] These values were originally proposed by Taylor [1999] as a good approximation of the monetary policy conducted by the Federal Reserve in years 1986-1999 when the head of the USA central banking system was Alan Greenspan. His monetary policy decisions largely followed standard Taylor rule prescriptions.

supply. This negative short run comovement of the nominal rate and the money supply, in the response to an exogenous monetary policy shock, is known as the liquidity effect.

Figure 1.1. Effects of a monetary policy shock

Reponses of both interest rates ,as well as of the inflation, are given in annual terms. Source: Author's numerical simulations

The response of the real interest rate is stronger than of the nominal one due to the decline in the expected inflation. The introduction of the nominal rigidities in the form of sticky prices causes that the changes in the nominal rate are not matched by one-for-one changes in the expected inflation, as the New Keynesian Phillips curve (1.72) explains.

Hence, the real rate responds differently than the nominal rate. Here, by the given calibration its positive response is stronger.

The changes in the real rate influence the behaviour of the consumption and investment and through them it affects also the responses of output and employment. Thus, Monetary shock the monetary policy has short run effect on the real variables. The key result of the basic New Keynesian model is the short run non-neutrality of the monetary policy. As Galí and Gertler [2007] underline the monetary transmission depends critically on the private sector expectations, especially of the producers, what will be the future path of the monetary policy instrument, that means what will be the future level of the short-term interest rate.

0

Technology shock

We analyse changes of variables' values in response to transitory increase in the aggregate productivity. The size of the disturbance is one standard deviation of the shock, which we assume to be 0.01. It means that the aggregate productivity t A increases from 1 to 1.01 when the shock hits the system and its log deviation t a from 0 to 0.01.

To study the effect of the real disturbances in the economy, we take an example of 1 percent positive technology shock given by equation (1.15). The results in the form of the impulse-response functions are presented in Figure 1.2.

The state of technology is high in the period of the shock, compared to its level anticipated for later periods. The response of the natural level output is always positive and to a large degree follows the technology trajectory, because under flexible prices the real marginal cost is constant and does not affect the response of the output. The reaction size depends on values of the parameters and relations among them, as equation (1.64) displays.

By the given calibration, the natural level of output actually mirrors the time path of the technology shock.

The sign of the response of output and employment depends on the choice of parameters' values. By the given calibration, the positive technology shock lowers the real marginal cost. Thus, according to equation (1.62), the output response can be positive or negative, depending on how high is the marginal cost decline. We set values of the parameters so that, the marginal cost response is not strong enough, to cause the negative output reaction. Because the positive response of the output is weaker than the technology shock, the employment falls down, in accordance with equation (1.37).

Figure 1.2. Effects of a technology shock

Source: Author's numerical simulations

From Figure 1.2 we can observe how the monetary authority responds to the technology shock. According to the Taylor rule (1.74), the interest rate has to adjust to inflation and to the output gap. Thus, the central bank reduces the nominal interest rate and as a result the real rate also decreases. By doing that, the monetary authority rises the money supply. Such policy however is not sufficient to close the negative output gap. The output increases, but slower than its natural counterpart. According to the Phillips curve (1.72), this induces a decline in inflation.

Concluding remarks

In this chapter we described synthetically the methodology of DSGE models to introduce the reader to this class of models. Our aim was not to give a comprehensive review of the literature, but rather a detailed and compact presentation of all stages of research process by using a DSGE model. We use the example of the basic New Keynesian model due to its small scale and relative simplicity. However, it is very interesting to show with this example effects of the monetary authority policy.

According to the basic New Keynesian model, there is room for the role of monetary policy. This is in contrast to the classical monetary model by Cooley, Hansen [1989] which, despite accounting for the monetary sector, generally predicts neutrality of monetary policy. DSGE models which account for nominal rigidities, display the role of monetary authorities in affecting both the nominal and real side of the economy. Thanks to this, they recently attain much interest of the policymaking community, who exploits these models in making its decisions. Many central banks in Central and Eastern European countries have developed their own large scale DSGE models to analyse and forecast results of a given policy and effects of policy changes, as well as to perform counterfactual experiments [START_REF] Lim | Computational Macroeconomics for the Open Economy[END_REF] . However, they are still treated rather as an auxiliary not as a basic tool in the policymaking.

In constructing such models for the purpose of the monetary policy analysis, the key role is played by the interest rate rule, usually of the Taylor type.

The aim of this chapter was to provide an example of a DSGE model and by these means to describe and explain all stages of dealing with models of this class. We focused on selected aspects to use them in the next chapters. In particular, we presented what is the standard in the DSGE methodology, like representative economic agent approach, monopolistic competition among intermediate firms or the Dixit-Stiglitz framework. [START_REF] Lim | Computational Macroeconomics for the Open Economy[END_REF] On this point see Tovar [2009].

We explained also in detail a selected method of solving DSGE models with the loglinearization technique and the Blanchard-Kahn condition. We refer to all these issues in next chapters, while describing a more complex model with the key role of the foreign direct investment. We use part of assumptions presented in the first chapter to describe production side of economy in a two country world. The novelty is introducing the heterogeneity in productivity of firms. Thanks to descriptions and explanations of the DSGE methodology issues presented in Chapter I, we can focus on the specific assumption of heterogeneous firms and use all computations techniques without going into details.

Chapter II

Symmetric DSGE model with heterogeneous firms

Introduction

The aim of this chapter is to apply the DSGE methodology introduced in Chapter I to analyse effect of the plant localization and the foreign direct investment (FDI) hosting on the output fluctuations. The research subject is especially important from the point of view of emerging economies, that have benefited from the production delocalization of foreign firms. These firms have been encouraged by the specific conditions prevailing on the domestic market of the other economy, such as lower real wages, smaller competition, bigger sales. Lejour et al. [2009] emphasize that openness to import and the inward FDI positively influences productivity and income. From the point of view of individuals, new factors of competition occur ,causing that firms exit and employees lose their jobs. But in the larger scale the overall benefits overweight. The hosting economy experiences, among others, lower prices, increased product variety, higher productivity and better accessibility of foreign knowledge and technology.

The problem links the macroeconomic issues of the economy performance with the microeconomic assumptions about a firm that makes its decisions on the basis of conditions specific only for it. Thus, we need a macroeconomic model that incorporates accurately microeconomic assumptions and allows for heterogeneity of firms. The framework, that takes into account all this issues, is a dynamic stochastic general equilibrium model with heterogeneity in firms productivity.

The heterogeneity assumption is key for studying effect of FDI and multinationals on the hosting economy. The idiosyncratic productivity parameter is introduced as an argument of the probability density function of the Pareto distribution. Here, we develop existing theoretical constructions to account for nature of FDI and differences of economies in the FDI intensity.

The literature on DSGE models with heterogeneity is now quite broad and relates to modelling heterogeneous behaviour of economic agents of various types. It has become very popular and even standard, when it comes to the DSGE modelling. Describing heterogeneity started with differentiating levels of productivity of firms in the work by Krugman [1980]. It allows for considering various types of firms, depending on economic activities they are engaged in. The framework used there was designed to study the patterns of international trade. The heterogeneity assumption was then developed in many papers. Melitz [2003] proposed an extension of previous models, in the form of monopolistically competitive firms in a general equilibrium setting [START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] . The heterogeneity assumption is introduced in such a way, that aggregate outcomes from various sectors of economic activity are summarized by average productivity levels2 . Thus, each sector of heterogeneous firms behaves as a set of representatives with the same average level of the productivity.

The framework used by Melitz [2003] and then discussed in Ghironi, Melitz [2005] allows to regard the fact that only highly productive firms can export. This is due to additional costs that such firms have to pay to be able to produce and export. Helpman et al. [2003] incorporate another kind of the economic activity besides exporting, mainly FDI. Contessi [2010] endogenizes this strategy of internationalizing of production to analyse implications of the entry of multinational firms (MNFs).

All these models account for bridging the gap between trade theory and international macroeconomics. They use the concept of heterogeneous firms instead of the representative ones, so the firm productivity level is an endogenous feature of the model. By using such models, one can study influence of firms, which export and conduct FDI, on the given economy. As shown by Contessi [2010], introducing the FDI sector highly improves the model fit to the data and allows for an explanation of the observed patterns of the real exchange rate. Other authors highlight abilities of such models to explain the current account adjustment or the intra-industry effects of international trade.

However, studying the present literature on DSGE models and the trade theory we can notice that the models do not account for the nature of FDI. International firms can have various reasons to locate their production abroad. They can consider various strategies of selling. Finally, they can face various conditions on the local producing market because of asymmetric bilateral trade relations between economies. The papers on the trade theory discuss these issues but DSGE models do not incorporate them. The problem is to make appropriate assumptions.

In this chapter we present a two country DSGE model of the open economy with heterogeneous firms. In this framework we try to deal with the problems mentioned above.

To cope with the first issue, we extend the existing model by Contessi [2010], by introducing another type of economic activity. In our model there are multinationals of two kinds. Some of them set their affiliates abroad to produce there and serve the local foreign market. The novelty is that there are also multinationals which decide to export back to the economy of their origin 3 .

The standard treatment of two economies in DSGE models with heterogeneous firms is to assume they are fully symmetric. Thus, they are described by analogous dynamic equations and the respective steady state values and relationships are the same for both of them [START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF] . There is no room for asymmetry in bilateral trade relations between them. Such situation does not correspond to reality, when one can notice significant differences in foreign direct investment shares in two economies. For example, when one of them is a developed country and the other one is an emerging market [START_REF] Schorfheide | Bayesian Analysis of DSGE Models[END_REF] . To exemplify such a situation, let us present some data on the German and Polish FDI shares. shows that the German economy invests much more in FDI than the Polish economy. This tell us something about the economies separately, but also allows to compare their levels of development in some extent, as we know that only the most productive firms engage in FDI. But the data do not tell anything about the bilateral FDI relations between the economies. However, one can expect that there can be many asymmetries in this regard.

Concerning the set of only two economies with different levels of development, we can assume that the one of them is a host economy for relatively many foreign multinationals coming from the developed country, whereas the opposite is not the case.

Introducing asymmetry between economies in terms of different shares of multinationals can been accomplished in various ways. We study frameworks that account for this fact. First, we assume that the analysed economies are symmetric in every aspect of their functioning. That means all home economic agents behave the same as in the foreign country. They take the same decisions and have the same possibilities. The only asymmetry we allow here comes from the fact that parameters determining behaviour of agents can take different values in the two economies. The other way of dealing with asymmetric relations is to assume the asymmetry in the framework, that means different dynamics of the two economies. But that will be the issue of Chapter III. First we would like to familiarize with the version of the model which describes the two economies analogously.

The evolution of the framework, mainly regarding the nature of FDI and differences in the FDI intensity, is very important from the point of view of the hosting economy. The foreign multinationals are the source competition for the domestic producers. Their activity influences prices on the domestic market and thus the price index in the home economy.

The organization of the chapter is as follows. The first section presents the theoretical construction in a very detailed way. But to start with, we explain earlier general features of the model and introduce basic notation. Then, we go into details presenting and explaining all assumptions about the economic agents, the relations among them and their decision problems. We show the way sectorial, national and international variables are aggregated.

This subsection ends with the general equilibrium conditions and a model summary. The next part relates to the steady state analysis. We study static properties of the model and compare economies in the long run using different sets of parameter values. The last subsection is meant to analyse the dynamics of the model. We present the log-linearized version of the model. Then we study impulse-response functions of variables to exogenous shock in the aggregate productivity, as well as make some numerical simulations to discuss effects of permanent disturbances.

Two country open economy model

This is a two country DSGE model of open economy where each country is populated by homogenous consumers and a continuum of potential producers who write contracts in nominal terms, each choosing to produce a different variety ω . There exists labour mobility within each country which guarantees domestic wage equalization. But there is international immobility of workers which allows for wage differentials across countries.

There are no rigidities in the form of price or wage stickiness, nor any form of adjustment costs in price or wage setting. This is a fully flexible price model. Main groups of economic agents are consumers, firms and foreigners who supply imports and demand domestically produced goods. Home and foreign firms can set their multinational affiliates abroad to sell their products in the host country or to export them back to the economy of their origin. There is no financial intermediation, so that households lend to the government directly. Each country is a financial autarky in the sense there is no international trade in bonds.

General features

The behaviour of consumers, final firms and to a certain extent also intermediate producers is described as in the standard DSGE models. The households consume final goods and supply labour services. They maximize their lifetime utility from consumption subject to some budget constraint. Perfect competitive final producers purchase and transform infinite number of intermediate varieties into homogenous final goods. We normalize their total number to 1, as we can regard the single final good as an aggregate consumption basket consisting of many intermediate varieties. Because their number can continuously increase and for the sake of computational simplicity, one assumes there is a continuum of them.

Intermediate firms act as monopolistically competitive. They produce differentiated varieties which are imperfect substitutes for each other. This two step structure is convenient for the theoretic modelling because the consumers buy only one final good and all analytical aspects, connected with dynamics resulting from introducing the heterogeneity, are regarded at the intermediate level. At the final consumption level we see only consequences of heterogeneity assumption coming from aggregation over intermediate firms.

These are standard assumptions in DSGE models originated from the Real Business Cycle and the New Keynesian literature. Proceeding with intermediate firms, we introduce some novelty connected with specific character of DSGE models with heterogeneous firms.

The number of goods available for consumption combining the one final good in the given economy is not constant [START_REF] Aguiar | Emerging Market Business Cycles: The Cycle Is the Trend[END_REF] . It varies between the two economies. That means the consumption baskets in both countries can be composed of different numbers of goods.

The number of goods available for consumption varies also over time. Each period new entrants in number t E N , come to the market, becoming potential producers one period later, which introduces a one period time-to-build. Moreover, both entrants and incumbent firms face probability of being hit by a bad shock, which forces a firm to exit the market.

We assume that this shock occurs each period with a constant probability [START_REF] Andrle | The Role of Trends and Detrending in DSGE Models[END_REF] ), 1 , 0 ( ∈ δ so that the number of producers is equal to the number of survivors from the set of firms in the previous period:

). )( 1 ( 1 , 1 , , - -+ - = t E t D t D N N N δ (2.1)
This law of motion for the number of home producing firms defines the extensive margin of activity [START_REF] Ball | Real Rigidities and the Non-neutrality of Money[END_REF] . Thus, it shows the production side of evolution of varieties in the economy. There are various types of activities which firms can engage in. Among home entrepreneurs there are ones that produce and sell only domestically in number t DO N , , then t X N , of firms which also export, t I N , of multinationals which set their affiliates abroad to produce and sell there, and finally t M N , of the most productive companies localizing their production in the other country to export back to the economy of their origin. The total number of firms in the economy is given by: .

, , , , , t M t I t X t DO t D N N N N N + + + = (2.2)
From the point of view of consumption, the evolution of varieties accounts for foreign firms that offer their products to home consumers in the form of export or sales of their subsidiaries. The number of domestic and foreign firms producing goods combining the consumption basket in the given economy is of the form: [START_REF] Aguiar | Emerging Market Business Cycles: The Cycle Is the Trend[END_REF] Following Melitz [2003], it has become a standard in DSGE models with heterogeneity in firm productivity.

The issue now is whether to endogenize this phenomenon or to determine it exogenously.

.

, * , * , , t M t I t X t D t N N N N N + + + = (2.3) Equations (2.
2) and (2.3) present two sides of the fact that the number of goods varies from period to period. This concerns both the number of goods available for consumption and the extensive margin of activity. Analogous equations hold for the foreign economy. The distinction of various types of economic activity results from the assumption about heterogeneity in the productivity of firms. Each firm has its own level of idiosyncratic productivity. To be able to export or to engage in the foreign direct investment, a firm has to exceed some level of productivity. This gives distribution of firms in the economy on four sectors characterized by average levels of productivity. Each sector is described by average values summing up information from individual firms, like average prices or average profits from a given type of the activity.

Consumers

There is a continuum of consumers, each of whom is identical to all others. Here, we describe behaviour of the representative consumer. We regard its intertemporal and intratemporal problem. The former is how to choose consumption of the final good between periods. The latter lies in choice between consumption of many goods within one period.

Intertemporal problem

The representative household living for an infinite number of periods faces the intertemporal problem. At each period t it takes as given the nominal wage t W denominated in units of home currency for supplying inelastically L units of labour and chooses consumption , to maximize the lifetime expected discounted utility subject to the budget constraint. We assume that the household chooses nontrivial solutions. The problem of intertemporal optimization of utility from consumption takes the form:

{ } ), ( max 0 , , 0 1 1 t t t t t B x C C U E t t t t ∑ ∞ = ∞ = + + β (2.4) where ) 1 , 0 ( ∈ β
is a denotation of the time discount factor. It represents the idea that utility further out in the future is less valuable than utility closer to the present moment.

The household faces period-by-period budget constraints. There are an infinite number of them. A budget constraint for a period t is given as:

. ) ( ) 1 ( ) ( 1 1 , , , + + + + + = + + + + t t t E t D t t t t t t D t t t B x N N v C B r x N v L w π (2.5)
It is written in real terms, where the real wage is given as

t t t P W w / =
and t P is the price index. The income comes from labour, the sale of shares in the mutual fund t t x v ~ and from the associated profit t t x π ~ they earn from the producing firms, as well as from the sale of risk-free bonds t B bought in the previous period, together with the interests they yield, where the interest rate is t r [START_REF] Bernard | Plants and Productivity in International Trade[END_REF] . The expenses come from consumption, buying shares in the mutual fund that owns a stock of

t E t D N N , , +
producing and new-entry firms whose average value is t v ~ and from buying domestic risk-free bonds. Shares of stock t x are the consumer's holdings of real assets and t v ~ is the real price of one share. The intertemporal problem (2.4) and the budget constraint (2.5) are expressed from the point of view of the representative consumer.

They include the average terms t v ~ and t π ~ because the mutual fund owns the stock of all home firms. And firms are not homogeneous as consumers but heterogeneous. Thus, the associated total profit and real price of one share do not relate to the representative homogenous firm, but to the average firm, which is heterogeneous due to its relative productivity level.

We consider the following utility function, according to which utility depends positively on the level of consumption:

, 1 ) ( 1 γ γ - = - t t t C C U (2.6) where , 0 > γ 1 ≠ γ
denotes the parameter of relative risk aversion.

The Lagrange problem, which is to maximize utility subject to the budget constraint:

}], ) 1 ( ) ( ) ( { [ , 1 1 , , 0 0 j t j t j t j t D j t j t j t j t j t j t j t E j t D j t j t j j t j j j t j t B r x N v L w B x N N v C U E + + + + + + + + + + + + + + + + ∑ ∞ = + ∑ ∞ = + + - + - - + + + + + = π λ β β L (2.7)
yields the following first-order conditions:

, 0 = + = ∂ ∂ - t t t C C λ γ L (2.8) , 0 ] ) ( [ ) ( ~1 , 1 1 1 , , 1 , 0 1 = + - + = ∂ ∂ + + + + = = + t D t t t t t E t D t t j j t N v E N N v x π λ β λ L (2.9) . 0 )] 1 ( [ 1 1 1 , 0 1 = + - = ∂ ∂ + + = = + t t t t j j t r E B βλ λ L (2.10)
Using equation (2.1) for the number of home producing firms, from first-order conditions we get the Euler equations for shares and for bonds 10 :

( ) , ) 1 ( ~1 1 1         +         - = + + - + t t t t t t v C C E v π δ β γ (2.11) ( ). ) 1 ( 1 1 γ γ β - + + - + = t t t t C E r C (2.
12)

The bond Euler equation (2.12) demonstrates smoothing between two periods.

According to the Euler equation for shares (2.11), the average value of the firm depends on how consumption will change over time [START_REF] Blanchard | Monopolistic Competition and the Effects of Aggregate Demand[END_REF] . Thus, evolution of the aggregate consumption affects the stock price. The higher is the current consumption, the higher will be the value of the firm. Let us notice, that in the Euler equation for shares (2.11) we use average terms for the firm value and total profit. Because of the structure of the model presented in the first part, we account for the fact that there are four sectors in the economy. In each of them the value of the firm and the profit from given type of activity are averages over all the firms in the given sector. The value of the firm and the total profit of the firm in the economy is then the average over all sectors.

Intratemporal problem

The intratemporal problem of consumers concerns the choice taken within one period of allocating total consumption between a total number of intermediate goods [START_REF] Blinder | Asking About Prices: A New Approach to Understanding Price Stickiness[END_REF] . The consumption is aggregated over a continuum of goods from a set Ω with the measure representing the mass of available goods. Giving the composite bundle of differentiated goods produced by monopolistically competitive intermediate producers, it takes the form: [START_REF] Blanchard | The Solution of Linear Difference Models under Rational Expectations[END_REF] Derivation of these Euler equations are given in Appendix A.2.1.

11 This equation is a special case of the asset pricing formula by Lucas [1978], where the utility function is CRRA. It accounts for an additional component δ that captures the probability of firms' death.

, ) ( Solving the maximization problem of the final producer we get a demand function for a single variety:

1 1 - Ω ∈ -         = ∫ σ σ ω σ σ ω ω d c C t t (2.
, ) ( ) ( t t t t C P p c σ ω ω -       = (2.14)
and a standard CES price aggregator:

( ) , ) ( 1 1 1 σ ω σ ω ω - Ω ∈ - ∫ = d p P t t (2.
[ ] , / ) ( ) ( , , t t t D t D C P p c σ ω ω - = [ ] , / ) ( ) ( * , , t t t X t X C P p c σ ω ω - = (2.19) [ ] , / ) ( ) ( * , , t t t I t I C P p c σ ω ω - = [ ] . / ) ( ) ( , , t t t M t M C P p c σ ω ω - = (2.20)
Each expression in (2. 19) and (2.20) articulates an inverse relation between the price of a single variety and the demand for it. When this price goes up, everything else constant, then the demand decreases. The expression on the left side of (2.19) is the demand for the single variety produced by one of the home firms including the exporting ones, as well as the domestic multinationals. The right side formulation expresses the demand for the single good produced by one of the foreign exporting firms. The demand for the variety of the foreign multinational is expressed on the left of (2.20) and for the good produced by the domestic affiliate on the right. We should recall here that all domestic firms in the economy offer their goods to the home consumers, but some of them decide also to engage in other activities and thus offer their goods also to foreigners in form of the export or sales by multinationals. This involves setting various prices connected with the given activity.

Firms

There is a continuum of firms in the economy which use labour to produce goods, that are demanded for domestic use and by foreigners. They also set prices that are assumed to be fully flexible. The only factor of production is labour characterized by aggregate productivity .

t Z Thus, all firms in the given economy, both the domestic and the foreign ones produce, with the same aggregate productivity of labour. But firms vary in terms of technology they use. Each firm produces according to its own technology with productivity indexed by . z In that sense the entrepreneurs are heterogeneous. The relative productivity is specific for the given producer and time invariant. It implies that cost ), /( z Z w t t of producing one unit of output, also differs across firms.

There are also fixed per-period costs of engaging in a given type of activity: export and the foreign direct investment, either to sell abroad or to export back to the domestic economy. Whether the firm will decide to export or set its affiliate abroad, depends on relation between its level of relative productivity and costs of production in the given strategy. The decision is taken each period. Thus, the numbers of firms in sectors, using different strategies of producing and selling, fluctuate between periods.

The total number of the domestic producing firms consist of numbers of producers from various sectors:

. , , , , , t M t I t X t DO t D N N N N N + + + = (2.21)
The number of firms in a given sector is affected by numbers of producers using different strategies depending on costs of production. Within the given period each firm decides which strategy to choose knowing its level of idiosyncratic productivity . z When it is not high enough, the firm engages in the activity that requires lower productivity. Hence, the number of domestic firms fluctuates between sectors.

When a producer wants to enter the domestic market first, it has to invest and pay some cost of hiring units of output and engaging in the specific economic activity like export or the foreign direct investment. The first cost is variable and depends on how much the given firm wants to produce. The second one is fixed and each period the same for all firms using the same strategy. The producer pays it in the form of wages for t f additional effective labour units. In general, without specifying the sector a firm operates in, the cost function can be expressed as follows:

cost, variable cost fixed ) ( ) ( ) ( + = + = + = Γ ω ω ω t t t t t t t t t t t t y z Z W Z f W l W Z f W (2.
, ) 1 ( , 1 t Z t Z Z t Z Z Z ε ρ ρ + + - = - ), , 0 ( ~2 , Z t Z N σ ε i.i.d. ,t Z ε (2.24)
On the contrary, idiosyncratic productivity ) (ω z is firm specific and time invariant. A firm with idiosyncratic productivity ) (ω z produces t Z z ) (ω units of output per unit of labour [START_REF] Borensztein | How Does Foreign Direct Investment Affect Growth[END_REF] We assume that foreign firms draw their productivity levels z from a common distribution

. ) ( ) ( ) ( , , t t D t D Z z l y ω ω ω = (2.25)
Production localized abroad to sell on the foreign market involves using the foreign labour with the foreign aggregate productivity ,

* t Z according to: . ) ( ) ( ) ( * * , , t t I t I Z z l y ω ω ω = (2.26)
Export to the foreign country or back to the country of the origin, in case of exporting multinationalsm involves an iceberg trade cost. To sell ) (ω t y of output on the export market, an exporter has to produce a quantity ), (ω

τ t t y
because consumer must buy 1 > t τ units of imported good to consume its one unit. Thus, production to sell on the export foreign and domestic market is given respectively by: ,

) ( ) ( ) ( ) ( ) ( ) ( , 1 , , , t t X t t X t t X t t X Z z l y Z z y l ω ω τ ω ω ω τ ω - = ⇒ = (2.27) . ) ( ) ( ) ( * * , 1 * , t t M t t M Z z l y ω ω τ ω - = (2.28)
The iceberg cost evolves exogenously according to autoregressive stochastic processes:

, ) 1 ( , 1 t t t τ τ τ ε τ ρ ρ τ + + - = - ), , 0 ( ~2 , τ τ σ ε N t i.i.d. ,t τ ε (2.29)

Dynamics of firm entry and exit

Each period there is an unbounded amount of potential entrants in the domestic economy, as well in the foreign one. To enter the market in the economy they come from, the new entrants have to invest and pay some cost. Only then they can start production. We assume that each of Hence, the number of domestic producers evolves accounting for this shock and new entrants starting production:

). )( 1 ( 1 , 1 , , - -+ - = t E t D t D N N N δ (2.30)
Entrepreneurs are forward looking and have perfect information, thus the profit expected by them equals realized average profit:

[ ] . ), ( ) ( ~t s E s s t > = ω π ω π (2.31)
From Euler equation for shares:

. )] 1 ( [ ) 1 ( ) 1 ( ~1 1 1 1 1 ∑ ∞ + = - - + - + + - +                 - = =                 - +                 - = t s s t s t t s t t t t t t t t t C C E C C E v C C E v π δ β π δ β δ β γ γ γ (2.32)
Hence, potential entrants compute their expected post-entry value [START_REF] Bourrinet | Les paradoxes de la zone euro[END_REF] with the present discounted value of the expected stream of future profits

∞ + = 1 } { t s s π
. They discount future profits using the household's stochastic discount factor, adjusted for the probability of firm survival δ -1 .

Before entering production of a specific variety, each entrepreneur faces a sunk entry cost of hiring t E f , effective labour units. Entry occurs until the average firm value is equalized with the entry cost:

, / ~, t t E t t Z f w v = (2.33)
where t E f , is exogenous and follows an autoregressive process:

, ) 1 ( , 1 , , t f t E f f t E E E E f f ε ρ ρ + + - = - ), , 0 ( ~2 , E E f t f N σ ε i.i.d. ,t f E ε (2.34)
The free entry condition (2.33) holds, if we assume that macroeconomic shocks are small enough to hold the mass t E N , of entrants positive in every period.

Sectorial distribution

In every period each firm gains profit, which depends on the price determined by the firm.

The profit function of domestic firms from serving home market is given as:

). ( ) ( ) ( ) ( ) ( , , , , ω ω ω ω ω t D t t t D t D t D y z Z W y p - = Π (2.35)
If the firm has sufficiently high idiosyncratic productivity it can start exporting. This however involves the iceberg trade cost and fixed cost of exporting (hiring t X f , workers), resulting in the profit from export of the form:

, ) ( ) ( )] ( ) ( [ ) ( , , , , , t X t t t X t t t t X t X t t X f Z W y z Z W y p e - - = Π ω ω τ ω ω ω
(2.36) [START_REF] Bourrinet | Les paradoxes de la zone euro[END_REF] Computational details on this are presented in Appendix A. 2.4. where t e stands for a nominal exchange rate equal to units of home currency necessary to buy one unit of foreign currency 15 .

Each exporter hires t X f , workers per period to cover the export cost. This fixed exporting cost evolves exogenously according to autoregressive stochastic processes:

, ) 1 ( 1 , , t f t X f fx f t X X X X f u f ε ρ θ ρ + + - = - i.i.d. ,t f X ε (2.37)
Firms with higher productivity levels can engage in the foreign direct investment which involves fixed cost of firing t I f , labour units in every period. Thus, profit from such an activity is the following:

, ) ( ) ( ) ( ) ( ) ( , * * , * * , , ,       - - = Π t I t t t I t t t I t I t t I f Z W y z Z W y p e ω ω ω ω ω (2.38)
where:

, ) 1 ( , 1 , , t f t I f f f t I I I I I f u f ε ρ θ ρ + + - = - i.i.d. ,t f I ε (2.39)
Depending on their level of heterogeneous productivity some firms, which have affiliates abroad, can decide to produce there, but to sell on the home market, where their mother companies come from. Therefore, they have to face costs of three types: the iceberg trade cost, fixed cost of engaging in the foreign direct investment and fixed cost of exporting [START_REF] Bullard | Learning about monetary policy rules[END_REF] from abroad to the home economy:

), ( ) ( ) ( ) ( ) ( ) ( , , * * , * * , , , t XM t I t t t t M t t t t t M t M t M f f Z W e y z Z W e y p + - - = Π ω ω τ ω ω ω (2.40) , ) 1 ( , 1 , , t f t XM f f f t XM XM XM XM XM f u f ε ρ θ ρ + + - = - i.i.d. ,t f XM ε (2.41)
Optimal nominal prices for each strategy, denominated in the currency of the destination market, result from maximization [START_REF] Calvo | Staggered Prices in a Utility-Maximizing Framework[END_REF]

( ) . / ) ( ) ( t t t t C P p y σ ω ω - =
The optimal nominal price for a good produced at home and sold on the domestic market is: 15 In a monetary union the nominal exchange rate is equal to one. For the general presentation of the two economies we do not omit this term, but for the sake of studying the case of the monetary union and real adjustment only we set . 1 = t e [START_REF] Bullard | Learning about monetary policy rules[END_REF] In the steady state these fixed costs are equal to f u times , E f ⋅ θ which is the annualized fixed cost of entering production of a new variety, where

)).

1 ( /( )) 1 ( 1 ( δ β δ β θ - - - = , ) ( ) ( , ω µ ω z Z W p t t t D = (2.42) where ) 1 /( - = σ σ µ
denotes a constant markup over the marginal cost.

A marginal cost of the exporter is increased by the iceberg trade cost. Its optimal price incorporates also the exchange rate: we can set optimal prices relative to the price index of the destination market:

. ) ( ) ( , ω µ τ ω z Z W e p t t
, ) ( ) ( ) ( , , t t t t D t D w Z z P p ω µ ω ω ρ = = , ) ( ) ( ) ( * , , t t t t t t X t X w Z z Q P p ω µ τ ω ω ρ = = (2.46) , ) ( ) ( ) ( * * * , , t t t t I t I w Z z P p ω µ ω ω ρ = = , ) ( ) ( ) ( * * * * , , t t t t t t M t M w Z z Q P p ω µ τ ω ω ρ = = (2.47)
as well as optimal profits [START_REF] Casares | Firm Entry under Financial Frictions[END_REF] relative to the price index of the market of the mother company location: [START_REF] Casares | Firm Entry under Financial Frictions[END_REF] Derivation of optimal profits is presented in Appendix A.2.6.

, ) ( 1 ) ( ) ( 1 , , , t t D t t D t D C P ω ρ σ ω ω π σ - = Π = (2.48) , ) ( ) ( ) ( , * 1 , * , , , t t X t t t X t t t t t X t t X t X Z f w C Q Q P e P - = ⋅ Π = Π = -ω ρ σ ω ω π σ (2.49) , ) ( 1 ) ( ) ( * , * * 1 , * , , ,         - = Π = Π = - t t I t t t I t t t t I t t t I t I Z f w C Q P e Q P ω ρ σ ω ω π σ (2.50) ). ( ) ( 1 ) ( ) ( , , * * 1 , , , t XM t I t t t t t M t t M t M f f Z w Q C P + - = Π = - ω ρ σ ω ω π σ (2.51)

Productivity distribution

Upon entry, home firms draw their productivity level z from a common Pareto distribution ) , ( min k z Par with support on ) , [ min ∞ z . [START_REF] Eichenbaum | Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy[END_REF] Foreign firms draw their productivity level from an analogous distribution, but possibly with different parameters * min z and * . k [START_REF] Contessi | How Does Multinational Production Change International Comovement?[END_REF] The relative productivity level remains fixed thereafter.

All firms produce in every period, until they are hit by a "death" shock, which occurs with probability δ in every period. This exit-inducing shock is independent of the firm's productivity level, thus ) , ( min k z Par also represents the productivity distribution of all producing firms. When the productivity of firms has the Pareto distribution, then also their size has such a distribution but with different parameters [START_REF] Cooley | Inflation Tax in a Real Business Cycle Model[END_REF] .

The probability density function (PDF) ) (z g and the cumulative distribution function The higher , k the more of big values ) (z g is cumulated by low z. That means there is higher probability that the firm has lower productivity, because the probability of extreme cases decreases, thus the level of dispersion decreases too:

(CDF) ) (z G of the Pareto distribution ) , ( min k z Par are the following:      < ≥ = + , , 0 , , ) ( min min 1 min z z z z z z k z g k k (2.52)      < ≥       - = = ∫ , , 0 , , 1 ) ( )
. ) 2 ( ) 1 ( ) ( , 1 ) ( ) , ( ~2 min 2 min min z k k k X Var z k k X E k z Par X - - = - = ⇒ (2.54)
. )) , (( )) , (( )] ( 1 [ ) ( min ↓ +∞ ∧ ↑ ⇔ ↓ - ∧ ↑ ⇒ ↑ z P z z P z G z G k (2.55)
According to the name of this distribution, such dependence is analogous to the Pareto rule. In case of the firm productivity level, it means that higher idiosyncratic productivity of firms is contributed to a small percentage of firms in the economy.

Cutoff points

Each firm ω in the economy, depending on its heterogeneous productivity level

), (ω z can decide which strategy it wants to follow. Excluding domestic production and sales, which is obvious for every firm starting its business, the choice is among three kinds of activities:

export, producing abroad and selling on the foreign market of the host economy, and producing abroad and selling on the home market of the mother company location. Let us notice that these decisions are taken in every period, as fixed costs , ,t X f t I f , and t XM f , are per-period costs. A firm's choice, in which strategy to engage, is conditional on whether the firm has the required relative productivity. Each period there are time variant productivity cutoffs, which determine firm possibilities of choosing production and selling strategy. For firms with high productivity an important decision is to choose the location market and the selling market.

From equalizing profits ) (ω π t to zero and from definitions of optimal relative prices ), (ω ρ t we get levels of idiosyncratic productivity necessary to start production in a given sector of production [START_REF] Corsetti | Varieties and the Transfer Problem: the Extensive Margin of Current Account Adjustment[END_REF] . We have three cutoff points: for marginal exporter, marginal multinational firm and marginal multinational exporter:

, 1 1 * , , t t t t t t X t X Z Q w C f z τ µ σ µ σ                 = - (2.56) , * * 1 1 * , , µ σ µ σ                 = - t t t t I t I Z w C f z (2.57) . ) ( * * * 1 1 , , , t t t t t XM t I t t M Z w Q f f C z τ µ σ µ σ                 + = - (2.58)
Every period these time variant productivity cutoffs determine how large, relatively to the whole economy, is the number of domestic sellers, exporters and firms with affiliates abroad. Thus, cutoff points determine also average values like the average productivity of firms following a given strategy, the average price for their variety, as well as the average profit from producing and selling this variety.

Entry mode

With relative productivity level , 0 = z a firm would make negative profit. There would be no production, hence no income from selling the product, nor per-period cost of hiring workers. But before entering production, the firm would have to bear the fixed cost of entry.

It would invest an amount of

t t E t t Z f w v / ~, =
in the project of establishing a firm that is assumed to last infinite number of periods, hence:

, ) 1 ( 1 ) 1 ( )] 1 ( [ 1 A A t t δ β δ β δ β - - - = - ∑ ∞ = (2.59)
where A denotes an annuity equivalent to the original time-0 entry cost .

~1A v t - = θ
Thus, the firm with heterogeneous productivity level 0 = z would face the annualized fixed cost of entry and would not enter the market:

. ) 1 (

) 1 ( 1 ) 0 ( , , t t E t t t D Z f w v A θ δ β δ β π - = - - - - = - = (2.
z min z ) 0 ( ,t D π ) 0 ( ,t X π ) 0 ( ,t I π ) 0 ( ,t M π ) ( , z t M π ) ( , z t D π t X z , t I z , t M z , ) (z t π ) ( , z t X π ) ( , z t I π z min z t X z , t I z , t M z , D only X D + I D + M D + entry no With the idiosyncratic productivity , ,t X z z = which is the cutoff point for exporting, 0 ) ( , , = t X t X z π
and a firm can consider exporting its product to the foreign market. From period to period its relative productivity z remains the same, but is a profitable business entity regardless its location, production or selling strategy. Moreover, it can derive positive profits from any of the three strategies of producing and selling, hence it decides to choose the most profitable one.

Aggregation and international variables

There are various levels of aggregation, but the key here is sectorial aggregation. We obtain the variables which are averages for the sectors of economy. The existence of such sectors is essential for the analysis we will perform below. First of all, the fact, that in the economy there are different types of firms in terms of their productivity, lets us regard the possibility of various responds of firms to the shock in the economy.

The subsequent step in the aggregation is getting national variables. Most of them are averages of variable values for all sectors weighted with shares of these sectors in the economy. Hence, the method of obtaining such macro variables results from the assumption of heterogeneity in productivity. To get the remaining national variables, we take into account, that we assume the financial autarky and the CES bundler of differentiated goods, thus the CES price aggregator.

The main international variables, that means the welfare-and CPI-based real exchange rate, are ratios of welfare-based or consumer price indices corrected by the nominal exchange rate. The other international variables are used to compare the terms of hiring labour, engaging in the given form of economic activity or buying between two economies. Thus, they express bilateral conditions for these economies.

Sectorial aggregation

Each firm in the given strategy produces with its own level of the relative productivity. Thus, firms are heterogeneous also within the given sector. In the same sector they can have also different profits and set different optimal prices. Instead of regarding all firms in the given strategy, we can average information about them in form of average values. Thus, we regard a representative of each sector. Then, we have to account for the fact that there are time variant specific numbers of firms in sectors.

We derive all average quantities using definitions of productivity cutoff points and Pareto distribution. In fact we compute several expected values of random variables which by themselves are functions of the random variable . z This involves integrating of functions times probability density function of Pareto distribution over the domain ).

; [ min +∞ z

The total mass of firms in the whole economy is given by .

,t D N Among them we can distinguish these t DO N , which serve only home market, then also exporting firms , ,t X N companies t I N , that have their affiliates producing and selling abroad, and finally firms t M N , which establish their multinational subsidiaries abroad to produce there but to export back on the home market. Each of these numbers is computed as a share in the total mass t D N , of firms in the economy by using the appropriate domain of integrating from the Pareto distribution support [START_REF] Dixit | Monopolistic Competition and Optimum Product Diversity[END_REF]

: , 1 ) ( , min , , min k t X z z t D t DO z z dz z g N N X         - = = ∫ (2.61) , ) ( , min , min , , ∫         -         = = I X z z k t I k t X t D t X z z z z dz z g N N (2.62) , ) ( , min , min , , ∫         -         = = M I z z k t M k t I t D t I z z z z dz z g N N (2.63) . ) ( , min , , k t M z t D t M z z dz z g N N M         = = ∫ ∞ (2.64)
The number of all producing firms in the home economy is then a sum of numbers of domestic firms from various sectors regardless of their location market. Given expressions above, we have that:

. ) ( ) ( ) ( ) ( , , , , , , min t D z z z z z z z t M t I t X t DO t D N dz z g dz z g dz z g dz z g N N N N N M M I I X X ⋅       + + + = = + + + = ∫ ∫ ∫ ∫ ∞ (2.65)
As we can notice from equation (2.65) the number of all firms is distributed between various sectors. This distribution is time variant and depends on cutoff points of the heterogeneous productivity and the form of the probability density function. These dependences are illustrated by figures 2.4 and 2.5. Having numbers of firms in sectors, we can proceed with computing average values for each sector. First of them is the average productivity of a firm engaged in the given economic activity [START_REF]Convergence Report[END_REF] . It is based on weights proportional to relative firm output shares and summarize all the information about the productivity distributions relevant for all macroeconomic variables 26 . All these other variables, which are expressed as average values for various sectors, can be computed by using average productivities. The average productivity of all domestic firms is given by:

, ) 1 ( ) ( ~min 1 1 min 1 1 1 1 1 , , , min z z k k z dG z N N z z t D t D t D - - - ∞ - ∇ = ⋅       - - =       = ∫ σ σ σ σ σ (2.66) where )). 1 ( /( - - = ∇ σ k k
Let us notice that this average value is in fact time invariant and depends only on parameters of the Pareto distribution and on the elasticity of substitution between goods [START_REF] Flanders | Differentiation under the Integral Sign[END_REF] . The average productivities of firms in various sectors are the following:

, ) ( ~, , , 1 , , 1 , 1 1 1 1 1 , , ,       - - ∇ =       = - - - - - ∫ k t X k t I k t X t I k t I t X z z t X t D t X z z z z z z z dG z N N z I X σ σ σ σ σ (2.67) , ) ( ~, , , 1 , , 1 , 1 1 1 1 1 , , ,       - - ∇ =       = - - - - - ∫ k t I k t M k t I t M k t M t I z z t I t D t I z z z z z z z dG z N N z M I σ σ σ σ σ (2.68) , ) ( ~, 1 1 1 1 1 , , , t M z t M t D t M z z dG z N N z M - - ∞ - ∇ =         = ∫ σ σ σ (2.69)
The model is isomorphic to one where engage in FDI and export from abroad back home.

Another information about the representative firm from the sector is its profit.

Depending on the strategy, firms set different prices of their varieties and gain profits from different business activities. To get average values of profits obtained from various economic activities, we can integrate using Pareto distribution or apply definitions of cutoff points and average productivities to the expression for profit ). ( ~t t t z π π = [START_REF] Galí | Monetary Policy, Inflation, and the Business Cycle. An introduction to the New Keynesian Framework[END_REF] The variable t D, π represents the average firm profit earned from domestic sales common for all home producers:

26 Shown in Melitz [2003]. [START_REF] Flanders | Differentiation under the Integral Sign[END_REF] The powers with the elasticity of substitution result from the fact that t z ~ is in fact the weighted harmonic mean of the levels of , z where the weights index the firms' relative output shares. See Appendix A.2.10 for the proof.

.

) ( ) ( ~1 1 , , , , , min σ σ µ σ π π - - ∞         = = ∫ t t t t D z t D t D t D t D Z w C z z dG z N N (2.70)
The variable t X , π represents the average firm profit from exporting common for all exporters in the economy:

, 1 ) ( ) ( ~, 1 , , , , t t X t k t k t k t t k t z z t X t X t D t X Z f w TOL TOL z dG z N N I X ⋅       - - Λ Λ - Λ ∇ = = - - - ∫ µ µ σ σ π π (2.71) where: , 1 1 1 , , - -         = Λ t t X t I t f f τ σ . * * * * t t t t t t t t t t t w Z Z w Q W Z Z W e TOL = =
(2.72)

Variables t I , π and t M , π
represent, respectively, the average firm profit from FDI and FDI together with export to the home country market:

, 1 1 ) ( ) ( ~* , * 1 , , , , t t I t t k t t k t z z t I t I t D t I Z f w Q z dG z N N M I ⋅       - - - ∇ = = - ∫ κ κ κ π π σ (2.73) ), ( ) 1 ( ) ( ) ( ~, , * * , , , , t XM t I t t t z t M t M t D t M f f Z w Q z dG z N N M + - ∇ = = ∫ ∞ π π (2.
Q C C f f f τ κ µ σ -         ⋅ + = (2.75)
The average profit of a firm is derived as a combination of average profits from all four production sectors:

, ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ~, , , , min ∫ ∫ ∫ ∫ ∞ ∞ + + + = M M I I X z t M z z t I z z z t X t D t z dG z z dG z z dG z z dG z π π π π π (2.76) . ~, , , , , , , , , , t M t D t M t I t D t I t X t D t X t D t N N N N N N π π π π π + + + = (2.77)
The variable t π ~ represents the average total profits of a firm, since profits from each source are weighted with appropriate proportion of the number of firms from the given production sector to number of all producers.

In various strategies firms set various prices for their products depending on the relative productivity.

: , ) 1 ( ~, , t t D t D w l π σ - = , ) 1 ( ~, , ,       + - = t t X t t X t X Z f w l π σ (2.80) , ) 1 ( ~*, * , ,         + - = t t I t t I t t I Z f w Q l π σ . ) 1 ( ~* , * , * , ,         + + - = t t XM t I t t M t t M Z f f w Q l π σ (2.

Macro aggregation: National variables

All the sectorial variables are necessary to form macro variables by different ways of aggregating: simple summing, averaging across production sectors or averaging with shares of these sectors as weights.

Each national variable expresses the value characterizing the whole economy. Starting with numbers of firms, we can remind, that the total mass of firms in the given economy is a sum of numbers of firms from all production sectors: .

, , , , , t M t I t X t DO t D N N N N N + + + = (2.82)
Recalling equation (2.77), we can notice that the average profit of a firm in the economy is a combination of average profits from production sectors:

. ~, , , , , , , , , , t M t D t M t I t D t I t X t D t X t D t N N N N N N π π π π π + + + = (2.83)
Aggregate consumption and investment is equal to aggregate output in the economy.

On the other hand the gross domestic product consists of profits from supplying goods and services. This is also evident from aggregating the budget constraint across symmetric home households. Using the fact that in the equilibrium under financial autarky 0

1 = = + t t B B
and

, 1 1 = = + t t x x
we get:

. ,

, t t D t t t t E t N L w Y v N C π + = = + (2.84)
Labour demand comes from firms that have to cover per-period fixed and variable production costs and sunk cost of entry. Total amount of production labour hired in the given economy is:

t M t M t I t I t X t X t D t D l N l N l N l N , * , , * , , , , , + + + . (2.85)
But firms use labour also as investment to establish a firm, to cover export cost or to carry their production located abroad in the FDI framework. These investment costs are determined in terms of the number of additional workers necessary for the firm to engage in a given activity:

.

      + + + + + + + + + - = t XM t I t M t I t I t X t X t E t E t t M t M t t I t I t t X t X t D t D t D t f f N f N f N f N Z N Q N Q N N w L σ σ π π π π σ (2.87)
Let us remind, that we have considered average sectorial productivities, which have the special significance in our model as averages of idiosyncratic productivity of firms draw from the Pareto distribution. Here the heterogeneity assumption plays the main role. We also [START_REF] Ghironi | International Trade and Macroeconomic Dynamics with Heterogeneous Firms[END_REF]

t M t I t X t D t M t M t I t I t X t X D t D t t N N N N z N z N z N z N Z Z + + + + + + =
(2.88)

Macro aggregation: International variables

There are some variables which express bilateral trade and labour hiring conditions between both economies. The most straightforward is the real exchange rate (RER). It exploits the definition of the price index. The official statistics use the consumer price index (CPI).

However, they typically do not account for changes in the number of varieties available to consumers [START_REF] Golub | Matrix Computations. Third Edition[END_REF] . Let us notice, that in our model this issue is very important as varieties come from firms of the domestic and the foreign origin. We can define the real exchange rate on the CPI basis, taking this fact away. But we can also derive the other definition, which accounts for the number of goods, called the welfare-based RER [START_REF] Grabek | SOEPL 2009 -An Estimated Dynamic Stochastic General Equilibrium Model for Policy Analysis And Forecasting[END_REF] . These two rates can demonstrate different behaviour, especially in response to exogenous shocks [START_REF] Grabek | SOE-PL -Model DSGE małej otwartej gospodarki estymowany na danych polskich. Metodologia, specyfikacja, wyniki estymacji i pierwsze zastosowania[END_REF] . Thus, we examine two of them and compare their reactions.

We can define the welfare-based price indices, using the definition of the standard CES price aggregator

( ) ) 1 /( 1 1 ) ( σ ω σ ω ω - Ω ∈ - ∫ = d p P t t
and average optimal prices :

) ( ~t t t z p p = [ ] , ~11 1 , , 1 * , * , 1 * , * , 1 , ,
σ σ σ σ σ - - - - - + + + = t M t M t I t I t X t X t D t D t p N p N p N p N P (2.89) [ ] . ~11 1 * , * , 1 , , 1 , , 1 * , *
, * σ σ σ σ σ - - - - - + + + = t M t M t I t I t X t X t D t D t p N p N p N p N P (2.90)
Equations (2.89) and (2.90) are expressed in nominal prices. To get the real terms, we can use the average optimal relative prices: and can be treated as a theoretical counterpart to the empirical real exchange rate.

, 1 1 , , 1 * , * , 1 * , * , 1 , , σ σ σ σ ρ ρ ρ ρ - - - - + + + = t M t M t I t I t X t X t D t D N N N N (2.91) . 1 1 * , * , 1 , , 1 , , 1 * , * , σ σ σ σ ρ ρ ρ ρ - - - - + + + = t M t M t I t I t X t X t D t D N N N N (2.
σ σ σ σ σ σ σ τ τ τ - - - - - - - -         +         +         +         +         +         +         = t M t D t t M t I t D t I t X t D t t t X t D t M t D t t M t I t D t t I t X t D t t X t D t D t t D t z z TOL N z z N z z TOL N N z z N z z TOL N z z N z z TOL N Q (2. 1 * , , * , 1 * , , * * , , 1 , , * , 1 , , , 1 , , , 1 * , , * , 1 σ
, ~11 * 1 1 1 1 * * * σ σ σ - - -         = = = t t t
As a function of terms of labour and ratios of average productivities it is given as follows:

. ~~~*

, , * , 1 t t t M t D t t M t I t D t I t X t D t t t X t D t M t D t t M t I t D t t I t X t D t t X t D t D t t D t N N z z TOL N z z N z z TOL N N z z N z z TOL N z z N z z TOL N q ⋅         +         +         +         +         +         +         = - - - - - - - - σ σ σ σ σ σ σ σ τ τ τ 1 , , , 1 * , , * , 1 * , , * * , , 1 , , * , 1 , , , 1 , , , 1 *
(2.96) [START_REF] Green | Aggregation in Economic Analysis[END_REF] Details in Appendix A.2.14.

The CPI-based real exchange rate 1 < t q implies that average prices, expressed in the same currency, are higher on the home than on the foreign market. Still it is possible

that , 1 > t Q
which implies that the consumer derives higher utility from spending the same amount on the home market with higher prices. This happens when t N is sufficiently higher than , * t N that means when product diversity is bigger on the home market.

Here we would like to introduce some macroeconomic variables which are also interesting from the point of view of the economies' comparison, but that have not been considered yet in the model construction [START_REF] Hairault | Money, New-Keynesian macroeconomics and the business cycle[END_REF]

, t M t M t t X t X t M t M t X t X t t M t X t M t X t N Q N N N Q N N N N TOT ρ ρ ρ ρ + + ⋅ + + = , , , , * , *
(2.98)

The higher terms of trade, the bigger are prices of exports relatively to prices of imports.

General equilibrium and model summary

We present and summarize here all nonlinear equilibrium conditions for both economies,

as they are open and interact with each other by international trade in goods. We assume that there is no international trade in bonds. Thus, we regard the case of financial autarky. [START_REF] Hairault | Money, New-Keynesian macroeconomics and the business cycle[END_REF] All these variables have their counterparts for the foreign economy.

General equilibrium

We derive the general equilibrium equations, using the aggregate accounting and the labour market clearing condition. To close the model, we use the balanced current account condition.

The obtained general equilibrium has macroeconomic character.

Since the labour supply is rigid, labour market clearing guarantees the following:

, D t S t L L L = = (2.99)
where D t L is given by (2.87). From (2.99) we can derive the labour market clearing wage .

t w

To close the model, we apply the balanced current account condition resulting from our assumption of financial autarky [START_REF] Hamilton | Time Series Analysis[END_REF] . In this model we consider firms engaged in the foreign direct investment. Hence, the condition takes into account repatriated profits [START_REF] Heer | Dynamic General Equilibrium Modelling[END_REF] . The value of home exports and profits from home affiliates located abroad must be equal to the value of foreign exports plus profits from foreign multinationals:

. ~* , * ,

* , * 1 , , * t M t M t t I t I t t M t M t t X t X t t M t M t I t I t M t M t t t X t X t t N Q N Q N C N C N N N C Q N C Q π π ρ ρ π π ρ ρ σ σ σ σ + + + = = + + + - - - - (2.100) * , * , 1 , , 1 * , * , , , , , 1 * ,
We define equilibrium as a sequence of quantities:

{ } { } , , , , , , , , , , , , , , , , , , , , 0 *
* * , , * , , * , , * , , * , , * , , * * 0 ∞
= ∞ = Λ Λ = t t t t t t M t M t M t M t I t I t X t X t D t D t E t E t t t t t t z z N N N N N N N N N N C C Y Y κ κ Q (2.101)
and a sequence of real prices:

{ } { } , , , , , , , , , , ~, , , , , , , , , , , , , , , , 0 *
{ } { } ∞ = ∞ = = 0 * * , , * , , * , , * , , * 0 , , , , , , , , , , , t t t t XM t XM t I t I t X t X t E t E t t t t f f f f f f f f Z Z τ τ S , the sequence { } ∞ =0 t t
Q respects first order conditions for domestic and foreign households and maximizes domestic and foreign firm profits.

(ii) For a given sequence of quantities { } ∞ =0 t t Q and the realization of shocks { } ∞ =0 t t

S

, the sequence { } ∞ =0 t t P guarantees: [START_REF] Hamilton | Time Series Analysis[END_REF] The proof that the balanced current account allows to close the model is presented in Appendix A.2.15. [START_REF] Heer | Dynamic General Equilibrium Modelling[END_REF] This is what differentiates the balanced current account from the balanced trade. The latter is common in the standard models where one does not account for the foreign direct investment.

• labour market clearing, that means the equalization of labour supply and labour demand,

• goods market equilibrium, that means the equalization of aggregate output with aggregate consumption and investment.

Model summary

The equations in Table 2.2. constitute a system of fourteen main equilibrium conditions of the model in fourteen endogenous variables: , , ,

t X t M t I t X t D t E t t z z N N N N N w π t t t t M C v r z , , , ~, , , , , , , , , , , , , , t I
and t Q . Equations for the foreign economy are analogous [START_REF] Helpman | Export versus FDI[END_REF] .

Table 2.2. Symmetric model summary, home economy perspective

Price index [START_REF] Helpman | Export versus FDI[END_REF] The table presents only equations from the home economy perspective. Analogous equations for the foreign economy, needed to constitute the whole model summary, are very similar to those of the home economy. Thus, we present them in Appendix A.2.16. The whole model summary, including the equilibrium conditions both from the home and the foreign economy perspective, consists of twenty-nine equations.

σ σ σ σ ρ ρ ρ ρ - - - - + + + = 1 , , 1 * , * , 1 * , * , 1 , , 1 t M t M t I t I t X t X t D t D N N N N Total average profit t M t D t M t I t D t I t X t D t X t D t N N N N N N , , , , , , , , , , π π π π π
+ + + = Free entry t t E t t Z f w v , ~= Sectorial profits t t X t k t k t k t t k t t X Z f w TOL TOL , 1 , 1 ~⋅       - - Λ Λ - Λ ∇ = - - - µ µ σ σ π * , * 1 , 1 1 ~t t I t t k t t k t t I Z f w Q ⋅       - - - ∇ = - κ κ κ π σ ) ( ) 1 ( ~, , * * , t XM t I t t t t M f f Z w Q + - ∇ = π Sectorial shares of firms ( ) 1 , , , , - Λ = k t k t k t t D t M t D t X TOL N N N N µ κ ( ) 1 , , , , - = k t t D t M t D t I N N N N κ
        = σ k k t M t D t M z z N N Number of firms ) )( 1 ( 1 , 1 , , - -+ - = t E t D t D N N N δ Euler equation for bonds ( ) γ γ β - + + - + = 1 1 ) 1 ( t t t t C E r C
Euler equations for shares ( )

        +         - = + + - + 1 1 1 ) 1 ( ~t t t t t t v C C E v π δ β γ Aggregate accounting t t E t t D t t v N N L w C , , - + = π Balanced current account * , * , * , * , 1 , , 1 * , * , , , , , 1 * ,
* , * 1 , , * ~t M t M t t I t I t t M t M t t X t X t t M t M t I t I t M t M t t t X t X t t N Q N Q N C N C N N N C Q N C Q π π ρ ρ π π ρ ρ σ σ σ σ + + + = = + + + - - - -

Source: Author's calculations

There are fourteen endogenous variables from which three are non-predetermined: π The model features also exogenous variables:

t XM t I t X t E t f f f f Z , , , , , , , , and . t τ
All remaining variables in the system are auxiliary variables, like t Λ or , t κ or they can be expressed by means of average productivity levels.

Steady state analysis

After presenting the model in its theoretical form, that means as a nonlinear system of expectational difference equations, we do want to proceed with the form which can be used in empirical analysis to be able to formulate some conclusions about the economy features resulting from the model assumptions. The structural form describes consequences of deviating variables from their steady state and is obtained by a linear approximation of the DSGE model [START_REF] Helpman | Trade, FDI, and the organization of firms[END_REF] . The approximation can be accomplished by various techniques: loglinearization, linearization of second or higher order, all via Taylor expansion around a particular steady state point. Log-linearization can be quite easily done and presented by hand. Moreover, it allows for economic interpretation of such transformed equations of the model. Regardless of the technique used in the computer calculations, we have to determine the steady state.

We can proceed now to the derivation of all steady state relations, to be able to state whether the steady state exists and if it is unique. We also want to know ,what are the steady state levels of the main variables by a given calibration and their relationships.

System of equations

We consider various versions of the model regarding the differences in values of parameters for two economies. Thus, in this sense we distinguish here symmetric and asymmetric model or, more adequately, symmetric and asymmetric steady state.

In this chapter all disturbances occurring in the economy are stationary. Expected values of innovation processes are equal to zero. Therefore, in the steady state all innovations of disturbance processes vanish and values of variables are constant. To find the steady state, we assume that real exchange rate Q and labour supply L are given. The asymmetric steady state collapses to the symmetric one when we impose the same values for the respective parameters [START_REF] Hopenhayn | Entry, Exit and Firm Dynamics in Long Run Equilibrium[END_REF] . For simplicity and clarity we present here the derivation of the steady state for the symmetric case.

Assuming symmetry in all parameters we have straightforward equalities of respective variables from the two economies. All shocks are set to zero, so that exogenous variables described by stochastic processes are equal to their expected values. For further simplification

we impose that , 1 = Q , 1 * = = Z Z 1 * = = L L and . 1 * = = τ τ Hence: . , , , 1
E f XM E f I E f X f u f f u f f u f TOL XM I X θ θ θ = = = = (2.103)
We can express some variables by means of M z ~ and ).

( ~M M M z ρ ρ =
So we can see, that essential is to determine these two levels. All other steady state values then will be given straightforward. From the Euler equation for shares, the free entry condition and the equation for the average total profit, we get:

. ~w f N N N N N N E M D M I D I X D X D θ π π π π = + + + (2.104)
Let us introduce some notation for fixed costs .

I XM M f f f + =
Using the fact that:

, ) 1 ( ~w f M M - ∇ = π (2.105) and , ~1 ρ ρ σ π - = D D C , ~1 w f C M M M - = -ρ ρ σ π (2.106)
we get that:

), ( ~1 w f M M D M D +         = - π ρ ρ π σ (2.107) which gives: , ~1 w f z z M M D D ∇         = - σ π (2.108) where min 1 1 ~z z D - ∇ = σ
depends only on parameters. From equation (2.104) we will get an expression for , ~M z because all its variables can be determined by M z ~ and parameters:

, ~1 min X k k M X D X L z z w N N - ∇         = σ π (2.109) , ~1 min I k k M I D I L z z w N N - ∇         = σ π (2.110) , ~1 min M k k M M D M L z z w N N - ∇         = σ π (2.111) where , ] 1 ) ( [ 1 X k k k X f L + Λ - Λ - Λ ∇ = - σ κ , ] 1 ) ( [ 1 I k k I f L + - - ∇ = - κ κ κ σ . ) 1 ( M M f L - ∇ =
Summing products in equation (2.104), we obtain an equation of hyperbola [START_REF] Justiniano | Investment Shocks and Business Cycles[END_REF] , from which M z ~ can be derived numerically depending on parameter values:

, ~3 2 1 1 ξ ξ ξ σ = + - - k M M z z (2.112)
where ,

2 1 min 1 M f z ∇ = - σ ξ ), ( 1 min 2 M I X k k L L L z + + ∇ = - σ ξ . 3 E f θ ξ =
That proves that there exists a unique steady state.

The next step is to determine

).

( ~M M M z ρ ρ =
From the equation for the number of firms we state that:

. 1

D E N N δ δ - = (2.113)
Aggregate accounting, free entry condition and average total profit equation give: [START_REF] Justiniano | Investment Shocks and Business Cycles[END_REF] The left side of equation (2.112) is a function whose graph is the hyperbola. , ) 1 ( 1

β δ β - + = E D f N L C w (2.114)
but expression on the left can be also derived from (2.105) and (2.106) as:

. 1

1 M M f C w ∇ = -σ ρ σ
σ σ σ σ ρ ρ ρ ρ - - - - + + + = t M t M t I t I t X t X t D t D N N N N it follows that: . ~1 1 1 1 D M I M D I X M D X D M D M N N N N N N N +         +         +         = - - - - σ σ σ σ ρ ρ ρ ρ ρ ρ ρ (2.116)
Again, summing expressions on the right side of (2.116) and using the fact that they can all be determined by , ~M z we get a simple relation between the number of firms and the average relative price of the exporting multinationals:

, ~1 1 - - = σ ρ M D K N (2.117) where . ) ( ~) 1 ( 1 min 1 min - - - - Λ ∇         +         ∇ = σ σ σ κ k k k M M z z z z K
Substituting (2.117) in the equalization of (2.114) and (2.115), we derive:

. ) 1 (

~1 1 1 - - -         - - ∇ = L f K f E M M β δ β σ ρ σ (2.118)
Having M z ~ and , ~M ρ we can determine steady state levels of all remaining variables.

By the given setting of model parameters, they are determined uniquely. The average productivity of multinational exporting firms is the main steady state value, which is to be computed by numerical methods [START_REF] King | The Solution of Singular Linear Difference Systems Under Rational Expectations[END_REF] having some starting guess at the solution such that

min ~z z z D M > >
. Steady state values of all the remaining variables can be computed directly using this value.

Values of parameters

We want to study how the dynamic behaviour of the economic processes depends on changes in model parameters. In order to do this we perform steady state analysis and dynamic-path analysis.

A given specification of parameters results in some properties of the economy. In our DSGE model with heterogeneous firms one of the most important assumption is the one about firm idiosyncratic productivity. It allows to consider such sectors of economy like exporting firms or multinationals engaged in the foreign direct investment. Thus, in the steady state analysis of the model the crucial is to determine what are the steady state values of some ratios, like exporters to all producers in the economy. Stating these sectorial sharesm we can further define dynamic paths of variables, their responses to occurring disturbances.

Symmetric and asymmetric steady state

The aim of constructing our model is to study the effect of the nominal convergence criteria on real side of economy. Special attention is paid to the assumption of the heterogeneity in firm productivity. Thanks to it we can consider various types of firms with different levels of their idiosyncratic productivity. They are grouped in four sectors: firms producing and selling only domestically, those which also export their products, those which are productive enough to invest directly abroad to sell there and finally firms that invest abroad but sell back at the home market.

When it comes to study the real side of economy we would like to know what is the behaviour of firms from the particular sector and how these firms influence dynamic paths of macroeconomic variables like consumption or gross domestic product. But in this scope in real economies we can observe substantial asymmetries. The number of exporting firms or those engaged in foreign direct investment depends on many factors including the economy level of development. Regarding only bilateral relations in export and foreign direct investment there are even more considerable discrepancies.

Taking these asymmetries into consideration requires to describe such possibility in the model framework. It can be done on the model construction level or during calibration specification. In this chapter we will deal with the letter solution. The model framework remains here unchanged. But we can describe the asymmetry between the economies taking different values of respective parameters shaping dependences connected with the share of the particular sector in the total number of firms. In Chapter III we will introduce the change in the model assumptions, mainly an asymmetry in the production structure. We will consider again two economies, but one with four sectors of production and one with only two sectors.

In both cases of including such asymmetries we obtain different steady state values of variables for the home and the foreign economy.

Describing discrepancies in the distribution of shares of different firm types results in the asymmetric steady state and serves two goals. The first, mentioned above, is to regard in the model analysis features of economies and their differences found in reality. The second is rather general and concerns making the model able to describe all possibilities depending on given setting of calibration and assumptions. This is helpful in further modifications and extensions of the model as we can control for the steady state relationships and focus solely on construction changes.

In the next part of this chapter we will study effects of taking various calibration variants on results in impulse-response functions. The interesting is to examine whether the asymmetric steady state influences direction and scale of the responses. This would mean that asymmetry in the development of economies measured by share of the most productive firms is important for the obtained results. The task is to interpret channels of this influence and try to answer how nominal convergence criteria can determine bilateral relations of economies in export and foreign direct investment.

Justification and origins

Part of parameters are calibrated straightforward on the basis of literature. There are many papers in which one concerns assessing parameters on the micro basis. Usually in DSGE models one calibrates following parameters: the subjective discount factor β , the probability of a firm bankruptcy δ , the parameter of relative risk aversion γ and the symmetric constant elasticity of substitution across all goods σ . And these are calibrated with references to the literature as in Table 2.3. In the literature on DSGE models with heterogeneous firms one also calibrates the shape parameter k of the Pareto distribution. [START_REF] Kleiber | Statistical Size Distributions in Economics and Actuarial Sciences[END_REF] .

Calibrating parameters of a model serves various purposes. One can be focused on the empirical study and fitting the model to the data to replicate some stylized facts on economic phenomena. Instead one can concentrate rather on the theoretical analysis in form of simulations and studying the impulse-response functions. We want to concern specific relations between economies in the form of shares of multinationals. Thus, we concentrate on the long-run tendencies which in the model are expressed by the steady state values of variables. We pay the most attention to steady state ratios of firms of given type to all producers in the economy. They are determined by following parameters: shape k of the productivity Pareto distribution, the ratios of fixed costs ,

X f u , I f u XM f u
to the annualized fixed [START_REF] King | System Reduction and Solution Algorithms for Singular Linear Difference Systems under Rational Expectations[END_REF] It results from the Euler equation for bonds in Calibration 1 is consistent with scenario for two economies with small share of multinationals. The second calibration corresponds to the case where both economies engage a lot in the foreign direct investment. The third parameterization describes the case of two economies differing in the shares of sectors.

Changing for ratios of fixed costs gives us the numbers for shares by the given steady state iceberg cost [START_REF] Klima | Programowanie dynamiczne i modele rekursywne we ekonomii. Zagadnienia analityczne i metody numeryczne z przykładowymi implementacjami w języku Maltab/Octave, Materiały i Studia NBP[END_REF] . To compare these three scenarios when studying the impulse-response functions we also set other parameters so that economies exhibit the same values of macro variables in all three calibrations. This way we avoid bias in the scale of responses. Values of respective parameters needed to keep the base of the comparison are given in Table 2.5. [START_REF] Klima | Programowanie dynamiczne i modele rekursywne we ekonomii. Zagadnienia analityczne i metody numeryczne z przykładowymi implementacjami w języku Maltab/Octave, Materiały i Studia NBP[END_REF] Controlling only for the shape parameter without calibrating the ratios of fixed costs would not bring the desired steady state relationships. Whereas changing solely the ratios of fixed costs gives us the expected relations, thus we fix the shape parameter for the home and the foreign economy in line with the literature. See Table2.3. The values of parameters from Table 2.5 are set this way to get the same levels of consumption, output and real wage for both economies and for all three scenarios. In the third calibration we need to control for fixed cost of entering production to get the same consumption and gross domestic product. Changing for the steady state aggregate productivity Z gives also the same real wage.

Steady state relationships of variables

In the symmetric steady state values of respective parameters for both economies are the same. In the asymmetric steady state they are not equal, thus they determine dynamic properties of the given economy in comparison to the second one. We can, for example, try to describe such economies that one of them is developed and the other is emerging. Hence, the former has bigger shares of exporting firms and multinationals. The emerging economy has more firms that produce and sell only domestically. If we would like to replicate some stylized facts concerning these relations it is difficult to obtain the data. We can try regarding some of model variables as proxies of economic indicators. For example number of firms D N can serve as a proxy for capital stock. Still it is hard to find comprehensive and comparable data connected with FDI activity, especially with re-exporting.

We are interested in the influence of the foreign direct investment on economy and what happens, if one economy is more developed in this scope than the other one. Thus, we would like to connect our theoretical variables that represent shares of different type firms in the whole mass of home firms with the data that can be found in statistics. The share of exporting firms

D X N N /
is related with exports of goods and services as percentage of GDP. The share of home multinationals

D M I N N N / ) ( +
serves as a proxy for FDI outward stocks also in percentage of GDP. Our data concerns two economies: Poland and Germany [START_REF] Krugman | Scale Economies, Product Differentiation and the Pattern of Trade[END_REF] and are given in tables 2.6 and 2.7. We propose instead arbitral division [START_REF] Kuhn | Nonlinear programming[END_REF] to get some values for these ratios.

In Table 2.8 values of four first ratios are the ones we calibrate parameters for and replicate some fact found in the data. Values of all the other variables and relationships in the table just result from regarding the given distribution of sectors' shares, thus from the given calibration. [START_REF] Krugman | Scale Economies, Product Differentiation and the Pattern of Trade[END_REF] Let us emphasize that we study the data relating to shares of sectors only. Thus, we should not identify our model economies with the Polish and German ones. Instead we can think about scenarios for economies of Poland and Germany where the former is less engaged in the foreign direct investment than the latter one. [START_REF] Kydland | Time to Build and Aggregate Fluctuations[END_REF] We calibrate parameters to get the relations comparable with the data for 2009. [START_REF] Kuhn | Nonlinear programming[END_REF] From around 70 to 90 percent for share of multinationals producing and selling abroad and 30 to 10 % for those also producing abroad but exporting to the home economy. The share of new entrants results from equation (2.113) with the "death" shock parameter 025 . 0 = δ and means that each quarter 2.6 % of existing firms exits the market.

The average firm in each economy in each scenario has the average productivity about 86 % higher than the most inefficient non exiting producer [START_REF] Lasalle | The Stability and Control of Discrete Processes[END_REF] . The average multinational is about 66 % more productive than the average exporter in the emerging economy and about 45 % more productive in the developed economy [START_REF] Lim | Computational Macroeconomics for the Open Economy[END_REF] . The least productive exporting multinational [START_REF] Lasalle | The Stability and Control of Discrete Processes[END_REF] Using values of the scale parameter min z of the Pareto distribution from is about 27 % more productive than the average multinational which sells only on the host market in the emerging economy and about 48 % more productive in the developed economy [START_REF] Lejour | Trade costs, Openness and productivity: Market access at home and abroad[END_REF] . This suggests that in the developed economy it is hard for firms to start export from their affiliates. Whereas in the emerging economy, first of all it is difficult for firms to set their subsidiaries abroad.

Consumption absorbs about 86 % of GDP while the remaining 14 % is intended for investment in entry of new firms. Dividends yield about 20 % of GDP.

Impulse-response analysis

We will discuss here results obtained from the model presented in this chapter. Depending on the calibration different versions of our model are concerned. Basically we distinguish three types and the criterion of this classification is structure of shares of domestic, exporting and multinational firms in both economies. The focus is whether the economies are oriented on local production and sales, exporting or foreign direct investments. We consider also if these two economies have the similar pattern of production and sales distribution or the different ones.

In the first part we log-linearize the model equations to obtain the structural form. This will allow for better understanding how the impulse-response functions (IRFs) and their graphs depend on microeconomic relations from the model equation system.

Log-linearized model

Taking into account all optimality conditions resulting from microeconomic decisive problems of the economic agents in our model, as well as the macroeconomic conditions of the general equilibrium, we obtain the nonlinear equation system summarized in Table 2.1.

The system is quite complex due to the nonlinearity of relations and number of all variables used also the auxiliary ones. For the sake of clarity we presented the equations only from the home economy perspective. In fact the system consists of 27 main equations with 27 main endogenous variables. There are also some auxiliary endogenous variables, exogenous [START_REF] Lejour | Trade costs, Openness and productivity: Market access at home and abroad[END_REF] Computed as . / ) (

I I M z z z -
The home economy result is comparable in the first and third calibrations. The foreign economy result is comparable in the second and third calibrations.

variables described by stochastic processes and some variables expressed by means of the ones mentioned previously. For all of them we have the respective dependences [START_REF] Lucas | Asset Prices in an Exchange Economy[END_REF] . All in all, we end up with the system of 106 nonlinear equations, which are moreover mutually dependent, with dynamic relations and effects of anticipated expectations connecting the present, respectively, with the past or with the future.

Finding explicit solutions of such extensive systems is usually impossible, even with numerical methods [START_REF] Lucas | On the Size Distribution of Business Firms[END_REF] . Thus, for DSGE models ones exploits approximations of various kind.

Typically linear approximations are in use because, comparing to the nonlinear [START_REF] Lim | Computational Macroeconomics for the Open Economy[END_REF] ones, they are quite simple and not so much time-consuming. When we transform our equations into the linear system then the model solution is much easier to find.

In this part of the chapter we will present results of the log-linearization for the system consisted of the all equations from the model summary in Table 2.1. Respective equations for the foreign economy are analogous. The log-linearization involves formal steps to obtain linear equation system. The procedure is straightforward. Instead of dependences between variables we consider relationships between their log differences from their steady state values.

After log-linearizing the price index equation is as follows:

[ ] [ ] [ ] [ ] . ) 1 ( ) 1 ( ˆ) 1 ( ) 1 ( 0 , , 1 * , * , 1 * * * , * , 1 * * , , 1 t M t M M M t I t I I I t X t X X X t D t D D D N N N N N N N N ρ σ ρ ρ σ ρ ρ σ ρ ρ σ ρ σ σ σ σ - + + - + + + - + + - + = - - - - (2.119)
The log-linearized equation for the total average profit of the firm in the home economy has the form: [START_REF] Lucas | Asset Prices in an Exchange Economy[END_REF] All these variables and their equations have been presented earlier in this chapter with their meaning, but in the model summary we have used only the main ones. The system of all 106 equations needed to solve the model and obtain the impulse-response functions is presented in Appendix B.2.1, in a DYNARE routine programmed with MATLAB implementation. [START_REF] Lucas | On the Size Distribution of Business Firms[END_REF] We try to avoid a commonly used term 'solving a DSGE model'. In our case this abbreviation means solving the reduced form of the model that is the linear equation system resulting from the model equations' approximation. It is particularly often met in technical language. But the term is so popular that has become conventional and one can find it often in many textbooks. In the programming appendices we also use it. [START_REF] Lim | Computational Macroeconomics for the Open Economy[END_REF] Nonlinear approximation methods with examples of their implementation are discussed in DeJong, Dave [2007]. Another useful study is by Lim, McNelis [2008], where the authors apply projection techniques throughout. In both one can find comparison of linear and non-linear methods, their advantages and drawbacks.

The quality of approximation with these various methods is also discussed.

( ) ( ) ( ) ( ) ( ) . ˆ, , , , , , , , , t M t M M M t I t I I I t X t X X X t D t D D D t t D D N N N N N N N N N N π π π π π π π π π π + + + + + + + + = +
(2.120)

The transformed linear free entry condition states that:

. ,

t t E t t Z f w v - + =
(2.121)

The sectorial profits of the exporting, MNFs and re-exporting multinational firms have loglinearized equations of the form:

( ) ( ), ) 1 ( ˆ, 1 1 , * 1 * , t t X t X t t X t X t X X Z f w Z wf Q C C - + - + - + = - - - σ σ ρ σ ρ σ π π (2.122) ( ) ( ) ( ), ) 1 ( ˆ* , * 1 * * 1 , * 1 * , t t I t I t I t I t t I I Z f w Z f w C C Q - + - - + = - - - - σ σ ρ σ ρ σ π π (2.123) , ˆ, 1 , 1 * * , t XM M XM t I M I t t t t M f f f f f f Z Q w - - + + - + = π (2.124)
where .

I XM M f f f + =
For the sectorial shares of firms mentioned above the log-linearization gives following dependences:

, 1 , ,       ∧ + Λ - Λ Λ + + = t t k k t t M t X TOL k k N N µ κ (2.125) , 1 ˆ, , t k k t M t I k N N κ κ κ - + = (2.126) , ˆ, , , t M t D t M z k N N - =
(2.127)

where:

), ( ˆ* * t t t t t t Z w Z w Q TOL + - + + = ∧ (2.128) ). ( ) ( ) 1 ( * * , , * , t t t t XM M XM t I M I t t t M Z Q w f f f f f f C z - + + + + - = - - σ τ σ (2.129)
Let us also remind that:

1 1 1 - -         = Λ τ σ X I f f and . * 1 1 * τ κ σ -         ⋅ + = C C f f f I XM I
The equation for the number of all firms in the economy after log-linearizing takes the form:

. ) 1 ( ˆ1 , 1 , , - -+ - = t E t D t D N N N δ δ (2.130)
According to the transformed linear Euler equations for bonds and for shares:

[

],

1 0 1 + - + + = t t t t C C E r r r γ (2.131) ( ) ( ) . 1 ˆ1 1 1       + + + - = + + + t t t t t t v v v C C E v π π π γ (2.132)
The log-linearized aggregate accounting equation is as follows:

). ( ) ( ~, , t t E E t t D D t t v N v N N N w L w C C + - + + = π π (2.133)
Finally, we have also the log-linearization of the balanced current account equation:

( ) ( ) [ ( ) ( ) ( )] ( ) ( ) [ ( ) ( )+ + + + - + + + + - + ⋅ + + + = = + + + + + - + + + + + - + ⋅ + + + - - - - - - - - t t I t I I I t M t M t M M t X t X t X X M M I I M M X X t M t M M M t I t I I I t t M t M t M M t t X t X t X X M M I I M M X X Q N N N C N C N C N C N N N C N C N N N N Q N C N C Q N C N C N N N C N C ) 1 ( ˆ) 1 ( ˆ) 1 ( ˆ) 1 ( *, * , * * , , 1 * , * , 1 * * 1 * * * 1 * , , , , * , * , * 1 * * * , , * 1 * * * * * 1 1 * * π π ρ σ ρ ρ σ ρ π π ρ ρ π π π π ρ σ ρ ρ σ ρ π π ρ ρ σ σ σ σ σ σ σ σ ( )]. * , * , * * t t M t M M M Q N N + + + π π (2.134)
We have obtained the linear system (2.119)-(2.134) using the log-linear approximation. This is a substantial simplification of our original equations resulting from the model assumptions which constituted the theoretical form. We can proceed further with the structural form of the model. For the system of linear dependences it is possible to find its solution quite fast by numerical methods and to get the impulse-response functions. This loglinearized representation characterize the model dynamics that we can subject to the economic analysis. There are equations that despite of their transformed form still can be interpreted in the economic sense. They exploit some of the parameters introduced in the theoretical model and thus can describe the influence and strength of these parameters in shaping the model empirical results.

In the log-linearized system (2.119)-(2.134) we can easily notice that equations, describing the most important bilateral relations between the economies like the price index or the balanced current account equation, as well as equations of the aggregate consumption and from this also of the gross domestic product, depend on variables defining average sectorial profits and sectorial numbers of firms. These sectorial quantities are characterized by parameters

XM I X f f f , ,
denoting steady state costs of engaging in the given economic activity, where ,

E f S f u f S θ = . , , XM I X S =
The actual original parameters from the theoretical model are , , ,

XM I X f f f u u u
which shape the distribution of sectorial shares in the economy.

It turns out that these parameters of sectorial shares influence the model dynamics most intensively comparing to the other parameters. They determine how hard the number of firms from the given sector or the average profit coming from this sector depend on the aggregate productivity, the production and the iceberg costs. Hence they affect dynamic paths of all endogenous variables in the system.

Temporary productivity shock

Linear equation system [START_REF] Griffoli | DYNARE User Guide: An Introduction to the solution & estimation of DSGE models[END_REF] Such reduced model allows for theoretical analysis. We can compute and interpret functions of responses of endogenous variables to external shocks called impulse-response functions. As it was presented in the subsection 2.2 our parameters are calibrated not estimated. Thus, we cannot directly make conclusions about the economy existing in reality.

However, we have calibrated our parameters not only arbitrary on the basis of studies referring to microeconomic data, but also so that to match some features of real economies found in macroeconomic statistics. In this regard our study on the impulse-response functions can also have some empirical usage. We can compare the functions obtained from various calibrations and try to find out whether the given choice of parameter setting influences the results and in what extent.

We will analyse changes of variables' values in response to transitory increase in the home aggregate productivity. The size of the disturbance is one standard deviation of the shock which we assume to be 0.01. It means that the aggregate productivity t Z increases from 1 to 1.01 when the shock hits the system and its log deviation from 0 to 0.01. We have to remember that all variables are expressed as percent deviations from the steady state [START_REF] Griffoli | DYNARE User Guide: An Introduction to the solution & estimation of DSGE models[END_REF] Let us remind that we have presented only the main log-linearized equations. The whole system used to obtain impulse-response functions can be found in the programming Appendix B.2.1.

values. Thus, each of them comes back to its steady state value that is zero which is clearly visible on the graphs in figures 2.6-2.8.

The changes in variables have only temporary character, because each variable is stationary. Hence, after about fifty years all variables return to their long-term values. With persistency equal to 0.9 the shock disappears after about eleven years. Approximately eighty five percent of the productivity increase is absorbed after five years. We can also observe from shapes of the IRFs graphs that a few variables react immediately. The highest response is directly on the impact, its sign remains unchanged but the persistency is quite small and the variable returns to the steady state quicker comparing Ztilde and Ztilde * to the other variables. This concerns for example the number of new firms. When we take into the consideration log-linearized equations of the free entry condition (2.121), average sectorial profits (2.122)-(2.123) and average total profit (2.120) we can state that this immediate increase results from the cost of entry decreasing and expected future profits rising. The natural consequence is that the total number of firms in the economy goes up too.

When the numbers of producing firms and new entrants increase then according to equation ( of this five sectors of production numbers of firms go up [START_REF] Mankiw | Small Menu Costs and Large Business Cycles: A Macroeconomic Model[END_REF] which creates higher demand for labour both home and foreign. Because only the domestic employees are now more productive on the whole economy level the positive effect on the labour demand is bigger in home. This in turns translates to wage increases, again higher in the home economy relatively to the foreign one. On the graphs it is seen in the form of immediate wages' rises.

Combining the effect of increase in the home productivity, domestic and foreign wages together with the persistency scale of the mentioned variables' responses, we can state that the terms of labour from the home economy perspective improves on the impact, but then worsens. From equation (2.128) describing the terms of labour it is clear, that this deterioration results from the high persistency of domestic wage positive response, comparing to how quickly productivity shock vanishes.

The terms of trade reaction to the exogenous shock in productivity is conditioned by responses from numbers of exporting firms located at home, as well as abroad and by responses of average prices for these firms' products. The home economy faces first decrease in the terms of trade, then the reply reverses reaching its maximum after about six years. It means that the home terms of trade improves due to the home aggregate productivity increase. Prices of exported goods grow relatively to prices of the imported goods.

We can also observe positive reaction of the non-traded to traded price ratio. But first it goes down because of real exchange rate depreciation. From the definition (2.97) of this variable, one can state, that the response changes its sign to positive, because foreign multinationals using home labour become more productive and there is more foreign MNFs selling on the home market that on the foreign one ( * ,

* , t M t I N N >
). The whole temporary behaviour of the ratio means that, due to the shock in productivity, prices of products produced at home destined to home market increase relatively to prices of goods designed for foreign market. It results from the fact that more productive home exporting firms and foreign exporting MNFs can afford fixing relatively lower prices. The needed profit can be obtained from their idiosyncratic productivity increase.

Taking into account the heterogeneity of firms in their productivity and existence of multinationals not only selling at home, but also re-exporting abroad, we get the positive responses from CPI-and welfare-based real exchange rates, t q and t Q respectively. Each of them faces depreciation meaning prices of goods bought by home consumers decrease with relation to prices of products purchased by foreign agents.

The aggregate productivity t Z concerns home entrepreneurs regardless their target market, localization and kind of activity. It is connected with quality of labour used in the given economy. But firms engaged in foreign direct investment settle abroad and use the foreign labour. Thus, their idiosyncratic productivity depends also on the foreign aggregate productivity. To take this effect into consideration we exploit variable t Z ~ standing for average productivity of home producers regardless their origins. Heterogeneous productivity of home exporting firms, foreign MNFs and foreign re-exporting multinationals increase on the impact of temporary growth in the home aggregate productivity. The effect lasts as long as the average productivity of foreign multinationals exceeds the average productivity of home firms.

Let us recall that figures 2.6-2.8 show IRFs for various calibrations. Each one is consistent with some features of real economy, mainly sectorial shares of numbers of companies in the whole mass of firms in the given economy. Calibration 1 discussed above concerns economies similar to the Polish one, that is characterized by the small shares of multinationals. In Calibration 2, on the contrary, we deal with economies more concentrated on the foreign direct investment, similar to German economy [START_REF] Mccandless | The ABCs of RBCs. An Introduction to Dynamic Macroeconomic Models[END_REF] Source: Author's numerical simulations [START_REF] Mccandless | The ABCs of RBCs. An Introduction to Dynamic Macroeconomic Models[END_REF] As it has been explained in 2.2.3 choice of parameters is strictly determined by getting the model relations consistent with the data. But in the case of the symmetric calibrations we regard two economies of exactly the same features. For example Calibration 1 means two economies similar to the Polish one. In case of asymmetric Calibration 3 the two economies can differ. In both calibration cases the transitory aggregate productivity growth causes the terms of labour improvement on the impact. But for Calibration 1 this response changes to the deterioration before the variables returns to its steady state value, while in the second calibration the first positive reaction only vanishes and the variable value quickly reaches level of the steady state. Such a difference translates to the situation where in the first case the foreign producers gain temporarily, whereas for the economy like the German one home entrepreneurs face better conditions under the home productivity increase.

Regarding the terms of trade, the home economy gains in both calibrations, but still the positive reaction is stronger in the second parameterization. Moreover, non-traded to traded price ratio reacts differently. In Calibration 1 we have a temporary relative increase of prices of goods produced at home and destined to the home market. In Calibration 2 what relatively goes up are prices of domestic commodities destined to the foreign market. It means that in the first situation the foreign consumers gain or that firms producing in the home economy start to take more benefits from the domestic buyers. In case of the second calibration who face relatively better conditions are the consumers at home.

In both calibrations the CPI-and welfare-based real exchange rates t q and t Q grow, meaning the home currency depreciation. But here we can also observe some differences.

When the economy production is more dispersed within various sectors like the German one it faces very similar reaction of the both measures of exchange rate. In case of the economy more concentrated on less productive firms the variety effect starts to have bigger significance. The CPI-based real exchange rate, which is the theoretical counterpart of the measure found in the official statistics, accounts for features of products coming from various sectors, and thus also for their differences in average relative prices. When value of this variable increases relatively to the welfare-based rate, what we observe clearly in the first Calibration, then the domestic consumer starts to have lower and lower utility from spending the same amount of money on the domestic market. It results from the relative decrease of product variety in the home economy.

Finally we proceed to discussion of the results of the third calibration presented in Figure 2.8. In this calibration the two economies have different qualities in the sense of sectorial shares. Such asymmetry allows for more realistic assumption of not equal bilateral relations with different significance of domestic multinationals for the given home economy.

Comparing all three parameterization we notice the biggest differences again in the reaction of variables shaping bilateral relations between two countries.

We know that Calibration 1 is consistent with the emerging economy, the second one with the developed one, and the asymmetric Calibration 3 deals with the setting accounting for features of two distinct economies, differing also in the steady state. Thus, we can study if the outcomes for the domestic economy improve, comparing the first version of calibration with the asymmetric one. In this meaning we observe that positive response of the number of domestic exporting firms is stronger and negative reaction of foreign re-exporting multinationals is in turn weaker.

Figure 2.8. Temporary aggregate productivity increase in home, Calibration 3

Polish economy in solid line, German economy, t q and t TOT in dashed line Source: Author's numerical simulations

The terms of labour deteriorates clearly only in Calibration1. In the second one they return to the steady state very quickly after some period of improvement. In case of the third parameterization the terms of labour also worsens, but very slightly, which means better conditions for the home economy comparing to the first calibration results [START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF] . [START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF] The asymmetry is concerned from the point of view of the emerging economy, in which domestic multinationals located abroad do not take the big part in the domestic production. Thus, variables without The terms of trade reaction is everywhere similar regarding its sign, first negative and then positive before reaching again the steady state. But we can notice that the highest maximal response occurs in the second calibration and the lowest in the first one consistent with Polish economy. In the asymmetric case this variable reacts similarly to the terms of trade for the economy with the big share of multinationals.

The non-traded to traded price ratio pattern is quite interesting. Value of this variable increase only in case of Calibration 1. For the two remaining it decreases meaning improvement in prices for the domestic buyers of goods produced at home.

When it comes to the real exchange rates we can state that the biggest discrepancy between the welfare-and the CPI-based exchange rate is observed for the first calibration case. Here the variety effect has the biggest importance, due to the fact of low dispersion of firms within the four sectors. The highest depreciation of the home currency on the CPI comparison basis also occurs when we regard the first parameterization, consistent with the emerging economy The left column shows the peak of the response. Its duration in years is given in brackets in the right column. Source: Author's numerical simulations and the synthesis subscripts mean calibration for the emerging economy and the subscripts relate to the foreign developed economy.

123

In tables 2.9 and 2.10 we summarize the comparison of results from all three calibrations. We analyse signs, the scale and the length of the variables' responses to the home aggregate productivity increase.

Regarding characteristics of responses presented in tables 2.9 and 2.10 we can notice that all macro variables react the same in all three calibrations. This results from the way we treat the significance of different shares of sectors in economies. Values of parameters were set so that to get the same steady state values of macro variables. By this we can focus on the pure effect of asymmetric share of multinationals.

In the international variables we can notice some specific effects. The non-traded to traded price ratio reacts positively only in case of Calibration 1 consistent with the emerging economy. Increase in the domestic aggregate productivity causes deterioration of domestic buyers' conditions. It means that firms producing in the home economy start to charge more the domestic consumers and less the foreign ones. And it happens when both economies are less developed in terms of small shares of multinationals.

The left column shows the peak of the response. Its duration in years is given in brackets in the right column. Source: Author's numerical simulations and the synthesis Another specific effect reveals in responses of the welfare-and CPI-based real exchange rates. The former depreciates stronger than the latter only in Calibration 2 consistent with the developed economy. It means that the domestic consumers start to have higher and higher utility from spending the same amount of money on the domestic market contrary to the cases described by calibrations 1 and 3 when product variety in the home economy decreases.

Regarding sectorial variables there is no specific effects in responses of variables, whereas size effects are insignificant. Actually size of reactions suggests that the asymmetric Calibration 3 is some kind of average response between cases from Calibrations 1 and 2.

Permanent productivity shocks

Permanent shocks are an important driving force of the economic dynamics, especially from the point of view of the emerging countries' economies. As Andrle [2008] points out most of these economies is buffeted by pronounced permanently-viewed structural shocks to productivity and technology, not mentioning the changes in business environment [START_REF] Melitz | Heterogeneous Firms and Trade[END_REF] .

Moreover, as it is commonly known, reactions to transitory and permanent shocks may be strikingly different. That is why besides studying the temporary disturbance we also want to analyze the effects of the permanent productivity shock.

When handling with permanent shocks we assume and construct our model as the deterministic one because in the stochastic settings we can deal only with temporary disturbances [START_REF] Finansów | Monitor konwergencji nominalnej[END_REF] . This distinction between deterministic and stochastic model is of the great importance. In the deterministic case the agents in the economy take their decisions knowing that future values of the innovations will be zero in all periods to come. On the model construction level nothing changes and the distinction is achieved by transforming only the part with the shock description when we state its character.

Under the permanent shock the system reaches its new steady state. It means that the model is constructed to be the deterministic one regarding the setting describing the disturbance part. We know the occurrence of all future shocks and that the future values of innovations are equal to zero.

Figure 2.9. Permanent aggregate productivity increase in home, Calibration 1

Foreign economy, t q and t TOT in dashed line Source: Author's numerical simulations

We will analyse changes of variables' values in response to permanent increase in home aggregate productivity. The size of the disturbance is again fixed so that the aggregate productivity t Z increases from 1 to 1.01 and its log deviation from 0 to 0.01, but this time for all periods to come. Each model variable reaches its new steady state value which can be noticed on the graphs in figures 2.9-2.11. We interpret these changes as following. If the variable response shows for example one percent increase it means that new value of the variable is bigger by one percent than value from the previous steady state.

Of course we are still dealing with the percent deviations of variables from their steady state values not with the variables in levels.

When we handle with the deterministic setting of our model what we actually do is not running the impulse response functions but conducting numerical simulations on two hundred Adjustment of variables to the new steady state values takes long time, usually more than twenty five years. The deviations vanishes the most slowly in case of variables shaping bilateral relations between the economies like the sectorial numbers of firms, terms of labour or trade, CPI-or welfare-based real exchange rate. After about five to eight years we can observe the extrema of the responses. For some variables, mainly the ones representing comparison of the countries in form of ratios, terms and rates, we do observe just recovery to the previous steady state values [START_REF]Raport na temat pełnego uczestnictwa Rzeczypospolitej Polskiej w trzecim etapie Unii Gospodarczej i Walutowej[END_REF] . Other variables permanently diverge from their initial trajectory. All in all such behaviour of the system constitutes the new steady state in which variables can have different various than in the one from which they have started.

We will compare now the IRFs derived as a result of the temporary aggregate productivity increase with graphical representations of numerical simulations in case of the permanent shock. Regarding the reaction signs, the dynamics of the system in case of permanent aggregate productivity growth is generally similar to the one when the shock is temporary. For some variables it is different, but it concerns the variables which return to the initial steady state in case of shock of both types. It can be explained by the microeconomic basis of our setting where the endogenous entry takes the important role.

As it was explained by equation (2.1) the new firm needs time to build, that means to start production after entering the market. Moreover, each period only some amount of the entities survives. The less productive companies have to exit the market.

When the aggregate productivity t Z increases permanently, the effect on the impact is that the number of new entrants decreases for some periods, because they face higher level of productivity to reach to be able to produce. The whole number of firms in the home [START_REF] Moler | An Algorithm for Generalized Matrix Eigenvalue Problems[END_REF] The IRFs run a multitude of Monte Carlo trials and get an average response of the system for each period of the concerned horizon. The simulation repeats the process only once for every period. Because the graphical representations are similar in both cases it is common to use the term "impulse-response function" also for the permanent change in deterministic models. [START_REF]Raport na temat pełnego uczestnictwa Rzeczypospolitej Polskiej w trzecim etapie Unii Gospodarczej i Walutowej[END_REF] It results from the fact that the domestic variables and their foreign counterparts reach the new steady state values that are deviated from the old ones by the same percentage points. economy shortly deteriorates. In the foreign country the reaction of the number of firms is opposite. The foreign re-exporting multinationals use the domestic labour and their idiosyncratic productivity goes down resulting in average heterogeneous productivity decrease of the remaining foreign firms. This causes that abroad there is more and more firms from various sectors. In the home economy domestic companies benefit from the aggregate productivity increase. The effective labour becomes cheaper for them relatively to the foreign labour. Because profits go up the domestic demand and income rise resulting in decreasing the idiosyncratic productivity of the home re-exporting multinationals located abroad. This involves decline in the relative productivity of companies from the remaining sectors. All in all, the number of new entrants, as well as the whole number of firms in the home economy, starts to recover and reach the new higher steady state value. As we see, this adjustment is gradual just because of accounting for the endogenous entry and time-to-build setting. Ztilde and Ztilde * Under the permanent aggregate productivity increase the home economy becomes relatively more attractive environment, especially for the producers, but for the consumers too. The terms of labour positive reaction prove better conditions for home firms as they can use more effective labour. The non-traded to traded price ratio decreases which gives relative gains for home buyers. The producers offer them relatively lower prices than for the foreign consumers. The CPI-and the welfare-based real exchange rates go up meaning the domestic currency appreciation. Prices in home economy increase with relation to the ones abroad. This encourages foreign firms to export more to the home economy and multinationals to engage in foreign direct investment in the home economy. The terms of trade reaction is in turn negative resulting in relative decrease of the exported goods' prices comparing to prices of the imported goods. It means the situation when the foreign consumers become more and more willing to buy goods offered by the home exporters and the home consumers become more willing to buy goods offered by the home re-exporters. In case of permanent shock various calibrations do not give significantly different results. The simulated paths are very similar meaning the similar reaction of variables in their sign and scale. In all three calibrations it is clear that the home economy becomes more attractive to buy, produce and invest due to the aggregate productivity permanent increase.

The terms of trade deterioration is the strongest in Calibration 2, the weakest in Calibration 1. But this variable, as well as other variables shaping trade and invest relations between the economies, returns to the old steady state value.

The more noticeable difference is in responses of real exchange rates. In case of Calibration 2 the welfare-and CPI-based exchange rates reacts almost identically and the eventual discrepancy is insignificant. But in the first and third parameterization these variables respond somehow differently when it comes to the scale of their reaction.

Calibration 1 consistent with some data for Polish economy reveals importance of the variety effect. The situation is alike in Calibration 3 fixed for the asymmetric case. The CPIbased real exchange rate reacts more intensively than the welfare-based one. Such patterns of exchange rates' behaviour suggest that the variety effect matters only for economies with small share of domestic multinationals and re-exporting multinationals located abroad.

We can state that in the economies like that the variety is relatively low. The CPI-based exchange rate accounts for the variety of goods available for consumers in the given economy. When the aggregate productivity increases then the domestic variety grows with relation to the foreign one and the appreciation of the CPI-based exchange rate is higher than of the welfare-based measure. The home consumers have higher and higher utility from spending the same amount of money on the domestic market.

Summing up the results derived on the basis of the model presented in this chapter we can state that they depend on the chosen calibration. The conditions determining the economy after hitting by the temporary or permanent shock differ regarding the initial conditions. The economy with small share of domestic multinationals reacts differently than the developed one and this has the biggest importance when it comes to comparing bilateral relations between them like the terms of labour or trade, non-traded to traded price ratio and real exchange rates. This discrepancy involves not only the scale of variables' responses, but also their directions.

In the interpretation of the IRFs and results of numerical simulations in case of the permanent shock one can notice the significance of the variety of goods effect in the given economy and differences between the CPI-and welfare-based real exchange rates' reactions .

The variety effect does not reveals in every calibration. It is connected with the situation when one economy gains higher variety due to existence of numerous foreign exporters and foreign multinationals selling to the home consumers. The domestic buyers benefit from this variety improvement in terms of their utility.

Regarding the results' analysis from the model construction perspective it is worth of highlighting that in the case of the permanent shock which we can treat as a change in the aggregate productivity regime we do observe quantitative changes in the economies features.

The numbers of firms, consumption and income levels grow. But when it comes to the comparison of conditions characterizing interdependences between two model economies they remain basically unchanged. It results from the fact that deviations of the steady state values of most domestic variables and their foreign counterparts are of the same scale and sign on the end of the considered horizon.

Concluding remarks

In this chapter we have presented the framework serving description of relations between two economies in which the focus is on the assumption of the heterogeneity in productivity levels of firms. The consequence of such setting is that one can describe economies with distinguished types of firms' activities which we have called the sectors. It becomes especially interesting when we want to concern countries with different levels of development in this regard. To discuss this subject we have proposed the model framework allowing for asymmetries in shares of production sectors in one economy relatively to the second one. The asymmetry in shaping these relations is achieved by dealing with various parameterizations giving various steady state values of variables that means the asymmetric steady state.

We have handled with three distinct calibrations and three distinctive types of relations between two economies. One was situation where the countries have the same but small share of multinationals in the total mass of firms in the given economy, the second one when this share was considerable and the last one when the countries differed in this regard. The applied choices of parameters' values have found their reflect in the model outcomes, analysis and interpretation of these results.

Regarding the main results of the model presented in this chapter first we would like to notice that consistently with the model construction reaction of the terms of trade on the exogenous shock in aggregate productivity is influenced not only by reaction of the number of exporting firms and the average optimal price set by this firms, but also by reaction of the multinationals and their price. It results from the definition of the terms of trade we use.

It is worth highlighting the consequences of such a framework. FDI becomes another source of the adjustment in real variables. When economies are symmetric in their FDI relations and both engage much in such form of economic activity then the terms of trade improvement is stronger than in the case of economies with small shares of FDI activity. When we introduce asymmetry in form of different shares of outward FDI, then the economy experiences the moderate reaction of its terms of trade. From the point of view of emerging markets it reveals the fact, that the economy which is mainly the host for FDI cannot expect as strong the terms of trade improvement as it could, if it had as big the FDI share as the developed economy.

Depending on the model calibration the variety effect consisting in the higher depreciation of the CPI-based real exchange rate than the welfare-based rate comes out with various strength. It suggests more or less benefits from the consumer perspective. The effect is clear when one economy gains higher variety due to existence of numerous foreign exporters and foreign multinationals selling to the home consumers. That means the variety effect does not result simply from the aggregate productivity increase but from the existence of multinationals. One can expect that in emerging markets, that are usually host economies for FDI from developed countries, consumers benefit in terms of their utility much from variety of goods coming from the foreign firms.

Under the permanent aggregate productivity increase, which can be treated as a change in the productivity regime, the home economy becomes relatively more attractive environment for consumers to buy and for producers to sell and invest in FDI. This can be observed in the case of each calibration. However, various calibrations do not reveal significant quantitative differences. This shows that the specificity of the economy in terms of the FDI share does not play a role. Let us emphasize here that the used framework is fully symmetric and the eventual asymmetry, as in Calibration 3, results only from the choice of different values for parameters describing economies. Thus, it is hard to compare this theoretical model situation with the real existing economies, when one of them is rather the host and the other is the guest in terms of FDI.

Regarding theoretical issues of the model construction and calibration, we can notice that in case of the symmetric framework, the calibrations do not give significantly different results which could serve more explanatory description of changes in the relations between the economies. The straightforward conclusion was which parameters are responsible for shaping given interdependences, how we control for them and change this relations.

One can be otherwise interested mostly in the model dynamics and getting different reactions of variables to shocks in the home and in the foreign economy. Relations enclosed in the equation system of the model presented in this chapter are exactly the same for both economies. There are no differences in the structure of consumption or production. The only difference was introduced on the level of choice of parameters' values. But yet the model construction does not allow for investigation of more features of real economies found in the data and their satisfactory explanation.

In the third chapter we will enrich the framework we have exploited so far with an assumption which allows for concerning different structures of economies. Namely we will introduce asymmetry in the production structure. The aim of such proceeding is to focus on changes in the model construction and to be able then to understand how the economy having given bilateral relation with the foreign country will react to temporary shocks to the home and foreign conditions.

Chapter III Asymmetric DSGE model with heterogeneous firms

Introduction

In Chapter II we presented and discussed the symmetric DSGE model with heterogeneous firms. The model was symmetric in the sense that production structures were the same in both economies, that means they consisted of four production sectors in the domestic country and in the foreign one. We allowed for some kind of asymmetry in form of different values of respective parameters for the two economies, which was the case of one calibration.

Comparing this situation with the symmetric calibrations, we stated that they do not give significantly different results, especially the qualitative ones. The most visible was the variety effect, which was the most clear when one economy gained higher variety due to existence of numerous foreign exporters and foreign multinationals selling to the home consumers.

Let us notice that we described the situation in which one economy, the developed one, had many firms engaged in FDI, whereas the emerging economy had very few of multinationals. To relate such a situation to reality, we used the data about the Polish and German FDI outward stocks, in percentage of the GDP. This gave us some insight, how much the economies are involved in FDI abroad and what are the differences in this regard. But we should be aware that the data concerned the trade connections also with the rest of the world and did not express the fact, that when it comes to bilateral relations the asymmetries can be even bigger.

When we compare the emerging country like Poland with the developed economy like Germany, we can say that the situation in FDI positions between them is highly asymmetric 1 .

One economy is rather the host for foreign FDI from the other economy. Regarding the bilateral connections and production structures, we could say that one economy is concentrated on setting multinationals in the other economy which has much less its firms [START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] A broad study on FDI localized in Poland is provided by Nytko [2009]. One can notice that 17% of FDI inflows into Poland in 2007 came from Germany, which was the biggest investor, before France (11%), Netherlands (6%) and Luxembourg (6%). In that year 87% of capital inflow was from the EU countries. abroad. Some image of such an asymmetric situation can be noticed in the data on the bilateral FDI outward and inward positions, as in Table 3.12 . where we regarded the data on FDI, regardless the location, thus also in the rest of the world.

Here, we would like to emphasize that in the set of two economies only, the emerging economy's share in FDI abroad can be very small, even insignificant. Thus, the asymmetry in this regard can be higher and of different nature, connected with diversification of production strategies in the given economy. In one economy production strategies of firms can be more diversified than in the other economy. The point here is that we regard the set of two economies and such a qualitative asymmetry possibly has a great significance for shaping trade relations between two economies.

The fact, that in the set of two economies only one is highly engaged in FDI and the share of the other economy is very slight, gives also some insight into the comparison of development levels. As we know, only the most productive firms set their multinationals abroad. Focusing on such strategy of production shows that the economy is developed enough to be able to make profits from it. When we regard bilateral trade connections and FDI relations, we can notice that, in the set of two economies in which one is emerging and the other is developed, there are high asymmetries in such relationships resulting from different production structures. We consider consequences of differences in the development of economies understood in this sense. The straightforward is that the economies have different positions in FDI. One of them is the hosting country for the foreign multinationals, whereas the other economy engages in FDI abroad 3 . This displays the fact that the economies in such a set have different structures and thus different sources of development. The emerging country rather attracts the foreign producers to invest in it, the developed economy mainly engages in FDI.

To account for the kind of asymmetry concerned in this chapter, mainly differences in the production structures, we modify the framework from Chapter II. The asymmetry is regarded not only at the level of calibration, but also in the production structures of economies. We assume that in the home economy firms can only produce locally to sell domestically or to export, whereas firms from the foreign economy can also establish their multinationals abroad. In the set of two economies, where one is emerging and the other is developed, such a situation is closer to reality than assuming, that the economies have the same production structures.

We contribute to the existing literature, on DSGE models with heterogeneity in productivity of firms, by providing a framework in which economies are characterized by different production structures. [START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF] The home economy, referred to as the emerging one, has only two production structures, whereas in the foreign developed economy firms can choose among four different production strategies. On the one hand, it allows for considering asymmetric version of the model presented in the previous chapter. On the other hand, such assumption is closer to reality, when one regards trade relations between the emerging and the developed economies.

The way of accounting for asymmetry in the bilateral FDI relations matters for the results we get, when it comes to comparison of different model settings. Let us notice that asymmetric production structures, with two sectors in one economy and four sectors in the other, introduces different conditions for the economic agents, especially for the producers.

In two economies they experience different levels of competition, different sources 3 Ozawa [1992] proposes a model of economic development stages, according to which hosting the foreign FDI encourages domestic firms to establish their own subsidiaries abroad. Each economy experiences four phases of development. In the first stage, the development is driven by production factors then, in order ,by investment, innovations and wealth.

of competition, different possibilities of reaction when facing some exogenous disturbances.

As we will see, this matter for the results in terms of the economies' reactions to shocks, giving different trajectories of respective variables, comparing with the model from the second chapter.

The main aim of this chapter is to modify the previous framework, to account for the asymmetry at the construction level and to analyse consequences of such an assumption.

Model with asymmetry

As in the previous chapter we deal with a two country DSGE model of open economy, where each country is populated by homogenous consumers and a continuum of potential entrepreneurs. There exists labour mobility within each country and international immobility of workers. Prices are fully flexible.

We assume asymmetry in the production structure or more precisely in the choice of possible activities made by companies. This is what differentiates this model from the version presented in Chapter II. This approach is uncommon in the DSGE literature. Usually economies in DSGE models are treated as fully symmetric. This not the issue here. We allow for asymmetry on the assumption level.

From the point of view of formal construction we can regard set of assumptions about two economies which are different. The framework is not so rigid regarding economic reality.

Economic agents do not behave exactly the same in both economies. Not because they are different in their rationality or access to information but due to different conditions prevailing in the two economies. These differences can be of structural type.

We would also like to notice that the model of two economies should focus on bilateral relations. But data on them are often hard to obtain. The economic indicators concern mainly national or international variables. Even if we find some data for one economy, it can be still hard to find the analogous data for the other economy. Thanks to the asymmetric set of assumptions we can regard cases when one type of activity is very common in one country, but in the second it can be unusual or relatively negligible. Let us think that one economy invests much in the second one, but not inversely. Thus, we can expect that bilateral relations are highly asymmetric.

Evolution of the setting

The model presented in this chapter is a special case of the model from Chapter II. The microfoundations are essentially the same as before. The main assumption, that differs, is about production structures of economies. Earlier there were exactly the same in both The home emerging economy has two types of firms, thus two sectors of production.

One, with t DO N , firms, is focused on domestic selling only, the other, with t X N , firms, also exports. In the foreign developed economy there are four types of firms and four production sectors. Besides locally oriented and exporting firms, there are also multinationals. Some of them, which number is , * ,t I N delocalize part of their production abroad to sell there. The others, which number is , * ,t M N re-export back to their economy of origin. Table 3.2. below displays the differences between two countries resulting from the asymmetry in the ways of supplying goods by producers. derived by the multinationals that re-export [START_REF] Schorfheide | Bayesian Analysis of DSGE Models[END_REF] . Thus, in the developed economy there is more types of activities in which firms can engage in.

The asymmetric production structures assumption introduces also some differences in the consumption structures. In the home economy domestic consumers spend on varieties produced by foreign multinationals. Thus, in the home emerging economy one of the source of diversity in goods are, to a high degree, foreign firms. On the contrary, the domestic firms do not have such strong influence on the foreign goods diversity.

Consumers

The consumers behaviour does not change regarding the previous version of the model from Chapter II. As we will see, the asymmetry in the production structure introduces the main changes on the aggregate level, when it comes to concerning price indices in both economies.

But when we deal with the representative household, its decisions are shaped as before.

Intertemporal problem

The representative consumer faces the intertemporal problem of the form 6 :

{ } ), ( max 0 , , 0 1 1 t t t t t B x C C U E t T t t ∑ ∞ = ∞ = + + β (3.1)
by the budget constraint given as:

. ) ( ) 1 ( ) ( 1 1 , , , + + + + + = + + + + t t t E t D t t t t t t D t t t B x N N v C B r x N v L w π (3.2)
and the utility function relating positively utility with the level of consumption:

. 1 ) (

1 γ γ - = - t t t C C U (3.3)
From the Lagrange problem we derive the first-order conditions exactly the same as in the model without asymmetry and thus the standard Euler equations for shares and for bonds:

( ) , ) 1 ( ~1 1 1         +         - = + + - + t t t t t t v C C E v π δ β γ (3.4) ( ) [ ], ) 1 ( 1 1 γ γ β - + + - + = t t t t C E r C (3.5)
where we use the equation describing dynamics of the number of firms

). )( 1 ( , , 1 , t E t D t D N N N + - = + δ

Intratemporal problem

Comparing to the symmetric model of Chapter II, the asymmetric version displays the reduction of goods' types that are available for both economies. Earlier, in each economy there were four types of goods. In the model with asymmetric production structures there are only three types of goods. The home consumers cannot buy products of the home exporting multinationals localized abroad, because there is no such firms. The foreign buyers do not have access to goods produced by multinational firms from the emerging economy, because the home producers are not productive enough to engage in such form of activity.

Let us remind that the final good consumed by the household is the composite bundle of the form7 : [START_REF] Aguiar | Emerging Market Business Cycles: The Cycle Is the Trend[END_REF] One can find more about the intertemporal problem of the consumer in Chapter II. Computational details of derivations are analogous to the ones presented in Appendix A.2.1. (3.6) in which differentiated varieties are imperfect substitutes for each other.

, ) (

1 1 - Ω ∈ -         = ∫ σ σ ω σ σ ω ω d c C t t
From the assumption that intermediary goods are produced by monopolistically competitive producers we get the demand function for a single variety: . ) ( ) (

t t t t C P p c σ ω ω -       = (3.7)
Goods available for consumers in home economy come from three sectors. The emerging economy is influenced by the asymmetry in the production structures.

Composition of consumption bundles in both countries indicates that the goods diversity is originated more from the foreign economy than from the home one. But the developed economy is also affected by the fact, that the emerging economy has no multinationals localized abroad. The foreign producers selling domestically and foreign exporting multinationals do not have to compete with the home firms engaged in FDI. The home consumers buy from the foreign exporters and the foreign multinationals, whereas the foreign buyers spend only on the imported goods from the other economy and on products offered by their firms. Thus, the home and the foreign economies have different significance in shaping composition of consumption bundles and diversity of goods in both countries.

Firms

Unlike in the model from Chapter II the production structure in two economies is asymmetric now. Domestic firms produce to sell domestically or to export. Foreign firms have wider choice of possible economic activities. They can also localize their production abroad to sell on home or foreign market

Production

Each domestic firm face variable cost

t t t Z z l y ) ( ) ( ) ( ω ω ω = of hiring labour to produce ) (ω t y
units of variety .

ω If it decide to export then every period it also has to pay fixed cost

t t X t Z f W / ,
of engaging in such an activity. In the foreign economy, depending on entrepreneur decision where to localize production and where to sell, he can face also fixed cost of hiring t I f , workers per period to carry out foreign direct investment or hiring t XM f , workers to produce abroad and export back to his economy.

The aggregate productivity t Z representing the effectiveness of one labour unit follows a stochastic autoregressive process:

, ) 1 ( , 1 t Z t Z Z t Z Z ε ρ ρ + + - = - ), , 0 ( ~2 , Z t Z N σ ε i.i.d. ,t Z ε (3.14)
On the firm level there is also idiosyncratic productivity z specific for the given company and meaning production of t zZ units of output per unit of labour employed:

, ) ( ) ( , , t t D t D zZ l y ω ω = . ) ( ) ( , 1 , t t X t t X zZ l y ω τ ω - = (3.15)
Foreign firms also have their relative productivity and use the labour with productivity on the economy level t Z or * t Z depending where they localize their production:

, ) ( ) ( * * * , * , t t D t D Z z l y ω ω = , ) ( ) ( * * * , 1 * * , t t X t t X Z z l y ω τ ω - = (3.16) , ) ( ) ( * , * , t t I t I Z z l y ω ω = . * , 1 * , ) ( ) ( t t M t t M Z z l y ω τ ω - = (3.17)

Dynamics of firm entry and exit

As in the previous version of the model from Chapter II we have producing firms and the new companies that only enter the market to start the production one period after. The cost of entry means hiring t E f , units of effective labour of which we assume it follows autoregressive stochastic process:

, ) 1 ( , 1 , , t f t E f f t E E E E f f ε ρ ρ + + - = - ), , 0 ( ~2 , E E f t f N σ ε i.i.d. ,t f E ε (3.18)
The number of firm dynamics accounts for producers and new entrants, all of them facing constant exogenous probability ) 1 ( δ of survival in the each period:

).

)( 1 ( 1 , 1 , , - -+ - = t E t D t D N N N δ (3.19)
Free entry condition requires that:

. / ~,

t t E t t Z f w v = (3.20)

Sectorial distribution

Firms producing various intermediary goods are monopolistically competitive, thus they can determine their prices according to the profit maximization. The profit function form depends on which activity the firm is engaged in. Serving home market gives:

), ( ) ( ) ( , , , , ω ω ω t D t t t D t D t D y z Z W y p - = Π (3.21) ) ( ) ( ) ( * , * * * * , * , * , ω ω ω t D t t t D t D t D y z Z W y p - = Π (3.22)
Firms with higher relative productivity can choose also to export when it is profitable considering iceberg trade cost and fixed cost of exporting which evolves as follow:

, ) 1 ( , 1 t t t τ τ τ ε τ ρ ρ τ + + - = - ), , 0 ( ~2 , τ τ σ ε N t i.i.d, ,t τ ε (3.23) , ) 1 ( 1 , , t f t X f fx f t X X X X f u f ε ρ θ ρ + + - = - i.i.d. ,t f X ε (3.24)
The resulting profit from exporting is:

, ) ( )] ( ) ( [ , , , , , t X t t t X t t t t X t X t t X f Z W y z Z W y p e - - = Π ω τ ω ω (3.25) , ) ( )] ( ) ( [ 1 * , * * * , * * * * * , * , * , t X t t t X t t t t X t X t t X f Z W y z Z W y p e - - = Π ω τ ω ω (3.26)
where t e stands for a nominal exchange rate [START_REF] Ball | Real Rigidities and the Non-neutrality of Money[END_REF] .

In the foreign economy there is also possibility for the entrepreneurs to invest abroad either to sell on the market of the affiliate localization or to export back to the own country. [START_REF] Ball | Real Rigidities and the Non-neutrality of Money[END_REF] In a monetary union the nominal exchange rate is equal to one. For the general presentation of the two economies we do not omit this term, but for the sake of studying the case of the monetary union and real adjustment only we set . 1 = t e Such firms have to be even more productive in terms of the heterogeneous productivity because they face fixed cost engaging in FDI and re-exporting, respectively:

, ) 1 ( , * 1 , * , * * * * t f t I f f f t I I I I I f u f ε ρ θ ρ + + - = - i.i.d., , * t f I ε (3.27) , ) 1 ( , * 1 , * , * * * * t f t XM f f f t XM XM XM XM XM f u f ε ρ θ ρ + + - = - i.i.d. , * t f XM ε (3.28)
The profits functions account for all costs and nominal exchange rate in case of exporting: In the home economy there are two strategies of getting profits, mainly domestic selling and exporting with optimal nominal prices:

, ) ( ) ( ) ( 1 * , * , * * , * , * ,       - - = Π t I
, ) ( , z Z W p t t t D µ ω = . ) ( , z Z W e p t t t t t X µ τ ω = (3.31)
When it comes to the foreign economy there are four possible strategies for companies, including also producing and selling abroad and re-exporting to the own country.

The firm with sufficiently high relative productivity choose from these activities assuming optimal prices: , ) ( Similarly, the optimal profits can be expressed in real terms, depending on which country the given firm comes from, thus accounting for the price index of the mother company location:

, ) ( 1 ) ( ) ( 1 , , , t t D t t D t D C P ω ρ σ ω ω π σ - = Π = (3.37) , ) ( ) ( ) ( , * 1 , * , , , t t X t t t X t t t t t X t t X t X Z f w C Q Q P e P - = ⋅ Π = Π = -ω ρ σ ω ω π σ (3.38) , ) ( 1 ) ( ) ( * 1 * , * * , * , t t D t t D t D C P ω ρ σ ω ω π σ - = Π = (3.39) , ) ( 1 ) ( ) ( * * , * 1 * , * , * * , * , t t X t t t X t t t t t X t t X t X Z f w C Q e P Q P - = ⋅ Π = Π = -ω ρ σ ω ω π σ (3.40) , ) ( 1 1 ) ( ) ( * , 1 * , , * * , * ,         - = Π = Π = - t t I t t t I t t t t I t t t I t I Z f w C Q P Q e P ω ρ σ ω ω π σ (3.41) ). ( ) ( 1 ) ( ) ( * , * , * 1 * , * * , * , t XM t I t t t t t M t t M t M f f Z Q w C P + - = Π = - ω ρ σ ω ω π σ (3.42)

Productivity distribution

Upon entry, home firms draw their productivity level z from a common Pareto distribution Productivity distribution is the framework by which we can regard heterogeneity among firms. They can have various productivity levels and thus decide in which economic activity to engage. The choice is always conditional on that the firm has the required relative productivity high enough to be profitable in the given strategy of producing and selling. Firms from the home economy can choose selling market. It can be only domestic or also foreign when they decide to export. Whereas foreign companies have more possibilities and can decide where to localize their production and where to sell. It can always be the economy of their own country or the market abroad. The companies in the given economy differentiate the risk coming from condition on local markets. As we see, in the framework assumed the home economy has much less possibilities to insure again such risk. Such a microeconomic framework, namely the production distribution, describing how an individual firm makes its decisions about entering the market and engaging in the given economic activity, determines scale of particular production sectors and composition of consumption bundles in both economies. Thus, it shapes relations at the macro level.

     < ≥ = + , , 0 , , ) ( min min 1 min z z z z z z k z g k k (3.43)      < ≥       - = = ∫ . , 0 , , 1 ) ( ) (
       < ≥         - = = ∫ . , 0 , , 1
Percentage shares of sectors in the production of the whole economy influence long-term relations of most of the model variables, and thus their dynamic paths.

Cutoff points

In the home economy firms depending on their relative productivity can choose only between two economic activities. Thus, there is only one cutoff point resulting from equalizing profits in the exporting strategy to zero:

, 0 ) ( 1 1 * , , , t t t t t t X t X t X Z Q w C f z τ µ σ ω π µ σ                 = ⇔ = - (3.47)
Firms in the foreign economy can decide among four strategies. Only domestic producing and selling is possible for all entrepreneurs with the heterogeneous productivity higher than .

* min z To engage in one from the three other activities the foreign firm has to exceed following cutoff points of the productivity levels:

, * * * 1 1 * , * , t t t t t t X t X Z w Q C f z τ µ σ µ σ                 = - , 1 1 * , * , µ σ µ σ                 = - t t t t I t I Z w C f z (3.48) . ) ( 1 1 * , * , * * , t t t t t XM t I t t M Z Q w f f C z τ µ σ µ σ                 + = - (3.49)
Each cutoff point determines the number of firms, average productivity, relative optimal price and profit in the given strategy. In the home economy the firm decides to entry the market if its relative productivity is high enough to ensure positive profit after taking into account the annualized fixed cost

Entry mode

) (z t π z min z t X z , ) ( , z t D π ) ( , z t X π t t E t Z f w / , θ - t t X t Z f w / ,
of entry. If it has sufficiently high productivity level, it can also regard starting to export.

Otherwise, exporting would reduce the profit so that such an activity would not be profitable.

Figure 3.2. Entry mode in the foreign economy

Source: Author's illustration

In the foreign economy a firm also decides to engage in the given economic activity depending on its idiosyncratic productivity. Only if the productivity level exceeds a cutoff point attributed to the given strategy, then the firm starts to export, locates its production abroad to sell there or to export back to its own country economy. The relative productivity has to be high enough to bring positive profits from such activities.

The graphs in Figures 3.1 and 3.2 should be interpreted in the following way. When a firm has a low productivity level, below the cutoff point t X z , (or * ,t X z in case of a foreign firm), then it makes a profit only from domestic production and selling. When the firm productivity exceeds the cutoff level, then it chooses to engage in exporting and starts to benefit from two kinds of economic activity. The exporting becomes the additional source of profit.

In the home economy the most productive firm export, while the most productive foreign producers choose to engage in FDI and sell abroad or re-export back to their own ) 0 (

* ,t D π ) 0 ( * ,t X π ) 0 ( * ,t I π ) 0 ( * ,t M π * ,t X z * ,t I z * ,t M z * z * min z ) ( * * , z t D π ) ( * * , z t M π ) ( * * z t π ) ( * , z t I π ) ( * , z t X
π country. This emphasizes differences between economies regarding conditions in which firms operate. In the home economy these domestic producers, that are focused on the domestic selling only, have to compete with foreign multinationals. The domestic exporters compete with the foreign multinational ones, which localized their production in the home economy. Thus, there is more sources of competition for the home producer than for the foreign ones.

Aggregation and international variables

After describing the behaviour of individual agents in the economy, especially the way the individual intermediate firm takes its decisions and how it determines the values of variables characterizing the given firm, we proceed with aggregated variables. The first step in the aggregation is to obtain sectorial average values.

We consider two economies that vary in the levels of development, in the sense of number of the more productive companies. Let us remind, that in Chapter II these differences were only in the steady state values for various sectors of both economies.

As we could see, the results of simulations did not give us the significant consequences for the analysis of the behaviour of the economies. Whereas here, what we regard, is the structural difference between two economies in the model. The asymmetric production structures assumption affects the form of the national variables in both economies. Most of them are averages of variable values for all sectors weighted with shares of these sectors in the economy. The international variables express bilateral conditions for the economies and are obtained as ratios of the respective home and the foreign variables. Their form is also influenced by the differences in the production structures.

Sectorial aggregation

Let us remind that we impose asymmetric production structure in the model. In the home economy there are only possibilities to produce at home and sell on the home market or on the foreign exporting market. Firms from the foreign economy have wider choice, as it was in the version of the model from chapter II. We can identify such situation with higher or lower level of development in terms of the heterogeneous productivity of firms in the economy.

When it comes to averaging we get two average values for the home economy and four for the foreign one. All of them are obtained by integrating productivity, profit or price functions times probability density function of Pareto distribution [START_REF] Bernard | Plants and Productivity in International Trade[END_REF] . Among all t D N , firms in the home economy we can distinguish two types. There is t DO N , firms which serve only domestic market and t X N , that also export. Their numbers depend on how many of them have the idiosyncratic productivity high enough to engage in exporting. Thus, they depend on the Pareto distribution parameters. Each of these numbers is computed as a share in the total mass t D N , of firms in the economy by using the appropriate domain of integrating from the Pareto distribution support:

, 1 ) ( , min , , min k t X z z t D t DO z z dz z g N N X         - = = ∫ (3.50) , ) ( , min , , k t X z t D t X z z dz z g N N X         = = ∫ ∞ (3.51)
Similarly, the numbers of foreign firms in the given strategy of production and selling [START_REF] Bernard | Plants and Productivity in International Trade[END_REF] To compute this values we use definitions of the probability density and the cumulative distribution functions of the Pareto distribution given in (3.43)- (3.46). Computations are conducted in the way consistent with the one presented in Appendix A.2.8-A.2.12 for the respective variables used in Chapter II.

∫         -         = = I X z z k t I k t X t D t X z z z z dz z g N N (3.
∫         -         = = M I z z k t M k t I t D t I z z z z dz z g N N (3.54) . ) ( * * , * , * min * * * * , * , k t M z t D t M z z dz z g N N t M         = = ∫ ∞ (3.55)
We can notice then that the total mass of firms in the whole economy can be composed as follows, respectively regarding the home and the foreign economy: which also export to the foreign market:

. ) ( ) ( , , , , min t D z z z t X t DO t D N dz z g dz z g N N N X X ⋅       + = + = ∫ ∫ ∞ (3.56) = + + + = * , * , * , * , * , t M t I t X t DO t D N N N N N . ) ( ) ( ) ( ) (
, ) 1 ( ) ( ~min 1 1 min 1 1 1 1 1 , , , min z z k k z dG z N N z z t D t D t D - - - ∞ - ∇ = ⋅       - - =       = ∫ σ σ σ σ σ (3.58) . ) ( ~, 1 1 1 1 1 , , , t X z t X t D t X z z dG z N N z X - - ∞ - ∇ =         = ∫ σ σ σ (3.
z z k k z dG z N N z z t D t D t D - - - ∞ - ∇ = ⋅       - - =         = ∫ σ σ σ σ σ (3.60) , ) ( ~* , * , * , 1 * , * , 1 * , 1 1 * 1 1 * 1 * * , * , * , * *         - - ∇ =         = - - - - - ∫ k t X k t I k t X t I k t I t X z z t X t D t X z z z z z z z dG z N N z I X σ σ σ σ σ (3.61) , ) ( ~*, * , * , 1 * , * , 1 * , 1 1 * 1 1 * 1 * * , * , * , * *         - - ∇ =         = - - - - - ∫ k t I k t M k t I t M k t M t I z z t I t D t I z z z z z z z dG z N N z M I σ σ σ σ σ (3.62) . ) ( ~* , 1 1 * 1 1 * 1 * * , * , * , * t M z t M t D t M z z dG z N N z M - - ∞ - ∇ =         = ∫ σ σ σ (3.63)
Average firm profits are also obtained by integrating over Pareto distribution and express the average profits from the given economic activity. In case of the emerging home economy these are:

, ) ( ) ( ~1 1 , , , min σ σ µ σ π π - - ∞         = = ∫ t t t t D z t D t D Z w C z z dG z (3.64) . ) 1 ( ) ( ) ( ~, , , t X t t t z t X t X f Z Q w z dG z X - ∇ = = ∫ ∞ π π (3.65)
In the developed foreign economy firms get average profits from four economic activities:

, ) ( ) ( ~1 * * * 1 * , * * * , * , * min σ σ µ σ π π - - ∞         = = ∫ t t t t D z t D t D Z w C z z dG z (3.66) , 1 ) ( ) ( ~** , * * 1 8 * * * * * , * , * * * * * t t X t k t k t k t t k t z z t X t X Z f w TOL TOL z dG z I X ⋅         - - Λ Λ - Λ ∇ = = - - ∫ µ σ µ σ π π (3.67) , 1 1 ) ( ) ( ~*, * 1 * * * * * * , * , * * * * t t t I t k t t k t z z t I t I Z Q f w z dG z M I ⋅         - - - ∇ = = - ∫ κ κ κ π π σ (3.68) ), ( ) 1 ( , ) ( ) ( ~* , * , * * * * , * , * t XM t I t t t z t M t M f f Z Q w z dG z M + - ∇ = = ∫ ∞ π π (3.69)
where:

, 1 * 1 1 * , * , * - -         = Λ t t X t I t f f τ σ , * * t t t t t t w Z Z w Q TOL = . 1 1 * * , 8 , * , * t t t t t I t XM t I t Q C C f f f τ κ µ σ - -         ⋅ + = (3.70)
Choosing given strategy each firm sets price of its variety and gain profits from different business activities. Thus, average profit of the firm in the home and foreign economy can be expressed respectively as:

, ) ( ) ( ) ( ) ( ~, , , , , , min t X t D t X t D z z t X t D t N N z dG z z dG z X π π π π π + = + = ∫ ∫ ∞ ∞ (3.71) = + + + = ∫ ∫ ∫ ∫ ∞ ∞ * * * * min * * ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ~* * * , * * * , * * * , * * * , * M M I I X z t M z z t I z z z t X t D t z dG z z dG z z dG z z dG z π π π π π . ~* , * , * , * , * , * , * , * , * , * , t M t D t M t I t D t I t X t D t X t D N N N N N N π π π π + + + = (3.72)
Each strategy of producing and selling is characterized also by the average price which depends on average productivity level of firm using this strategy:

, ) ( ) ( ~, min 1 1 1 1 1 , , , , min t t D t t t z t D t D t D t D Z z w Z z w z dG z N N µ µ ρ ρ σ σ σ = ∇ =         = - - ∞ - ∫ (3.73) , ) ( ) ( ~, , 1 1 1 1 1 , , , , t t X t t t t t X t t t z t X t X t D t X Z z w Q Z z w Q z dG z N N X µ τ µ τ ρ ρ σ σ σ = ∇ =         = - - ∞ - ∫ (3.74)
It is worth to notice that average price setting by the firm in the given production sector depends not only on its idiosyncratic productivity, but also on conditions on the market where the firm localizes its production, on the aggregate productivity and real wage in the economy:

, ) ( ) ( ~* * , * * * min * 1 1 * 1 1 * * 1 * , * , * , * , * min t t D t t t z t D t D t D t D Z z w Z z w z dG z N N µ µ ρ ρ σ σ σ = ∇ =         = - - ∞ - ∫ (3.75) , ) ( ) ( ~* * , * * 1 1 * * 1 * , * , * , * , * * t t X t t t Z z t X t X t D t X Z z w Q z dG z N N I X µ τ ρ ρ σ σ =         = - - ∫ (3.76) , ) ( ) ( ~*, 1 1 * * 1 * , * , * , * , * * t t I t Z z t I t I t D t I Z z w z dG z N N M I µ ρ ρ σ σ =         = - - ∫ (3.77) . ) ( ) ( ~* , * , 1 1 * 1 1 * * 1 * , * , * , * , * t t M t t t t t M t t z t M t M t D t M Z z w Q Z z w Q z dG z N N M µ τ µ ρ ρ σ σ σ = ∇ =         = - - ∞ - ∫ (3.78)
Average amounts of labour hired in different sectors are given by: ,

) 1 ( ~, , t t D t D w l π σ - = , ) 1 ( ~, , ,       + - = t t X t t X t X Z f w l π σ (3.79) , ) 1 ( ~*, * , ,         + - = t t I t t I t t I Z f w Q l π σ . ) 1 ( ~* , * , * , ,       + + - = t t XM t I t t t M t M Z f f w Q l π σ (3.80) , ) 1 ( ~* * , * , t t D t D w l π σ - = . ) 1 ( ~* * , * * , * ,         + - = t t X t t X t X Z f w l π σ (3.81)
By sectorial activities we denote variables that express income of firms from the given type of economic activity. In the home economy there is only one type of sectorial activity of firms, the exporting one:

, ~1 , , * , σ ρ - = t X t X t t t X N C Q A (3.82)
whereas in the foreign economy there are three types of sectorial activities of firms:

σ σ σ ρ ρ ρ - - - = = = t M t M t t t M t I t I t t I t X t X t t X N C Q A N C A N C A (3.83)
The shares of expenditures express how much consumers in the given economy spend on goods produced and sold by domestic firms at home market, imported, of foreign multinationals producing at home and of domestic multinationals producing abroad. They are given as follows:

σ σ σ ρ ρ ρ - - - = = = 1 * , * , , 1
Z f f N Z f N Z f N Z f N Z f f w Q N Z f w Q N Z f w N w N L + + + + + +         + + - +         + - + +       + - + - = π σ π σ π σ π σ (3.97) . ) 1 ( ) 1 ( * * , * , * * , * , * * , * * , * , * * , * , * t t X t X t t E t E t t X t t X t X t t D t D D t Z f N Z f N Z f w N w N L + +         + - + - = π σ π σ ( 3
t M t I t X t D t M t M t I t I t X t X D t D t t N N N N z N z N z N z N Z Z + + + + + + = (3.99) . * , * , * , * , * * , * * t X t D t X t X D t D t t N N z N z N Z Z + + = (3.100)

Macro aggregation: International variables

The variables, which express bilateral trade and labour hiring conditions between both economies, are the exchange rates, the terms of labour, the terms of trade and the non-traded to traded price ratios.

σ σ σ ρ ρ ρ - - - + + = t M t M t X t X t D t D N N N (3.104)
In the symmetric model of Chapter II each price index consisted of four terms and was influenced by the average prices set by firms of all types, the home and the foreign ones.

In the asymmetric framework, the home price index depends on the domestic firms, the foreign exporters and the foreign multinationals. The foreign price index depends on the foreign firms, the home exporters and the foreign exporting multinationals. Thus, the form and the value of both price indices is highly affected by the foreign firms, their numbers and prices.

We define two forms of the real exchange rate, on the CPI basis, as well as on the welfare basis. The difference is that the CPI-based real exchange rate t q does not account for changes in the number of varieties available to consumers, whereas the welfare-based real exchange rate t Q does. Different behaviour of these two rates in response to exogenous shocks reveals the variety effect, that means the fact that consumers derive their utility also from the product diversity.

The welfare-based real exchange rate

, , * , 1 σ σ σ σ σ σ τ τ τ - - - - - -         +         +         +         +         = t I t D t I t X t D t t t X t D t M t D t t M t X t D t t X t D t D t t D t z z N z z TOL N N z z N z z N z z TOL N Q (3.105) 1 , , * , 1 , , , 1 *
In case of the asymmetric model, the welfare-bases real exchange rate t Q does not depend on the domestic multinational firms, because we assumed that such firms do not exist in the home emerging economy. Thus, the welfare-based RER is not affected by numbers of such firms, neither their idiosyncratic productivities. Moreover, the terms of labour appear only twice in the terms of the expression (3.105), whereas in the symmetric construction they occurred four times.

The CPI-based real exchange rate as a function of terms of labour and ratios of average productivities it is given as follows:

, ~~~*

I t D t I t X t D t t t X t D t M t D t t M t X t D t t X t D t D t t D t N N z z N z z TOL N N z z N z z N z z TOL N q ⋅         +         +         +         +         = - - - - - - σ σ σ σ σ σ τ τ τ (3.106) 1 * , , * , 1 * , , * * , , 1 , , * , 1 , , , 1 * , , * , 1 t t t
where diversity of available products is given as

* , * , , t I t X t D t N N N N + + = in the home economy and * , , * , * t M t X t D t N N N N + + =
in the foreign economy.

Dealing with the asymmetric framework, it is worth highlighting, that product diversity in both economies is highly influenced by the foreign firms and, to a lesser degree, by the home firms. In the context of comparison of the two forms of the real exchange rate, we can notice that if the consumer derives higher utility from the same level of consumption, it can be likely caused by the diversity of products offered by the foreign firms.

Let us remind that the terms of labour is equal to the relative effective labour cost:

. * * * * t t t t t t t t t t t w Z Z w Q W Z Z W e TOL = = (3.107)
To compare the two economies in the model we can use also the terms of trade and the non-traded to traded price ratios: ,

, t M t M t t X t X t X t t M t X t N Q N Q N N TOT ρ ρ ρ + ⋅ + = (3.108) , ~* , * ) ( * , * , * , * , , * , *
M t M t X t X t I t I t D t D t I t D t M t X t t t N N N N N N N N Q NTT ρ ρ ρ ρ τ + + ⋅ + + ⋅ = (3.109) . ~* , * , * * t X t D t t t Q NTT ρ ρ τ ⋅ = (3.110) , , , * , * , , , * , , * , , t
As we can see, in the asymmetric model, the home and the foreign non-traded to traded price ratios have different forms, due to the asymmetric production structures. The home t NTT is affected by foreign multinationals, their numbers and average prices. The foreign * t NTT depends only on the foreign firms' prices.

General equilibrium and model summary

As in the symmetric model, here when dealing with asymmetry in the production structure we have to constitute the whole theoretical model. To do that we take into account rules according to which all the regarded economic agents and markets behave. Among them there are also macroeconomic balance conditions where the asymmetry significance appears quite clearly. Still the model in its asymmetric version can be closed by the balanced current account condition.

According to the labour market clearing:

, D t S t L L L = = , * * * D t S t L L L = = ( 3
* t M t M t t I t I t t X t X t t M t M t t t X t X t t N Q N Q N C N C Q N C Q π π ρ ρ ρ σ σ σ + + = + - - - (3.112) * , * , 1 * , * , 1 * , * , * 1 , ,
which allows us to close the model. We can notice that the value of home exports must be equal to the value of foreign exports plus profits from foreign multinationals.

We define equilibrium as a sequence of quantities:

{ } { } , , , , , , , , , , , , , , , , 0 * * * , , * , * , * , , * , , * , , *
* 0 ∞ = ∞ = Λ = t t t t M t X t M t I t X t X t D t D t E t E t t t t t t z z N N N N N N N N C C Y Y κ Q (3.113)
and a sequence of real prices:

{ } { } , , , , , , , , ~, , , , , , , , , , , , , , 0 * , * , * , , * , , * , * , * , , * , , *
* * * 0 ∞ = ∞ = = t t t t M t I t X t X t D t D t M t I t X t X t D t D t t t t t t t t t t TOL Q v v r r w w ρ ρ ρ ρ ρ ρ π π π π π π π π P (3.114) such that: (i)
For a given sequence of prices { } ∞ =0 t t P and the realization of shocks

{ } { } ∞ = ∞ = = 0 * * , * , * , , * , , * 0 , , , , , , , , ,
t t t t XM t I t X t X t E t E t t t t f f f f f f Z Z τ τ S , the sequence { } ∞ =0 t t
Q respects first order conditions for domestic and foreign households and maximizes domestic and foreign firm profits. • labour market clearing that means the equalization of labour supply and labour demand,

• goods market equilibrium that means the equalization of aggregate output with aggregate consumption and investment.

Table 3.3. Asymmetric model summary

Price indices

σ σ σ ρ ρ ρ - - - + + = 1 * , * , 1 * , * , 1 , , 1 t
I t I t X t X t D t D N N N (3.115) σ σ σ ρ ρ ρ - - - + + = 1 * , * , 1 , , 1 * , * , 1 t
M t M t X t X t D t D N N N (3.116) Total average profit t X t D t X t D t N N , , , , π π π
+ = (3.117) * , * , * , * , * , * , * , * , * , * , * ~t M t D t M t I t D t I t X t D t X t D t N N N N N N π π π π π + + + = (3.118) Free entry t t E t t Z f w v , ~= (3.119)
* * , * * ~t t E t t Z f w v = (3.120) Sectorial profits t X t t t t X f Z Q w , , ) 1 ( ~-∇ = π (3.121)
* * , * * 1 8 * * * , 1 ~* * * t t X t k t k t k t t k t t X Z f w TOL TOL ⋅         - - Λ Λ - Λ ∇ = - - µ σ µ σ π (3.122) t t t I t k t t k t t I Z Q f w * , * 1 * * * * , 1 1 ~* * ⋅         - - - ∇ = - κ κ κ π σ (3.123) ) ( ) 1 ( ~* , * , * * , t XM t I t t t t M f f Z Q w + - ∇ = π (3.124) Sectorial shares of firms 1 , min , , ~-∇         = σ k k t X t D t X z z N N (3.125) ( ) 1 * * * * * , * , * , * , - Λ = -k t k t k t t D t M t D t X TOL N N N N µ κ (3.126) ( ) 1 * * * , * , * , * , - = k t t D t M t D t I N N N N κ (3.127) 1 * * , * min * , * , * * ~-∇         = σ k k t M t D t M z z N N (3.128) Number of firms ) ) ( 1 ( 1 , 1 , , - -+ -
= t E t D t D N N N δ (3.129) ) )( 1 ( * 1 , * 1 , * , - -+ - = t E t D t D N N N δ (3.130)
Euler equations for bonds

( ) [ ] γ γ β - + + - + = 1 1 ) 1 ( t t t t C E r C (3.131) ( ) [ ] γ γ β - + = - + = * 1 * 1 * ) 1 ( t t t t C E r C (3.132)
Euler equations for shares ( )

        +         - = + + - + 1 1 1 ) 1 ( ~t t t t t t v C C E v π δ β γ (3.133) ( )         +         - = + + - + * 1 * 1 * * 1 * ) 1 ( ~t t t t t t v C C E v π δ β γ (3.134) Aggregate accounting t t E t t D t t v N N L w C , , - + = π (3.135) * * , * * , * * * ~t t E t t D t t v N N L w C - + = π (3.136) Balanced current account * , * , * , * , 1 * , * , 1 * , * , * 1 , , * ~t M
t M t t I t I t t X t X t t M t M t t t X t X t t N Q N Q N C N C Q N C Q π π ρ ρ ρ σ σ σ + + = + - - - (3.137)
Source: Author's calculations

The equations in Table 3.3. constitute a system of 23 main equilibrium conditions of the model in 23 endogenous variables: ,

* t X t X t D t D t E t E t t t t N N N N N N w w π π * * * * , * , , , , , , , , , * , , * , , * , , *
t t t XM t I t X t X t E t E t t f f f f f f Z Z τ τ , , * , , * , , , , , , , , ,
. All remaining variables in the system are auxiliary variables or they can be expressed by means of average productivity levels.

Steady state analysis

Because we solve each version of the model by log-linearization, here we also have to derive the whole steady state. It is a necessary step of finding solution to the model equation system.

But yet the steady state itself can give us some information about long-run tendencies regarding comparison of both economies.

The steady state exists and is unique because, depending on parameters, there is only one set of steady state values [START_REF] Blanchard | The Solution of Linear Difference Models under Rational Expectations[END_REF] . Of course due to the asymmetry in the production structure the steady state is asymmetric even if we impose the same values of respective parameters for both economies. So here we do not distinguish different calibrations. What we actually tend to do is to calibrate parameters so that to replicate very similar steady state relationships as were found in the symmetric model in Calibration 3 [START_REF] Blanchard | Monopolistic Competition and the Effects of Aggregate Demand[END_REF] . Let us remind that the impulseresponse analysis for the symmetric model with different calibrations did not suggested significant differences in reaction of variables in both economies to the shocks. Regarding some noticed discrepancies they all resulted only from the asymmetric values of parameters shaping in the first place the shares of production sectors in the economy.

The most noticeable difference was the various strength of the variety effect. There were no more significant qualitative different results. Whereas the quantitative discrepancies in IRFs were explained by controlling for parameters.

When coming to the asymmetric model, where we regard the asymmetry in the production structure, one can expect more differences in the model dynamics. The resulting comparison of impulse-response functions then will be influenced by the form of relations enclosed in the equation system of the model.

In the part with the impulse-response analysis we will compare the results of asymmetric model of this chapter and the symmetric one of Chapter II in its asymmetric Calibration 3. To have the basis for such a comparison we have to impose very similar steady state relationships in both versions of the model so that the comparison would not be biased by different shares of production sectors. Let us remind that these theoretical variables serve as proxies for some economic indicators whose values can be found in the data. We focus on these shares because in our model the assumption about heterogeneous productivity is crucial. It gives the possibility to consider different types of economic activity, different shares offirms of the given type in the economy and also introducing the asymmetry between two economies in this regard. Besides these theoretical variables have their empirical counterparts and can be perceived as determinants of development level of the economy and especially as determinants of trade configuration between two economies.

Values of parameters

The asymmetric values of parameters for both economies are not anymore necessary to get the asymmetric steady state. Thus, we concentrate on such a calibration which will give the very similar steady state relationships as in Calibration 3 of the symmetric model. Calibration 3 used for the previous symmetric model will serve as a benchmark here. Thus, the starting point are values of parameters taken in Calibration 3. Then we control for values of the parameters which shape number of firms in the given sector of production. There are two sectors in the home economy and four in the foreign economy.

We concentrate on parameters shaping shares of sectors to replicate some data on Polish and German economies regarding exports and the foreign direct investment. The share of exporting firms we use some arbitral division [START_REF] Bourrinet | Les paradoxes de la zone euro[END_REF] . Table 3.4. presents the starting and final values of parameters in calibrations used for the asymmetric model.

The first step in the calibration of the asymmetric model parameters is to use the values of Calibration 3, which was set for the symmetric model to get different sectorial shares for both economies, related to the data. Then, we control for all parameters which shape the sectorial shares, that means all parameters specified in Table 3.4. By controlling for these parameters, we finally obtain the steady state sectorial shares, which are comparable with the situation presented in the symmetric model of Chapter II. This way, studying the IRFs, we can compare results obtained from the symmetric and asymmetric versions of the model. The objective is to contrast these two situations on the basis of the same shares of production sectors.

The values from Table 3 The asymmetric version of the model requires that the foreign firms are less dispersed in their idiosyncratic productivity levels, in comparison to the home firms. It is due to the fact, that the dispersion in the home firms is within two sectors of production, and in the foreign firms within four sectors. Values of the rest of parameters are in line with the standard literature of DSGE models and presented in Table 3.5. These are the subjective discount factor, the probability of "death" of a firm, the parameter of relative risk aversion and the symmetric constant elasticity of substitution across goods. For the given set of parameters we get always only one set of steady state values of variables. They show long-run tendencies resulting from the dynamics of the model and used values of parameters. Our aim was to obtain the home economy less developed and the foreign one more developed in terms of numbers of firms engaged in the foreign direct investment.

Steady state relationships of variables

The given set of calibrated parameters gave us the desired shares of sectors in both economies. It also affected all the other steady state values and relationships which are shown in Table 3.6.

It is worth noticing that in the asymmetric setting, that means in the asymmetric model with the calibration specified as in Table 3.4, it is easier for foreign multinationals to enter the market abroad because they do not to have so high average productivity I z ~ comparing to the symmetric model. These foreign companies can be considerably less productive than home firms. The analogous case is for foreign multinationals exporting back to their country's economy compared with the home exporters. They do not have to be so highly productive relatively to the situation in the symmetric model with the asymmetric Calibration 3.

The level of the average productivity of home producers Z ~ is affected by the presence of foreign firms engaged in FDI in the home economy. There is no such multinationals located in the foreign country. Thus, the average productivity of home producers is much higher than the average productivity of foreign firms. Let us remind that the steady state aggregate productivity on the economy level was calibrated so that to be higher in the foreign economy. Another interesting long-term tendencies are noticeable in Table 3.7. They concern trade conditions between two economies. It should be highlighted here that we consider the system of two economies only, without regarding connections with the rest of the world.

Thus, regardless the fact the economies are open, the system of two of them is closed and the 15 Because we assume that in the home economy there are only two production sectors, we compute the steady state value of We can notice that in the asymmetric model the steady state level of the domestic GDP is one and half times lower than foreign GDP. The discrepancy is even more higher as one regards the level of GNP. Of course it is not the basis of comparison of the asymmetric and symmetric model because in the letter we did control for values of parameters so that to have the same steady state values of variables for both economies. In case of the asymmetric model it was no longer possible due to the different dynamic relations for the economies.

The shares of sectors in the whole mass of firms in the economy are very similar for both versions of the model. This is not the case for the shares of expenditures which are significantly different. In the asymmetric model in this closed system of two economies the home one is more open to the foreign comparing to the symmetric model and the foreign economy is more closed. It means that the buyers in the home economy spend a lot on goods produced by the foreign companies, whereas the foreign consumers spend much on commodities produced by firms from their own country.

Impulse-response analysis

Our aim is to analyse and interpret the results from the asymmetric model. We would like to find out if the conclusions will be more consistent with the intuition than in the case of symmetric model with the asymmetric calibration. Thus, we will verify the significance of introducing the different dynamic equations for both economies in the sense of the model explanatory abilities. First we will analyse the IRFs for the asymmetric model then compare them with the results from the previous chapter. Finally we will discuss the sources by which the adjustment of variables is carried.

The first step to solve the equation system of the model is to linearly approximate it. We do that through the log-linearization. It is one of the necessary stages to get the impulse-response functions. What we are the most interested in is the theoretical form of the model which we presented in the previous part of this chapter, the steady state analysis and the results in the form of the IRFs with their interpretation. The log-linearization of the model equations is essential for computations and not to be specified directly. But presentation of the log-linearized system helps in explaining the dynamics of the model.

Log-linearized model

Table 3.3. presents the summarized nonlinear equation system of our asymmetric model.

We will now log-linearize all its equations but present only the ones with differences for both economies.

The following log-linearized equations describe dynamics of the model. When it comes to the equations shaping bilateral conditions between economies one can notice that they all depend on sectorial variables. The sectorial variables in turn are shaped by parameters responsible for steady state values of fixed costs of engaging in various economic activities.

The price indices equations are as follows:

[ ] [ ] [ ] , ) 1 ( ˆ) 1 ( ) 1 ( 0 * , * , 1 * * * , * , 1 * * , , 1 t I t I I I t X t X X X t D t D D D N N N N N N ρ σ ρ ρ σ ρ ρ σ ρ σ σ σ - + + + - + + - + = - - - (3.138) [ ] [ ] [ ] . ) 1 ( ˆ) 1 ( ) 1 ( 0 * , * , 1 * * , , 1 * , * , 1 * * t M t M M M t X t X X X t D t D D D N N N N N N ρ σ ρ ρ σ ρ ρ σ ρ σ σ σ - + + + - + + - + = - - - (3.139)
The log-linearized equations for the total average profits of the firms have forms:

( ) ( ) ( ), ˆ, , , , , t X t X X X t D t D D D t t D D N N N N N N π π π π π π + + + = + (3.140) ( ) ( ) ( ) ( ) ( ) . ˆ*
* t M t M M M t I t I I I t X t X X X t D t D D D t t D D N N N N N N N N N N π π π π π π π π π π + + + + + + + + = + (3.141)
The sectorial profits of the exporting, MNFs and re-exporting multinational firms have log-linearized equations of the form:

, ˆ, , t X t t t t X f Z Q w + - - = π (3.142) ( ) ( ), ) 1 ( ˆ* * , * 1 * * * 1 * , 1 * * , * t t X t X t t X t X t X X Z f w Z f w Q C C - + - - - + = - - - σ σ ρ σ ρ σ π π (3.143) ( ) ( ) ( ), ) 1 ( ˆ*, 1 * 1 * , 1 * * , * t t I t I t I t I t t I I Z f w Z f w C C Q - + - - + = + - - - σ σ ρ σ ρ σ π π (3.144) , ˆ* , 1 * * * , 1 * * * , t XM M XM t I M I t t t t M f f f f f f Z Q w - - + + - - = π (3.145)
where .

* * * I XM M f f f + =
For the sectorial shares of firms mentioned above the log-linearization gives following dependences:

, ˆ, , , t X t D t X z k N N - = (3.146) , 1 ˆ* * * * * * * , * , * *       ∧ - Λ - Λ Λ + + = t t k k t t M t X TOL k k N N µ κ (3.147) , 1 ˆ* * * * * , * , * * t k k t M t I k N N κ κ κ - + = (3.148) , ˆ* , * * , * , t M t D t M z k N N - = (3.149)
where:

1 * 1 1 * * * - -         = Λ τ σ X I f f and , 1 1 * * * * * τ κ σ -         ⋅ + = C C f f f I XM I (3.150) ), ( ) ( ) 1 ( , * , t t t t X t t t X Z Q w f C z - - + + - = - - σ τ σ (3.151) ). ( ) ( ) 1 ( * , * * * , * * * * , t t t t XM M XM t I M I t t t M Z Q w f f f f f f C z - - + + + - = - - σ τ σ (3.152)
Let us notice that besides different dynamics of the numbers of exporting firms for both economies these variables depend also on parameters of different kind. For the home economy it is only the shape parameter of Pareto distribution. In case of foreign economy the number of firms is modelled also by steady state values of fixed costs of engaging in export and the foreign direct investment.

Finally, we have also the log-linearization of the balanced current account equation: (

* * * 1 * * t t M t M M M t t I t I I I t X t X t X X M M X X t t M t M t M M t t X t X t X X M M I I X X Q N N Q N N N C N C N C N C Q N C N C Q N C N C N N N C + + + + + + + - + ⋅ + = = + - + + + + + - + ⋅ + + - - - - - - π π π π ρ σ ρ ρ ρ ρ σ ρ ρ σ ρ π π ρ σ σ σ σ σ σ ( )]. * , * , * * t t M t M M M Q N N + + + π π (3.153)
The parameters of sectorial shares influence the model dynamics most intensively comparing to the other parameters. In case of asymmetric model, the different dynamics of corresponding variables for both economies results not only from the different values of parameters, but also and first of all from the different forms of corresponding equations.

They in turn are responsible for shaping bilateral conditions between economies which differ much from the results of the asymmetric versions of the model from the second chapter.

Comparison of asymmetric and symmetric models

Let us remind that the calibration for the asymmetric model from this chapter was conducted in that way to obtain similar steady state values of some variables and their relationships as they were for the symmetric model with the various calibrations. The steady state shares of sectors in the whole number of firms in the foreign economy are very close to those from the symmetric model. And they come to 21, 43, 33 and 3 percentages for, respectively, only domestically selling firms, exporting ones, multinationals selling abroad and MNFs reexporting back to the economy of their origin. For the economy with only two sectors we have the steady state share of 58 percentages for the firms selling only at home and 42 percentages for the exporting firms. So the sectorial shares remains similar to those resulting from the symmetric model, but the asymmetric structure gives us now the steady state expenditure shares significantly different.

Temporary domestic productivity shock

We will analyse changes of variables' values in response to temporary increase in the home aggregate productivity. The size of the disturbance is one standard deviation of the shock which we assume to be 0.01. It means that the aggregate productivity t Z increases from 1 to 1.01. After about fifty years all variables return to their long-term values. With persistency equal to 0.9 the shock disappears after about eleven years. Responses of home and foreign variables to transitory shock in the home productivity are presented in Figure 3.3. q The macroeconomic variables react the most strongly on the impact, then quickly return to their steady state values. The international variables, like the terms of labour, of trade, the non-traded to traded ratios and the real exchange rates exhibit strong persistency.

We can notice, that when the domestic aggregate productivity increases, then the number of foreign exporting firms also goes up. This was not the case in the IRFs from the symmetric model (see Figure 3.4). The effect of the positive productivity shock is higher

* ,t I N

However, the number of foreign multinationals rises only directly at the impact and vanishes quite quickly.

After a few quarters the effect takes the reverse direction, while the response of the number of foreign exporters is positive, quite strong and persistent. Similarly, the response of foreign re-exporting multinationals * ,t M N is also strong but negative. Hence, we can state that the increase in the home productivity makes it harder for foreign entrepreneurs to engage in FDI activity because the home real wage increases. But the foreign firms can concentrate more on export, that means they prefer to choose exporting than investing abroad. So the effect of the temporary increase in the aggregate home productivity is shifting in the production from the foreign multinational firms located abroad to the foreign exporting firms, while the number of all foreign firms remains more or less unchanged. The terms of labour reacts quite intensely and from the home economy perspective they worsen. Home producers face relatively worse conditions in terms of effective labour which become more expensive for them. The terms of trade improves but the increase is very small. Prices of exported goods insignificantly grow relatively to prices of the imported goods. The non-traded to traded price ratio decreases. That means prices of domestic commodities destined to the foreign market go up in relation to the goods produced at home and destined to the home market. The consumers at home face relatively better conditions.

The CPI-based real exchange rate reacts much stronger than its welfare-based counterpart. We can notice that the depreciation of the home currency on the CPI comparison basis is much higher than the one when we regard the welfare-based real exchange rate.

It means that the variety effect is important when the product variety in the home economy is dependent on the foreign direct investment from abroad. The domestic consumer starts to have lower and lower utility from spending the same amount of money on the domestic market.

In tables 3.8 and 3.9 we compare results of the asymmetric model and the symmetric model (in asymmetric Calibration 3) of Chapter II. We analyse signs, the scale and the length of the variables' responses to the home aggregate productivity increase.

Regarding comparison of responses' characteristics presented in tables 3.8 and 3.9 we can notice that all macro variables in case of the asymmetric model react similarly as in case of the symmetric one except for the average productivity of home producers . ~* Z

In the international variables we can notice some size effects. Negative reaction of the terms of labour is much stronger in the asymmetric framework with differences in the production structures. By contrast, the terms of trade improvement is very small. Thus, the asymmetric production structures' assumption in comparison with the symmetric case displays situation in which deterioration of home producers' conditions is intensified, while improvement of home consumers' conditions is weakened.

Z ~ 0.95 (33) 0.85 (38)
The left column shows the peak of the response. Its duration in years is given in brackets in the right column. Source: Author's numerical simulations and the synthesis Studying reactions of foreign variables to the home aggregate productivity shock we can notice some size, as well as specific effects. In case of the asymmetric production structures the exporting firms' number goes up, while the number of re-exporting multinationals strongly decreases. All in all, when comparing with the symmetric model of Chapter II, we can say that the number of all firms, as well as the number of new firms, remains more or less unchanged. Thus, there is the shift in foreign firms from the more to the less productive ones.

Another specific effect reveals in responses of the welfare-and CPI-based real exchange rates. The latter depreciates much stronger than the former. The domestic consumers start to have lower and lower utility from spending the same amount of money on the domestic market. It results mostly from the number of foreign multinationals' deterioration, which influences negatively the product variety in the home economy. In case of the asymmetric framework this effect is relatively more clear.

The foreign non-traded to traded price ratio reacts positively in both versions of the model, but much weaker when the production structures are asymmetric. It means that firms producing in the foreign economy start to charge more the foreign consumers and less the consumers abroad.

q 0.17

* NTT 0.06 (47) 0.18 (50)
* C 0.01 (40) 0.12 (49)
The left column shows the peak of the response. Its duration in years is given in brackets in the right column. Source: Author's numerical simulations and the synthesis

Temporary foreign productivity shock

We will analyse changes of variables' values in response to a temporary disturbance in the foreign aggregate productivity * t Z which increases from 1 to 1.01. Responses of home and foreign variables to transitory shock in the foreign productivity are presented in Figure 3.5.

If we considered responses of variables to the aggregate foreign productivity shock obtained from the symmetric model with various calibrations, it would turn out that they are mirror images of responses of respective variables to the home productivity shock. In this sense when there is increase in the aggregate productivity at home then every macroeconomic or sectorial home variable reacts almost exactly the same as its foreign counterpart to the foreign productivity shock. Whereas every international variable reacts with almost exactly the same scale but with opposite sign. This behaviour is no longer the case when we regard

IRFs from the asymmetric model, which can be visible when comparing figures 3.3 and 3.5.

Figure 3.5. Temporary increase in aggregate foreign productivity

Foreign economy, t q and t TOT in dashed line Source: Author's numerical simulations One can notice the significant differences between the response of the number of the home exporting firms to the increase in the home productivity and the response of the number of the foreign exporting companies to the increase in the foreign productivity. The similar difference is for the responses of the non-traded to traded price ratio.

We can further compare IRFs in case of the home and foreign aggregate productivity increase considering their graphs presented in figures 3. We can compare how the economy with two sectors of producers' activities reacts to the aggregate productivity increase at home with reaction of the four sector foreign economy to the shock coming from this economy. It has to be highlighted that it is not the same situation as when we use Calibration 1, 2 or 3 in the symmetric model. The economy with two sectors trades with the developed economy. The four sector economy does not trade with the similar economy but with the emerging one. We could state that it was also the case of the symmetric model with the asymmetric Calibration 3 but there the reactions of both economies were almost identical and here we can observe different behaviour. Let us compare now in detail the responses of the home and foreign economy to the aggregate productivity shock, respectively home and foreign. When the positive aggregate productivity shock hits the home economy it experiences stronger deterioration of the terms of labour and weaker improvement of the terms of trade comparing to the reaction of the foreign economy to the positive foreign productivity shock. Also we can notice that domestic non-traded to traded ratio decreases while the foreign one goes up. It means that home consumers gain from the domestic productivity increase but foreign buyers loose from the foreign productivity increase. The welfare-based real exchange rate respond with the similar strength in both cases but the CPI-based rate reaction is stronger when the foreign productivity shock occurs. In that case the variety effect is more visible and significant.

The responses differ not only in the scale, but also in signs, as we see it for the numbers of exporting firms and the non-traded to traded ratios. This reflects the fact that in both economies both producers and consumers face different conditions. Thus, when the shock in the given economy appears they also react differently. So it is quite interesting and

Adjustment of sectorial activities and expenditures

Regarding the sectorial expenditures and sectorial activities the symmetric model of Chapter II with any calibration always gave the same reaction of the home and the foreign economy.

It means that reaction of domestic variables to the domestic productivity shock was the same as reaction of the foreign variables to the foreign productivity increase. Thus, we can state that adjustment of the balanced current account was carried only by the terms of trade and real exchange rate. The asymmetric model give us qualitatively different results.

The sectorial expenditures show reaction of consumers, while the IRFs of the sectorial activities present behaviour of the producers. When the home economy is hit by the positive aggregate productivity shock the domestic consumers start to consume more imported goods and less of foreign multinationals. The foreign consumers start to buy also more imported commodities and less of foreign re-exporting multinationals. The activity of foreign firms shifts from the foreign direct investment to exporting. in the other economy's variables. In case of the respective shock in the home and the foreign economy the home firms increase their exporting activity, whereas the foreign companies reduce it. The home consumers start to spend more on export while the foreign ones start to limit their consumption of imported goods. Thus, the economic agents of the same type in both economies respond differently due to the different selling and buying conditions. On the home market there is more type of firms from different sectors and the domestic less productive firms have to compete with more productive foreign multinationals. From the point of view of the consumers the product variety comes mostly from the foreign firms both for the domestic, as well as for the foreign consumers.

Concluding remarks

In this chapter we have presented the framework, serving description of relations between two economies, in which the focus is on the assumption of asymmetry in the production structure in the sense of different shares of firms of given type in the whole mass of firms in the economy. The asymmetry results from the fact that for one economy one assumes existence of only two production sectors, whereas the other economy has four sectors. In the emerging Such asymmetry is of the structural type and does not results only from assuming different values of parameters for the economies. We would like to emphasize here main consequences of describing dynamics of the model in that way. First, we can notice that the economic agents, of the same type, operate in different buying, selling and hiring labour conditions in both economies. Then, facing the similar shock of their economy's aggregate productivity, they respond differently, which is not surprising because they face different economic conditions and have different possibilities of reactions. The home producers have to adjust their reaction by only increasing or decreasing the exporting activity, while the foreign producers can shift their activity from one sector to another. It all influences bilateral conditions between the economies shaping the terms of trade, terms of labour, real exchange rates and balance of trade. To see what are the main consequences of the qualitative asymmetries in production structures of economies, let us summarize and compare the results of the asymmetric and symmetric versions of the model, as in Table 3.10. Table 3.10 gives us some insight into the main findings of the asymmetric model in comparison with the symmetric model of Chapter II. As we mentioned earlier, the most visible difference is in the way the foreign firms react to the aggregate home productivity increase. The number of multinationals decreases, while the number of exporters goes up. Thus, there is the shift in foreign firms from the more to the less productive ones. This causes that the number of all foreign firms remains more or less unchanged, comparing to the results of the symmetric model. The asymmetric production structures' assumption describes also situation in which deterioration of home producers' conditions is relatively strong, which reveals in the terms of labour reaction, while improvement of home consumers' conditions is relatively weak regarding the terms of trade response. The variety effect is more clear in case of the asymmetric framework. Decline of the number of foreign multinationals affects negatively the product variety in the home economy, thus the domestic consumers start to have lower and lower utility from spending the same amount of money on the domestic market. Relatively weak positive response of the foreign non-traded to traded price ratio means that foreign economy start to charge more the foreign consumers and less the consumers abroad, but these changes are very slight, comparing to the results of the symmetric model.

In Table 3.10 we see also results of both versions of the model while studying

Conclusions

When a member of the European Union (EU) enters the euro area, it loses its independence in the monetary policy conducting. Then, in case of asymmetric shocks between countries, using the nominal instruments to adjust is no longer possible, because of the common currency and common monetary policy. The monetary authority cannot control for the nominal exchange rate, thus the individual economy cannot count on the nominal adjustment.

The only possibility which is left is the real adjustment.

In this thesis we analysed the question of the real adjustment, trying to address to some important real aspects of relations between economies. We focused on international trade and the foreign direct investment (FDI) in a set of two countries forming a monetary union.

Taking into account the significance of both FDI hosting, as well as engaging in FDI, for outcomes of economies, it is worth studying a few issues. First, what is the importance of FDI nature, that means why firms decide do produce abroad, to sell on the local market or to export back to their economy of origin, and how it affects output fluctuations between two countries? Then, how existing asymmetries in the FDI intensity and FDI relations influence the real adjustment? Finally, what is the effect of differences in production structures between economies which have strong trade and FDI connections? In a monetary union such economies conduct a single monetary policy and use the common currency. There is no room for the nominal exchange rate adjustment, hence the existing asymmetries are essential for the real adjustment. They influence responses of national and international variables to asymmetric shocks, revealing some problem from the macroeconomic perspective. However, the problem relates also to microeconomic foundations. The given trade and FDI relations between countries depend on decisions of firms which are heterogeneous.

In this thesis we studied the effect of plant delocalization, FDI and asymmetries in the FDI intensity on output fluctuations between two countries forming a monetary union.

Because the problem is set from the macro perspective and at the same time description of behaviour and decisions of individual agents, especially firms, has microeconomic character, we use a theoretical tool that incorporates this two aspects simultaneously, namely dynamic stochastic general equilibrium (DSGE) models. The starting point is a DSGE model with heterogeneity in firm productivity, proposed by Melitz [2003] and then developed, among others, by Ghironi, Melitz [2005] and Contessi [2010].

We proposed some extensions and modifications of the frameworks existing in the literature to account for the nature of FDI and the fact that in reality one can observe substantial differences in the intensity of FDI among countries. The research process involved incorporation of appropriate assumptions at the construction level, thus expressing them in the formal language. To this aim we followed subsequent steps of the model description.

In the first chapter we presented a comprehensive synthesis on DSGE models with a special emphasis on the solution procedure. We used the example of the basic New Keynesian model, which is small and relatively simple, to provide a detailed and compact presentation of all stages of research process by using a DSGE model. We started by describing the benchmark framework. Then, we discussed methods of solving it. Analysis of the model concerned its static and dynamic properties. Throughout the chapter the exemplary model served as the benchmark by which all detailed questions were explained.

The second chapter presented the framework, by which we described trade and FDI relations between two economies forming a monetary union. In the construction the focus was on the assumption of the heterogeneity in productivity levels of firms. The consequence of such setting is that one can describe economies with distinguished types of firm activities, which we have called the sectors. We contributed to the literature on DSGE models by accounting for the nature of FDI, that means the reason why firms decide to delocalize their production abroad, to sell there or to export back to their economy of origin. We allowed also for some kind of asymmetry in the FDI intensity that comes from different values of parameters determining behaviour of agents in two economies. The focus was on real side of economy in situation when there is no room for the nominal adjustment due to a monetary union between countries, the same currency and common monetary policy. We regarded issues of the real adjustment through trade and FDI.

In the third chapter we developed the benchmark framework from the previous chapter to describe relations between two economies characterized by asymmetry in the production structures. The differences result from the fact, that for the home emerging economy one assumes the existence of only two production sectors, whereas the foreign developed economy has four sectors. This way we introduced the asymmetry which is of the structural type and linked the production structure of the economy to its level of development, in sense of the FDI intensity. Two economies were described not only by different parameters, as it was in the second chapter, but also by different dynamic equations. With such a framework we studied issues of the real adjustment to asymmetric shocks faced by economies which differ in their structures.

In the thesis, we proved that DSGE models provide an adequate theoretical tool for describing and evaluating how differences in productions structures affect output fluctuations between economies that form a monetary union. In this situation, there is no possibility for nominal adjustment through the nominal exchange rate. Thus, we focused on real aspects of functioning of economies and emphasized the significance of the real adjustment through trade and FDI. How the economies respond is influenced by the given trade and FDI connections between them. Hence, it is very interesting and important to incorporate to the model construction assumptions allowing for description of differences in the FDI intensity and the fact that economies differ in their productions structures.

In the first chapter, which has mainly an introductory character, we showed that DSGE models are the example of the theoretical tool which serve well explaining economic phenomena from the point of view of qualitative analysis and that they have cognitive properties that help to understand how the economy works and develop economic intuition.

As a result of the synthesis on the DSGE methodology and detailed presentation of a simple DSGE model, conducted in the first chapter, we obtained theoretical foundations, we referred to in the next chapters.

From analysis of the second chapter it results, among others, that in case of the exogenous aggregate productivity shock the terms of trade improvement depends on the FDI intensity. The smaller are shares of sectors engaged in FDI, comparing to the other economy, the weaker is trade of trade reaction. We also proved that the variety effect is most clear, when one economy gains higher variety due to existence of numerous foreign exporters and foreign multinationals selling to the home consumers. One can expect that in emerging markets, consumers benefit in terms of their utility much from variety of goods coming from the foreign multinationals.

In the third chapter of the thesis, we emphasized the main consequences of introducing differences in production structures between economies. First, we can notice that the economic agents of the same type operate in different buying, selling and hiring labor conditions in both countries. Then, facing the similar shock of their economy's aggregate productivity, they respond differently. The home producers have to adjust their reaction by only increasing or decreasing the exporting activity, while the foreign producers can shift their activity from one sector to another. It all influences bilateral conditions between the economies, shaping the terms of trade, terms of labor, real exchange rates and balance of current account.

In the dissertation we contributed to the literature by providing a synthetical description of DSGE models as the research tool. We also provided some new extensions of the existing DSGE models with heterogeneous firms. In particular, in our model we accounted for the fact that the multinational firms can have various reasons to localize part of their production abroad. What is more important, there exist high asymmetries in the FDI intensity among economies, which translate to differences in production structures.

We proposed how to incorporate such asymmetries in form of the asymmetric model construction describing the set of two economies in a monetary union.

Our model is conclusive in some important economic aspects. Firstly, it highlights the role of FDI for the hosting economy, with a special attention to the nature of FDI. In the second place, when we account for the asymmetry in the production structures, we show that different conditions, in which the economic agents act, have important implications for the resulting dynamics in response to the asymmetric shocks. The state of the real convergence in the sense of similarities in structures of economies is crucial, when there is no room for the nominal adjustment. The given trade and FDI connections between economies determine, how they respond to shocks in absence of the possibility to use the nominal instruments to adjust. The future work should concern how to precisely describe the role of the nominal convergence criteria and their links with the real side of economy. To this aim, we would like to propose the extension of our model, accounting for the nominal rigidities and the role of the monetary policy.

The extensions and modifications of a DSGE model with heterogeneous firms, that we proposed, allow for studying effects of FDI and asymmetric shares of various production sectors on the performance of economies. We focused on real aspects of functioning of economies, when there is a monetary union between them. They conduct the same monetary policy and have the common currency. In such situation, while facing the asymmetric shocks, the economy cannot use nominal instruments to adjust. The only adjustment which is left is the real one through variables shaping trade and FDI connections.

That is why, it is so important to state what are relations between economies in this regard.

Differences in the FDI intensity and in production structures translate to the way a given economy responds.

Research conducted in the thesis give rise to some future prospective extensions and modifications of the used frameworks. It is worth working with proposed various versions of the model with heterogeneous firm accounting for the asymmetry in the production structure in different ways and make attempts to address the research issues in more broader and precise way by proposing how to account for more assumptions and questions. One direction is to evaluate the model presented in the thesis by comparing seconds moments of series generated by the model with those observed in the data, especially on Polish and German economies. We can provide also quantitative analysis of the model by using different methods of setting parameter values, especially exploiting the Bayesian estimation techniques to fit the model with the data.

Another interesting and important prospect is to work on further extensions and modifications of the proposed model. When we will account for nominal rigidities in form of sticky entry costs or sticky prices, there is some room for describing the role of the monetary policy. Forming the monetary authority block of the model will allow for studying the effect of the monetary policy on fluctuations of nominal and real variables. Then, it is possible to design such versions of DSGE which will help analyse influence of nominal convergence criteria on real side of economy.

A. Mathematical appendix

Decision rules of the household

One of the first-order conditions of the Lagrange problem gives 1 :

, 0 = + = ∂ ∂ - t t t t P C C λ γ L (1) , ) ( , 1 1 1 
       - = - = + - + + - t t t t t t t t P C E E P C γ γ λ λ (2) . 1 1 1                 =         + - + + t t t t t t t t P P C C E E γ λ λ (3)
Substituting equation (3) in the other first-order conditions :

), ( 1

+ = t t t t E Q λ β λ (4) , ϕ λ t t t L W - = (5)
we get two decision rules of the household:

, 1 1                 = + - + t t t t t t P P C C E Q γ β (6)
.

ϕ γ t t t t L C P W = (7)
1 Formally, we solve a nonlinear optimization problem, using the method of Lagrange multipliers, which is a special case of the Karush-Kuhn-Tucker approach, when regularity conditions to which the optimization problem is subject, have to be in a form of equality constraints. The method in general case, that means allowing for inequalities as constraint conditions, was first published in Kuhn, Tucker [1953].

A.1.2 Intratemporal problem

Considering income of firms from household consumption, each final producer chooses to maximize profits: (8) subject to the consumption rule:

, ) ( ) ( profits 1 0 ∫ - = di i C i P C P t t t t t
, ) ( 1 1 0 1 - -         = ∫ σ σ σ σ di i C C t t (9)
These profits will end up being equal to zero, since the firm is perfectly competitive. The problem of the firm is to solve: (10) and this results is the first-order condition for expression (10) of the form2 :

{ } , ) ( ) ( ) ( max 1 0 1 1 0 1 ) (           -         ∫ ∫ - - di i C i P di i C P t t t t i C t σ σ σ σ
, 0 ) ( ) ( ) ( 1 ) ( 1 ) ( 1 1 1 1 0 1 1 1 1 1 0 1 = ⋅       ⋅ - - ⋅         - - - - - - - ∫ ∫ ω σ σ σ σ σ σ σ σ σ σ t t t t t t p di i c i P i C di i C P (11) equivalently:
, 0 ) ( ) ( ) ( 1 1 1 1 0 1 = - ⋅         - - - ∫ i P i C di i C P t t t t σ σ σ σ ( 12
)
), ( ) (

1 1 i P i C C P t t t t = ⋅
-σ σ (13) which simplifies to the demand function for a single variety: . ) ( ) (

t t t t C P i P i C σ -       = (14)
Putting this demand for the variety ω consumption into the aggregate consumption function gives: (16) This way we get the standard CES price aggregator: . ) (

, ) ( ) ( 1 1 0 1 1 1 0 1 - - - - -                 =                             = ∫ ∫ σ σ σ σ σ σ σ σ di P i P C di C P i P C t t t t t t t (15) equivalently: . ) ( 1 1 1 0 1 - -       = ∫ σ σ σ σ di i P P t t
1 1 1 0 1 σ σ - -       = ∫ di i P P t t (17)

A.1.3 Optimal price setting

Solving the optimization problem:

∑ ∞ = + + + + Ψ - 0 * , )}, ( { max * k t k t k t t k t t k t t k t P Y Y P Q E t θ (18) subject to: . ... , 2 , 1 , 0 , * =         = + - + + k C P P Y k t k t t t k t σ (19)
we obtain, that the first-order condition of the problem above takes the form:

{ } . 0 ) ( ) ( ) ( 0 1 * 1 * * , = - ⋅ Ψ′ - - ⋅ + ∑ ∞ = + - - + + + - - + + k t t
{ } , 0 ) ( ) ( ) 1 ( 0 * , = Ψ′ - - - ∑ ∞ = + + + + + k t k t t k t k t t t k t k t t k t Y Y P Y Q E σ σ θ (21) { } , 0 ) ( ) ( ) 1 ( 0 * , = Ψ′ - - - ∑ ∞ = + + + + k t k t k t t t k t k t t k t Y P Y Q E σ σ θ (22) . 0 ) ( 1 0 * , =       Ψ′ - - ∑ ∞ = + + + + k t k t k t t t k t k t t k t Y P Y Q E σ σ θ
∑ ∞ = + - + - + + =       Π - - k k t t t k t t t t k t k t t k t MC P P Y Q E σ σ θ (27) { } { } . 1 0 , 0 , 1 , 1 * ∑ ∑ ∞ = + + ∞ = + - + + + - Π - = k t k t k
{ } { } . ) ( ) ( 0 1 1 0 1 1 1 1 * ∑ ∑ ∞ = - + - + ∞ = + - + - + - + - Π = k k t k t k t k k t t t k t k t k t k t t t P C E MC P C E P P σ γ σ γ βθ βθ µ (29)

A.1.4 Aggregate price dynamics

Let us remind that the aggregate price level is of the form:

. ) (

1 1 1 0 1 σ σ - -       = ∫ di i P P t t (30) On the interval ] 1 , 0 [
, the subset t S of the intermediate firms keeps their price unchanged.

The rest of them reset the price and chose the common optimal one * t P . Thus, the price index from (30) can be expressed as: . ) (

1 1 \ ] 1 , 0 [ 1 * 1 1 σ σ σ - - - -       + = ∫ ∫ t t S t S t t di P di i P P ( 31
)
Using the fact that the measure of the set t S is θ and exploiting again (30) ,we can notice that:

, ) 1 ( 1 1 * \ ] 1 , 0 [ 1 * \ ] 1 , 0 [ 1 * σ σ σ θ - - - - = = ∫ ∫ t S
, ) 1 ( 1 1 1 * σ σ θ θ - -                 - + = Π t t t P P (35) . ) 1 ( 1 * 1 σ σ θ θ - -         - + = Π t t t P P (36)
A.1.

Log-linearization

From the definition of the log-deviation t x of variable t X : (37) Thus the first order Taylor approximation around X X t = yields:

. 1 ln ln ln ln       - + =       = - = X X X X X X X x t t t t
( )

. 1 1 ln 1 ln X X X X X X X X X x t t t t - = - + ≈       - + = (38)
We can state the same as above, using properties of the logarithmic function when the value of t X is close enough to . X

The interest rate rule:

, 1 t y v t t t e Y R φ φ π β Π = (39)
after the log-linearization, yields:

. ln ln ln ln

, ) 1 ( 1 1 * 1 σ σ θ θ - - -         - + = Π t t t P P (44) =                 -         - =                 - + -         - + = Π - ) 1 ( ) 1
- - - - - =                 -         - - = - σ θ σ θ (45)
which gives:

). )( 1 ( 1 * - - - = t t t p p θ π (46)
The household decision rule with variables in levels is of the form:

. 1

1 1                 = + - + t t t t t t P P Y Y E R γ β (47)
After the log-linearization we get:

}, { ln ln } { ln ln ln 1 1 + + Π - + - = - t t t t t t E Y Y E R γ γ β (48) ), } { ( 1 } { ln ln 1 1 ρ π γ - - - = + + t t t t t t E i Y E Y ( 49
) ). } { ( 1 ln } { ln ln ln 1 1 ρ π γ - - - - = - + + t t t t t t E i Y Y E Y Y ( 50
)
Using the definition (37) for the log-deviation of the output, from (48) it follows that:

). } { ( 1 } { 1 1 ρ π γ - - - = + + t t t t t t E i y E y ( 51
)
The real marginal cost equation:

α ϕ α α ϕ γ α - + - - + + - = 1 1 1 1 1 t t t A Y MC ( 52
)
takes the following log-linearized form:

. 1

1 ln 1 1 1 ln ln t t t A Y MC α ϕ α α ϕ γ α - + -       - + + +       - = (53)
In the steady state equation ( 53) has the form:

. 1

1 ln 1 1 1 ln ln A Y MC α ϕ α α ϕ γ α - + -       - + + +       - = (54)
Subtracting ( 54) from ( 53), we get:

The relation between the natural level of output and the steady state real marginal cost, thus the one when prices are flexible, is as follows:

( )

. 1 1 1 1 1 α ϕ α α ϕ γ α - + - - + + - = t n t A Y MC ( 59
)
We log-linearize it exactly like the (52), getting:

. 1

1 1 0 t n t a y α ϕ α α ϕ γ - + -       - + + = (60)
The inflation rate equation: ,

,                 = + - + + k t t t k t k k t t P P C C Q γ β (65)
.

* k t k t t t k t C P P Y + - + +         = σ (66)
We impose also the equilibrium condition:

.

t t Y C = ( 67
)
Let us notice that in the steady state:

,

k k Q β = , * P P = , Y Y k = . MC MC k = (68)
A first-order Taylor expansion of (64) around the steady state gives:

{ } ... ) ( ) ( 0 * 1 * 0 + - + - ≈ P P Y Q P P Y Q E t t t θ { } ... ) ( ) ( 1 1 0 - - - - - + + MC MC P Y Q MC MC P Y Q E t t t t t µ θ µ { }. ... ) ( ) ( 1 1 0 - - - - - + + P P MC Y Q P P MC Y Q E t t t µ θ µ (69)
Summing the terms in brackets, we get:

- - - - - ≈ ∑ ∞ = + 0 * ) ( ) ( ) ( 1 1 0 k t k t t k t MC MC E P Y P P Y θ β µ θ β ∑ ∞ = + - - 0 ). ( ) ( k k t t k P P E MC Y θ β µ
∑ ∑ ∞ = + ∞ = + - - - - - ⋅ - ≈ 0 0 * . ) ( ) ( 1 1 0 k k t t k k t k
- ⋅ = (73)
.

1 α - = t t t L A Y ( 74
)
The log-linearization of ( 73) and ( 74

+ + + - - - = α σ α (80)
Now we can use (80), to write (72) as follows:

. )

* ∑ ∞ = + + +       + - - - = - k k t k t t k t t k t p p p mc E p α σ α θ β θ β ( 1 ) ( 1 1 0 *
∑ ∞ = + + + + + + + + +       + - - - = - k k t k t t k t t k t t p p p mc E p E α σ α θ β θ β θ β (82)
Subtracting ( 82) from (81), we get: vector of stochastic shocks.

( ) , 1 1 ) ( 1 1 1 } { 1 1 * * 1 * 1 *       - + + - - ⋅ - + = - - + + α σ α θ β α σ α θ β θ β θ β t t
We will consider the case when the economy has no stochastic shock and the matrix B is invertible3 . Then, system (86) can be rewritten as:

, 1 1       =       + + t t t t t y x y E x Z (87)
where

. 1 A B Z - =
Now, we decompose this matrix into ,

1 - = M Λ M Z
where Λ is a matrix with the eigenvalues of the matrix Z on its diagonal and M is a matrix of the right eigenvalues. We can make further transformation by reordering elements of the matrix Λ from smallest to largest in a form of a matrix . Λ Consistently with the order of , Λ we order elements of the respective matrix . M

The linear model takes now the form:

.

1 1 1 1       =       - + + - t t t t t y x y E x M Λ M (88)
The next step is to partition the matrix , Λ so that to separate stable eigenvalues from the ones outside the unit circle:

x M M M M M M M M x - - - + - Λ - = (97)
This way we derived solution to system (86).

A.1.8 Blanchard-Kahn condition for the basic New Keynesian model

We exploit now the method described above in the A. ), (

1 n t t T T t t T t t t t r v y E y E - +       =       + + G Z Z π π (98) where: . 1 ) ( 1 1       - - + + = = - γ κ γ φ β φ γ β κ β γ π y T T B Z 1
There are two non-predetermined variables in system (98). According to the Blanchard-Kahn method, there should be exactly two unstable eigenvalues of the matrix .

T Z The characteristic polynomial of this matrix is of the form:

, 1 ) ( det             - - - + + β γ γ β γ κ γ β γ φ β λ β γ φ γ β κ π y (100)
and has the same roots as the following polynomial:

). 1 ( ) 1 ]( ) ( [ ) ( - + - - + + = π φ β κ λ β λ β γ φ γ β κ λ y w (101)
Finding the roots of ( 101) is equivalent to finding roots of the following polynomial:

, ) ( 0 1 2 2 a a a p + + = λ λ λ (102) where:
. , )) ( ( , 1 0 1 2 β γ φ κ φ γ β γ φ γ β κ γ π + + = + + + - = = y y a a a (103)
Using the Schur-Cohn criterion, we derive conditions necessary for the roots to lie outside the unit circle from

, 0 = + = ∂ ∂ - t t t C C λ γ L ( 1)
), ( ) ( ,

1 1 γ γ λ λ - + + - - = - = t t t t t t C E E C (2)
.

1 1                 =         - + + γ λ λ t t t t t t C C E E (3)
Using the fact that ) )(

= t E t D t D N N N 1 ( 1 , 1 , , - -+ -
, ) ( [ ) ( ~1 , 1 1 1 , , + + + + + = + t D t t t t t E t D t t N v E N N v π λ β λ (4) )]. 1 ( [ 1 1 + + + = t t t t r E λ β λ (5)
we get two Euler equations, respectively for shares and for bonds:

( ) , ) 1 ( ~1 1 1         +         - = + + - + t t t t t t v C C E v π δ β γ (6) ( ). ) 1 ( 1 1 γ γ β - + + - + = t t t t C E r C (7)

A.2.2 Real interest rate

The lifetime utility function is:

). ( 0

t t t t C U ∑ ∞ = β (8)
From one hand a given quantity of money invested in period t costs ) ( t C U Q ′ units of utility and must yield exactly that number of units of utility in the future when saved at the gross interest rate t R . From that we get:

), ( ) (

t t t C U R Q C U Q ′ ′ = ′ β (9) , ) ( ) ( 1 + ′ ′ = t t t C U C U R β (10) . 1 γ γ β - + - = t t t C C R (11)
On the other hand the Euler equation for bonds gives:

. 1 1

1 γ γ β - + - = + t t t C C r ( 12
)
Thus the gross real interest rate is:

.

1 t t r R + = (13)

A.2.3 Intratemporal problem

Considering income of firms from household consumption, each final producer chooses to maximize profits: , ) ( ) ( profits (14) subject to the consumption rule:

∫ Ω ∈ - = ω ω ω ω d c p C P t t t t t
, ) ( 1 1 - Ω ∈ -         = ∫ σ σ ω σ σ ω ω d c C t t (15)
These profits will end up being equal to zero, since the firm is perfectly competitive. The problem of firm is to solve: (16) and this results is the first-order condition for expression (16) of the form1 :

{ } , ) ( ) ( ) ( max 1 1 ) (           -         ∫ Ω ∈ - ∫ Ω ∈ - ω σ σ ω σ σ ω ω ω ω ω ω d c p d c P t t t t t c
( ) , 0 ) ( ) ( ) ( 1 ) ( 1 ) ( 1 1 1 1 1 1 1 1 = ⋅ ⋅ - - ⋅         - - Ω ∈ - - - - Ω ∈ - ∫ ∫ ω ω ω ω ω σ σ ω ω σ σ ω σ σ σ σ ω σ σ t t t t t t p d c p c d c P (17) equally: , 0 ) ( ) ( ) ( 1 1 1 1 = - ⋅         - - Ω ∈ - ∫ ω ω ω ω σ σ ω σ σ t t t t p c d c P ( 18)
), ( ) (

ω ω -       = (20)
Putting this demand for the variety ω consumption into the aggregate consumption function gives: (22) This way we get a standard CES price aggregator:

, ) ( ) ( 1 1 1 1 - Ω ∈ - - Ω ∈ - -                 =                             = ∫ ∫ σ σ ω σ σ σ ω σ σ σ ω ω ω ω d P p C d C P p C t t t t t t t (21) equally: ( ) . ) ( 1 1 1 - Ω ∈ - ∫ = σ σ ω σ σ ω ω d p P t t

(

) .

) (

A.2.4 Expected post-entry value of a firm

We start with the Euler equation for shares:

( ) . ) 1 ( ~1 1 1         +         - = + + - + t t t t t t v C C E v π δ β γ (24)
Using properties of the expected value we get:

=                 - +                 - = + - + + - + 1 1 1 1 ) 1 ( ) 1 ( ~t t t t t t t t t C C E v C C E v π δ β δ β γ γ (25) +                 - +                 - =                 - + +                                   - +                 -         - = + - + + - + + - + + - + + + - + + - + 1 1 2 2 2 1 1 2 1 2 2 1 2 1 ) 1 ( ) 1 ( ) 1 ( ) 1 ( ) 1
E v C C E C C E C C E v C C E C C E π δ β δ β π δ β π δ β δ β δ β γ γ γ γ γ γ +                 - +                 - =                 - + + - + + - + + - + 1 1 3 3 3 2 2 2 2 ) 1 ( ) 1 ( ) 1 ( t t t t t t t t t t t t C C E v C C E C C E π δ β δ β π δ β γ γ γ . ) 1 ( ) 1 ( 3 3 3 3 2 2 2 2                 - +                 - + + - + + - + t t t t t t t t C C E C C E π δ β π δ β γ γ (26)
Going further with the time index we can express the term (26) with variables from period n t + and compute the limit:

+                 - +                 - = + - + + - + ∞ → 1 1 ) 1 ( ) 1 ( lim ~t t t t n t t n t t n n n t C C E v C C E v π δ β δ β γ γ . ... ) 1 ( 2 2 2 2 +                 - + + - + t t t t C C E π δ β γ (27) Because ) 1 , 0 ( ∈ β and ) 1 , 0 ( ∈ δ the term ) 1 ( δ β -
is less than 1. That gives the limit on the right side of ( 27) equal to 0. Hence, the equation for the expected post-entry value of a firm is given by:

. )] 1 ( [ ~1 ∑ ∞ + = - -                 - = t s s t s t t s t C C E v π δ β γ (28)

A.2.5 Optimal prices

Let us remind that form Intratemporal problem A.2.3. the demand for a single variety is:

) ( ) ( t t t t C P p c σ ω ω -       = (29)
Because the only source of demand is consumption )

( ) ( ω ω t t c y = and hence: . ) ( ) ( t t t t C P p y σ ω ω -       = (30)
Maximizing the profit function with respect to the price ) (

, ω t D p : ), ( ) ( ) ( ) ( , , , , ω ω ω ω t D t t t D t D t D y z Z W y p - = Π (31)
and using the chain rules of calculus we get the first-order condition of a form:

. 0 ) ( ) ( ) ( ) ( , , , , , , = ∂ ∂         - + = ∂ Π ∂ t D
σ σ ω σ ω - - - = ∂ ∂ ( 34)
),

σ ω ω ω σ σ σ σ t D t t t D t t t D t D t D t D p C P p C P p p y y = - - = ∂ ∂ - - - - ( 1 ) ( ) ( ) ( ) ( , 1 , , , , , ω σ ω
), Maximizing the function of profit from export with respect to the price )

, ω σ ω t D t t t D p z Z W p + = ( 1 ) ( ,
( , ω t X p : , ) ( )] ( ) ( [ ) ( , , , , , t X t t t X t t t t X t X t t X f Z W y z Z W y p e - - = Π ω τ ω ω ω (39)
we get the first-order condition of a form:

, 0 ) ( ) ( )] ( [ ) ( , , , , , , = ∂ ∂       - + = ∂ Π ∂ t X t X t t t t X t t X t
τ σ ω =       - (50)

A.2.6 Optimal relative profits

Optimal relative profits are computed relatively to the price index of the location market of the mother company. Thus for the domestic firms it is always the domestic price index t P .

We use the fact that ) ( ) ( ω ω t t c y = and get following functions for optimal profits from various strategies:

=         = =         - = - = - = Π = - t t t D t D t D t D t D t D t D t D t D t D t D t t t D t D t t D t D C P p c y y y y z Z w y P σ ω ρ σ ω ω ρ σ µ ω ω ρ ω ω ρ µ ω ω ρ ω ω ω ρ ω ω π , , , , , , , , , , , , , , , ) ( 1 )
( ) ( 1 1 1 ) ( ) ( ) ( ) ( 1 ) ( ) ( ) ( ) ( ) ( ) ( ) ( , ) ( 1 )
( ) ( 1 1 , , , t t D t t D t D C C σ σ ω ρ σ ω ρ ω ρ σ - - = (52) = - - = ⋅ Π = Π = t t X t t X t X t t X t X t t t t t X t t X t X Z f w y Q y Q Q P e P , , , , , * , , , ) ( )
( ) ( ) ( ) ( ) ( ) ( ω ω ρ µ ω ω ρ ω ω ω π = -         = -         - - t t X t t t t X t X t t t X t t X t X t Z f w C P p Q Z f w y Q , * * , , , , , ) ( 1 1 ) ( ) ( σ ω ρ σ µ ω ω ρ , ) ( , * 1 , t t X t t t X t Z f w C Q - -σ ω ρ σ (53) =         - =         -         - =         - - = ⋅ Π = Π = * ,
Z f w c Q Z f w y Q Z f w y y Q Q P e P ω ω ρ σ µ ω ω ρ ω ω ρ µ ω ω ρ ω ω ω π , ) ( 1 ) ( 1 *
, * * 1 , * , * * * , ,         - =         -         - - t t I t t t I t t t I t t t t I t I t Z f w C Q Z f w C P p Q ω ρ σ ω ρ σ σ σ (54) ( ) ( ) = + - = + -         - = - - - = Π = t XM t I t t t t M t M t XM t I t t t t M t M t t XM t t t t I t t t M t M t M t M t t M t M f f Z w Q c f f Z w Q y Z f w Q Z f w Q y y P , , * * , , , , * * , , * , * * , * , , , , , , ) ( ) ( 1 1 1 ) ( ) ( ) ( ) ( 1 ) ( ) ( ) ( ) ( ω ω ρ σ µ ω ω ρ ω ω ρ µ ω ω ρ ω ω π ( ) ). ( ) (
f f Z w Q C f f Z w Q C P p + - = + -         = - - ω ρ σ ω ρ σ σ σ (55)

A.2.7 Cutoff points

The first cutoff point is important form a firm which want to export. To derive positive profits the firm has to have the level of its idiosyncratic productivity higher than .

,t X z

This cutoff level is determined each period by equalizing optimal profits from exporting to 0: .

) ( ) ( 0 ) ( 1 1 , * , , * 1 , , σ σ σ ω ρ ω ρ σ ω π - -         = ⇔ = ⇔ = t t t X t t t X t t X t t t X t t X Z Q f w C Z f w C Q (56)
At the same time optimal relative price of the exporting firm is:

. ) ( , t t t t t X w zZ Q µ τ ω ρ = (57)
From ( 56) and ( 57) the cutoff point is given by: ,

) ( 1 , - = ω ρ µ τ t X t t t t w Z Q z (58) . 1 1 * , , t t t t t t X t X Z Q w C f z τ µ σ µ σ                 = - (59)
The next cutoff level is the point of reference for firms which want to engage in the foreign direct investment:

, ) ( ) ( 1 0 ) ( 1 1 * , * * , * , * * 1 , , σ σ σ ω ρ ω ρ σ ω π - -         = ⇔ = ⇔ = t t
, ) ( 1 , * * - = ω ρ µ t I t t w Z z ( (61)
) . * * 1 1 * , , µ σ µ σ                 = - t t t t I t I Z w C f z ( 62
) 63
The last cutoff point is crucial for firms which want to engage in the foreign direct investment to export back to the economy of their origin:

⇔ + = ⇔ = - ) ( ) ( 1 0 ) ( , , * * 1 , , t XM t I t t t t t M t M f f Z w Q C ω ρ σ ω π σ , ) ( ) ( 1 1 , , * * , σ σ ω ρ -         + = t XM t I t t t t t M f f Z w Q C (64) , ) ( ) ( * * * * , , t t t t t t M t M w zZ Q P p µ τ ω ω ρ = = (65) , ) ( 1 , * * * - = ω ρ µ τ t M t t t t w Z Q z (66) . ) ( * * * 1 1 , , , t t t t t XM t I t t M Z w Q f f C z τ µ σ µ σ                 + = - (67)

A.2.8 Number of firms

To compute a number of firms in the given strategy we use following definitions of the probability density and the cumulative distribution functions (CDF) of the Pareto distribution: (69) and properties of definite integrals 2 and of CDFs 3 . Firms can engage in four possible economic activities. In the given strategy the share of firms in the total mass of domestic producing firms is given as follows:

     < ≥ = + , , 0 , , ) ( min min 1 min z z z z z z k z g k k (68)      < ≥       - = = ∫ , , 0 , , 1 ) ( ) ( min
2 Namely, we use two properties of integrating over a domain. The first one is that if , b a > then one can reverse limits of integration: . )

( ) ( ∫ - = ∫ a b b a dx x f dx x f
The second is the additivity of integration on intervals:

, ) ( ) ( ) ( ∫ + ∫ = ∫ b c c a b a dx x f dx x f dx x f where ]. , [ b a c ∈ 3 If the CDF is continuous, then ( ) . 1 ) ( ) ; ( ) ( = ∫ = ∞ ∞ - = ∞ ∞ ∞ - dz z g P G , 1 ) ( ) ( , min , , , min k t X z z t X t D t DO z z z G dz z g N N X         - = = = ∫ (70) , ) ( ) ( ) ( ) ( ) ( , min , min , , , , min min ∫ ∫ ∫         -         = - = + = = I X I X z z k t I k t X t X t I z z z z t D t X z z z z z G z G dz z g dz z g dz z g N N (71) , ) ( ) ( ) ( ) ( ) ( , min , min , , , , min min ∫ ∫ ∫         -         = - = + = = M I M I z z k t M k t I t I t M z z z z t D t I z z z z z G z G dz z g dz z g dz z g N N (72) . ) ( 1 ) ( , min , , , k t M z t M t D t M z z z G dz z g N N M         = - = = ∫ ∞ (73)

A.2.9 Average productivities of sectors

) =       ⋅ =       =         = - ∞ + - - - - ∞ - - - - ∞ - ∫ ∫ ∫ 1 1 ) 1 ( 1 1 1 min 1 1 1 min 1 1 1 1 , , , min min min ) ( ~σ σ σ σ σ σ σ z k k z k k z t D t D t D dz z z k dz z z k z z dG z N N z ( ) =       ∞ + - ⋅ =               + - - - + - - - + - 1 1 min ) 1 ( 1 1 min 1 1 ) 1 ( min min ) 1 ( 1 ) 1 ( 1 σ σ σ σ σ σ σ z z k z k z k z k k k k k , ) 1 ( ) 1 ( min 1 1 min 1 1 1 1 1 min z z k k z k k - - - - ∇ == ⋅       - - =       - - σ σ σ σ σ σ (74) =         =         = - - - - - - ∫ ∫ 1 1 1 min 1 , , 1 1 1 , , , ) ( ~σ σ σ σ I X I X z z k k t X t D z z t X t D t X dz z z k z N N z dG z N N z 1 1 , , , 1 , , 1 , , , , , 1 1 1 1
) 1 ( min , , min , , ) 1 ( ) ( ) ( - - - - - + -         - ⋅ - ∇ =         - - - ⋅ - σ σ σ σ σ σ σ k t I k t X k t X t I k t I t X k t X k t I k t X k t I X I k k k t X k t I k k t X k t I z z z z z z z z z z z z z z k k z z z z z , , , , 1 , , 1 , 1 1
        - - ∇ = - - - k t X k t I k t X t I k t I t X z z z z z z σ σ σ (75) =         =         = - - - - - - ∫ ∫ 1 1 1 min 1 , , 1 1 1 , , , ) ( ~σ σ σ σ M I M I z z k k t I t D z z t I t D t I dz z z k z N N z dG z N N z =         - ⋅ - ∇ =         - - - ⋅ - - - - - - + - 1 1 , , , 1 , , 1 , , , , , 1 1 1 1 ) 1 ( min , , min , , ) 1 ( )
( ) ( σ σ σ σ σ σ σ k t M k t I k t I t M k t M t I k t I k t M k t I k t M I M k k k t I k t M k k t I k t M z z z z z z z z z z z z z z k k z z z z z , , , , 1 , , 1 , 1 1
        - - ∇ = - - - k t I k t M k t I t M k t M t I z z z z z z σ σ σ (76) =         =         = - ∞ - - - - ∞ - ∫ ∫ 1 1 1 min 1 , , 1 1 1 , , , ) ( ~σ σ σ σ M M z k k t M t D z t M t D t M dz z z k z N N z dG z N N z =       - - =         ∞ - - - ⋅ - + - - + - 1 1
) 1 ( , , 1 1 ) 1
( min min , ) 1 ( ) 1 ( ) ( σ σ σ σ σ σ k t M k t M M k k k k t M z k k z z z z k k z z . , 1 1 t M z - ∇ σ (77)

A.2.10 Average productivity as a harmonic mean

Let us remind that the production function for firms in the strategy of producing and selling domestically is: .

) ( ) ( , , t t D t D zZ l y ω ω = (78)
But the only source of demand for the products is consumption. Thus at the same time the production is given by:

[ ] , / ) ( ) ( , , t t t D t D C P p y σ ω ω - = (79)
and using the definition of the optimal nominal price in this strategy:

, ) ( , z Z W p t t t D µ ω = (80)
we can express ratio of output produced by two firms by means of ratio of their relative productivity levels: . ) (

) ( ) ( ) ( 2 1 1 2 2 , 1 , 2 , 1 , σ σ σ         =         =         = - - z z z z z p z p z y z y t D t D t D t D (81)
Introducing the average productivity of the representative firm we can transform (82) into:

µ σ ω ρ σ π π z Z w C z Z w z C z z k k Z w z C z z k k Z w z C dz z Z w z k C dz z Z z w z k C dz z z k C z dG z t t t k t t k t k t t k t k t t k t z k t t k t z k t t k t z k k t t D z t D t D . ~1 1 , σ σ µ σ - -         t t t t D Z w C z (84)
Average firm profit from exporting needs more complex computations starting with 4 :

=       - - = - = = ∫ ∫ ∫ ∫ - - - - - - - I X I X I X I X z z k t t X t z z k t t X t k t X k t I k t X k t I z z k k t X k t X k t I k k t X k t I z z t X t X t D t X dz z Z f w dz z C Q z z z z k dz z z k z z z z z z z dG z N N 1 , 1 * 1 , , , , , 1 min , , , min , , , , , , ) ( )
( ) ( ) ( ) ( ~ω ρ σ π π π σ [ ] , 2 1 2 1 R R Q Q A - = - ⋅ (85
) [START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF] We introduce here a few auxiliary notations to make the derivation more clear. These notations are: , , ),

1 Q A , , , 2 1 2 R R Q U N M L ,
1 1 1 , , , , , 2 k t I k t X t t X t I X k t t X t X I k t t X t z z Z f w k z z z Z f w k z z z k Z f w Q - - - - - = =       - = (86) , 1 , , , , , , , , , , 2 2 t
t X t k t X k t I k t X k t I t t X t k t X k t I k t X k t I Z f w z z z z Z f w k z z z z k Q A R = - ⋅ ⋅ - = ⋅ = (87) , ) 1 ( 1 1 1 1 1 1 1 * 1 I X k z z X I k k t t t t t t z z z k L z z z k L dz z Z w Q C Q Q I X - - - - - - - - - - = - - =         = ∫ σ σ σ σ σ σ µ τ σ (88) ( ) = - ⋅ - ∇ = - - ⋅ - - = ⋅ = - - - - - - k t X k t I k t X t I k t I t X k t X k t I k t X k t I k t I k t X k t X k t I k t X k t I z z z z z z z z z z L z z L z z z z k k Q A R , , , 1 , , 1 , , , , , 1 , 1 , , , , , 1 1 ) 1
( σ σ σ σ σ , M N L U L ⋅ ⋅ ∇ = ⋅ ⋅ ∇ (89) [ ], ... 1 * 1 , * * 1 , 1 * , , k k t k t k t t t k t X k t t k t I k k t k t X k t I C Z Q w f Z w f C z z M µ σ τ µ σ σ µ σ µ σ σ - - - -         =                 -                 = - = (90) -                         = - = - - - - - 1 1 * , * * 1 * , , 1 , , 1 , σ
σ σ µ σ σ σ τ µ σ µ σ t t t t t t X k k t t k t t I k t X t I k t I t X Z Q w C f Z w C f z z z z N =                         - - 1 * * * , 1 * , σ σ µ σ µ σ τ µ σ t t t t I k k k t t t k t t X Z w C f Z Q w C f =                           -                 ⋅         - - - - + - σ µ σ σ σ µ σ σ σ τ τ σ µ σ * * , 1 , 1 , * * 1 , * 1 1 * t t t I k k t t t k t X t t t t t X k t t k t I t k k t Z w f Z Q w f Z Q w f Z w f C C { }, ... * 1 1 * ⋅         - + - t k k t C C σ µ σ σ σ (91) { } [ ] { } [ ] , ... ... ... ... 1 * 1 * * 1 1 * - - - - + - =         ⋅         = = σ σ σ σ µ σ µ σ σ µ σ t k k t t k k t C C C C N M U (92) { } [ ] [ ] { }= ⋅ ⋅         ∇ = ⋅         ∇ = - - - - ... ... 1 ... ... 1 1 1 1 * 1 * 1 σ σ σ σ σ τ µ σ µ τ σ t t t t t t t t t t t Z w Q C Z w Q C Q R [ ] [ ] ( ), ... ... ... * * , 1 1 1 , , * * 1 , ⋅ ∇ =                         -         ⋅ ∇ - + - - + - - σ σ µ µ σ σ σ µ σ τ t t t I k t t k t k k t X t t t X k t t k t I Z w f Z w Q f Z w f Z w f (93) [ ] =                   -                 = - - - - k t t t t t k t X k t k t X t I k t t k t k t X w Z Q Z w f f f Z w f µ σ σ µ σ τ τ * * 1 , 1 , , * * 1 , ... [ ], * * 1 , k k t k t t k t k t X TOL Z w f µ µ σ τ - - - Λ         (94)
where:

,

1 1 1 , , - -         = Λ t t X t I t f f τ σ , * * * * t t t t t t t t t t t w Z Z w Q W Z Z W e TOL = = (95)
( ) =                          -                 = - - - - - - - k t t t X t I k t t k t k t k t X t I t t X t k t t k k t X Z w f f Z w Q f f Z f w Z w f µ σ σ µ µ σ σ σ µ σ τ τ τ * * , , 1 1 ,
, , * * 1 , ... [ ], 1 , * * 1 , k t k t t t X t k t t k k t X TOL Z f w Z w f µ σ σ µ σ τ - - - Λ - Λ         (96) ( ) [ ] , ... ... 1 , 1 k k t k t k t t t X t TOL TOL Z f w R µ µ σ σ - - - - Λ Λ - Λ ⋅ ∇ = ∇ = (97) . 1 ~, 1 2 1 , t t X t k t k t k t t k t t X Z f w TOL TOL R R ⋅       - - Λ Λ - Λ ∇ = - = - - - µ µ σ σ π (98)
Average firm profit from the FDI follows analogously like (85)-(98) with the same auxiliary notation:

=         - - = - = = ∫ ∫ ∫ ∫ - - - - - - - M I M I M I M I z z k t t I t t z z k t t I t k t I k t M k t M k t I z z k k t I k t I k t M k k t M k t I z z t I t I t D t I dz z Z f w Q dz z C Q z z z z k dz z z k z z z z z z z dG z N N 1 * , * 1 * 1 , , , , , 1 min , , , min , , , , , , ) ( )
( ) ( ) ( ) ( ~ω ρ σ π π π σ [ ] , 2 1 2 1 R R Q Q A - = - ⋅ (99) ( ), 1 1 1 , , * , * * , * * , * 2 k t M k t I t t I t t M I k t t X t t I M k t t I t t z z Z f w Q k z z z Z f w Q k z z z k Z f w Q Q - - - - - = =       - = (100)
t M k t M k t I Z f w Q z z z z Z f w Q k z z z z k Q A R = - ⋅ ⋅ - = ⋅ = (101) , ) 1 ( 1 1 1 1 1 1 * * * 1 M I k z z I M k k t t t t z z z k L z z z k L dz z Z w C Q Q M I - - - - - - - - - - = - - =         = ∫ σ σ σ σ σ σ µ σ (102) ( ) = - ⋅ - ∇ = - - ⋅ - - = ⋅ = - - - - - - k t M k t I k t I t M k t M t I k t I k t M k t M k t I k t M k t I k t I k t M k t M k t I z z z z z z z z z z L z z L z z z z k k Q A R , , , 1 , , 1 , , , , , 1 , 1 , , , , , 1 1 ) 1
( σ σ σ σ σ , M N L U L ⋅ ⋅ ∇ = ⋅ ⋅ ∇ (103) =                           -                 + = - = - - - k t t k t t I k t k t t t k t t XM t I k k k t I k t M Z w C f Z w Q C f f z z M µ σ µ σ σ τ µ σ * * 1 * , * * * 1 , , 1 , , [ ],
...

1 k k µ σ σ - (104) -                         + = - = - - - - 1 * * * , * * * 1 , , , 1 , , 1 , ) ( σ
σ µ σ σ σ µ σ τ µ σ t t t t I k t k k t t t k t t XM t I k t I t M k t M t I Z w C f Z w Q C f f z z z z N =         +                 - - - 1 * 1 * * , , * * 1 * , ) ( σ σ σ µ σ τ µ σ µ σ t t t t t t XM t I k k t t k t t I Z w Q C f f Z w C f =      +              -         + ⋅         - - - + - + + - 1 * , , 1 * , * , * 1 , , * * 1 1 1 σ σ σ µ σ σ µ σ σ τ τ µ σ t t t t XM t I k t t I t t I k t k t k t t XM t I k t t k k Q C f f C f C f Q C f f Z w { }, ... * * 1 1 1 ⋅         + - + + - σ µ σ σ µ σ k t t k k Z w (105) { } [ ] { } [ ] , ... ... ... ... * * 1 1 * * 1 1 1 σ µ σ σ σ µ σ σ µ σ µ σ µ σ + - - - - + - + + -         = ⋅         = = k t t k k k t t k k Z w Z w N M U (106) { } [ ] [ ] { }= ⋅ ⋅         ∇ =         ⋅         ∇ = + - - ... ... 1 ... ... 1 * * * * * * 1 1 * * * 1 k t t t t k t t t t t t Z w C Q Z w Z w C Q R µ σ µ σ σ µ σ µ σ [ ] , ) ( ... 1 * * , , 1 * , , * 1 , , 1 * *           +         -         + ⋅         ∇ - - - + σ σ σ µ σ µ τ τ t t t t t XM t I k t t I t I k t k t k t t XM t I k t t t Q C C f f C f f Q C f f Z w Q (107) [ ] =           -                 +                 = - - - 1 ... * 1 * 1 , , , 1 * , * * k t k t k t t k t I t XM t I k t t I k t t Q C C f f f C f Z w τ µ σ σ σ µ [ ], 1 1 * , * * -                 - k t k t t I k t t C f Z w κ σ µ (108) where: , * 1 1 * , , , t t t t t I t XM t I t Q C C f f f τ κ µ σ -         ⋅ + = (109) ( ) =           + -         +         = - - - t t I t t XM t I t t k t k t k t t I t t XM t I t I k t t I C f C f f Q Q C f C f f f C f , * , , 1 * * 1 , * , , , 1 * , ) ( ) ( ... σ σ µ σ σ τ τ [ ], 1 , 1 * , - - -         σ σ κ κ t k t t I k t t I f C f (110) ( ) [ ] = - - ⋅                 ∇ =         ∇ = - - + + 1 ... ... 1 * * , 1 * * 1 * * 1 k t t k t k t t t I k t t t k t t t Z w f Z w Q Z w Q R κ κ κ σ µ µ µ , 1 1 * , * - - ⋅ ∇ - k t t k t t t I t t Z f w Q κ κ κ σ (111) . 1 1 ~* , * 1 2 1 , t t I t t k t t k t t I Z f w Q R R ⋅       - - - ∇ = - = - κ κ κ π σ (112)
Average firm profit from the FDI together with exporting to the home country market is given as follows:

=       + - = = = ∫ ∫ ∫ ∫ ∞ - - ∞ - - - ∞ - - ∞ M M M M z k t XM t I t t t z k t t M k t M z k k t M k k t M z t M t M t D t M dz z f f Z w Q dz z C z k dz z z k z z z z dG z N N 1 , , * * 1 1 , , 1 min , min , , , , , ) ( ) ( 1 )
( ) ( ) ( ~ω ρ σ π π π σ [ ], 2 1 , Q Q z k k t M - ⋅ (113) , ) 1 ( 1 1 1 1 1 1 * * 1 ∞ - - = ∞ - - =         = - - ∞ - - - - - - ∫ M k z M k k t t t t t z z k L z z k L dz z Z w Q C Q M σ σ σ σ σ σ µ τ σ , ) 1 ( 1 , k t M z k L - - - - σ σ (114) = ⋅         +         ∇ = ∇ = - - - - 1 1 * * , , 1 * * 1 , 1 , ) ( σ σ σ σ σ τ µ σ µ τ σ t t t t t XM t I t t t t t t t M k t M Z w Q f f C Z w Q C z L Q z k ), ( , , * * t XM t I t t t f f Z w Q + ∇ (115) = ∞ + = ∞       - + = - - M k t XM t I t t t M k t XM t I t t t z z k f f Z w Q z z k f f Z w Q Q 1 ) ( 1 ) ( , , * * , , * * 2 , ) ( 1 , , , * * k t M t XM t I t t t z f f Z w Q k - + ⋅ (116) ), ( , , * * 2 , t XM t I t t t k t M f f Z w Q Q z k + = ( 117
) ). ( ) 1 ( ~, , * * , t XM t I t t t t M f f Z w Q + - ∇ = π (118)

A.2.12 Average amounts of labor

The starting point are definitions of the optimal relative profits. In fact we use some calculations in the middle of derivations ( 52)-( 55). Then we exploit equations for the optimal relative prices. At the end we exploit definitions of the average optimal profits.

⇔ - = - ⋅ = = ) ( 1 1 ) ( 1 1 ) ( ) ( 1 ) ( , , , , , ω σ ω σ σ σ ω ω ρ σ ω π t D t t D t t t t D t D t D l w l Z z Z z w y , ) 1 ( ) ( ) 1 ( ) ( , , , , t t D t D t t D t D w l w l π σ ω π σ ω - = ⇔ - = (119) = - ⋅ ⋅ - ⋅ ⋅ = - = t t X t t X t t t t t t t t t X t t X t X t t X Z f w l Z z Z z w Q Q Z f w y Q , , , , , , ) ( 1 )
( ) ( ) ( ω τ σ σ τ σ ω ω ρ σ ω π ⇔       + - = ⇔ - - t t X t t X t X t t X t t X t Z f w l Z f w l w , , , , , ) ( ) 1 ( ) ( ) ( 1 1
=         ÷         =         = - - - - σ σ σ σ (129) , ~~1 , , * , 1 , , , 1 , , , 1 * , , * , 1 , * σ
σ σ σ σ τ τ - - - - -         +         +         +         =         = t M t D
σ σ σ σ τ - - - -         +         +         + =         = t M t D
σ σ σ σ σ σ σ τ τ τ - - - - - - - -         +         +         +         +         +         +         = t M t D 1 * , , * , 1 * , , * * , , 1 , , * , 1 , , , 1 , , , 1 * , , * , 1 σ
v N Q N Q L w Q v N N L w C Q C + - - - + = - π π (131)
The labor employed in the home and foreign economies is given by: . )

N Q C N C N Q C N C Q C σ σ σ σ ρ ρ ρ ρ t M t M t I t I t X t X t D t D t M t M t t I t I t t X t X t D t D N N N N N Q N Q N N , , , , , , , , * , * , * , * , , , , , π π π
N Q N Q N Q N Q π π π π - - - (136)
which simplifies to: Using these relations we obtain a nonlinear system of six equation with six unknowns that together with definitions of some auxiliary variables can be implemented in a numerical procedure to find steady state values of variables. The system is as follows: From equations for average total profits of the domestic and foreign firms: 2), ( 4)-( 6), ( 9), ( 10), (15), ( 16) and ( 24)-( 25 %--------------------------------------------------------------------------% %% %declare in exactly the same order as in the 'var' command in the main file Let us notice that the model is presented in his log-linearized form. Thus we should remember that all endogenous variables here are percentage deviations from the steady state.

+ + - - - = - - - - σ σ σ ρ ρ ρ
Q N Q N C N C N Q N N C Q N C Q π π ρ ρ
Q N Q N C N C N N N C Q N C Q π π
~1 1 1 1 1 - - - - - ⋅         - - ⋅ ∇ = Z L f K TOC f E X X β δ β σ ρ σ (29) , ) 1 ( ~1 * 1 * * 1 * 1 * * 1 * - - - - - ⋅         - - ⋅ ∇ = Z L f K TOL f E M M β δ β σ ρ σ (30) , ) 1 ( ) 1 (
Various blocks can be distinguished in the routine 2 . First we have a part with variables declaration and choosing their type. Then there is a block in which values of all parameter are given. Next comes the model block in which we have all the model equations together with the ones of shocks described by stochastic processes. Finally there is a part where we define the disturbance, its type, scale and persistency. The program finishes with the simulation command for getting the IRFs.

flex4.dyn

/* largely inspired by Ghironi, Melitz 2005 and Contessi 2010 linear stochastic model with FDI and heterogeneous productivity fe, fef, fx, fxf, fii, fif, tau, tauf as endogenous variables */ /* variables in logs Dynare generates a law of motion that is linear in these variables (when order = 1) or a law of motion that is 2nd-order in these variables (when order = 2)*/ //case of financial autarky //temporary aggregate productivity increase in home // //flexible entry costs// // /*- ------------------------------------------------------------------------------* ------------------------------------------------------------------------------*/ varexo Lf, epsz, epszf, epsFE, epsFEF, epsFX, epsFXF, epsFII, epsFIF, epsFXM, epsFXMF, epsTAU, epsTAUF; /*these are respect.: productivity (technology), export cost, FDI cost, FDI ex. cost, icberg cost*/ /*- ------------------------------------------------------------------------------* ------------------------------------------------------------------------------* ------------------------------------------------------------------------------* ------------------------------------------------------------------------------* ------------------------------------------------------------------------------* --------------------------------------- -------------------------------------------------------------- ----------------------------------------------------------------------------- ; lnsm=log(sm); lnsmf=log(smf); %--------------------------------------------------------------------------% %% %declare in exactly the same order as in the 'var ' command

B.2.4 MATLAB routines for getting steady state numerically

Here we present programs that can be used to find the steady state numerically. They can be exploited in case of asymmetric calibration as well as the symmetric one. In case of the latter

flexas.dyn

/* largely inspired by Ghironi, Melitz 2005 and Contessi 2010 linear stochastic model with FDI and heterogenous productivity fe, fef, fx, fxf, fii, fif, tau, tauf as endogenous variables */ /* variables in logs Dynare generates a law of motion that is linear in these variables (when order = 1) or a law of motion that is 2nd-order in these variables (when order = 2)*/ //case of financial autarky //temporary aggregate productivity increase in home // //flexible entry costs// // /*- ------------------------------------------------------------------------------* ------------------------------------------------------------------------- In this thesis we analyse a problem of the real economic adjustment between two countries, one of which is an emerging market and the other is a developed economy. When they form a monetary union the only possible adjustment to asymmetric shocks transmitted internationally is through the real variables. We take into account existing asymmetries in the foreign direct investment (FDI) intensity and FDI relations. The issues of FDI and differences in the FDI intensity are real aspects of functioning of economies and relations between them. They reveal some problem from the macroeconomic perspective. However, the problem relates also to microeconomic foundations. The given trade and FDI relations between countries depend on decisions of firms that are heterogeneous. To study the effect of plant delocalization and FDI on output fluctuations between two countries we use a framework that accounts for all this issues, that means dynamic stochastic general equilibrium (DSGE) models with heterogeneity in firm productivity. We add a new dimension to the existing literature on DSGE models with heterogeneous firms. First, we complete goods market with a new segment of production, namely products offered by multinationals which produce abroad and export back to their economy of origin. Second, we account for asymmetries in the FDI intensity and differences in production structures that occur between two economies forming a monetary union. Summing things up, the analysis allows us to state that the real aspects of economy functioning, such as trade connections between countries and differences in production structures, determine economic performance and behaviour of economies in terms of output fluctuations Keywords: asymmetric production structures, current account, DSGE models, FDI, FDI intensity, heterogeneous firms, international macroeconomics, nominal convergence, plant delocalization, real adjustment

  34) means that the labour in the economy comprises of labour services hired by all intermediate firms on the interval ]production function (1.14):

  Introducing assumptions about the monopolistic competition and sticky prices implies, that the nominal interest rate has to be adjusted to responses of inflation and other economic indicators, that are encompassed in the interest rate rule. The monetary authority has to intervene to minimize the existing distortions. The monetary non-neutralities are consequences of the nominal rigidities. Such role of monetary policy involves possibilities of studying and comparing various monetary regimes in the form of various interest rate rules and different weights for variables used in these rules. The monetary authority can choose the form of the rule it wants to exploit and values of coefficients determining significance of the economic indicators, like inflation or the output gap.

  14), the representative household chooses such a quantity of a single good, that expenditure on it is proportional to the total expenditure on the final good, which we identify with the consumption basket.Goods available for consumers in home economy come from different sectors. There are goods D produced at home by domestic entrepreneurs, import * X by foreign firms, goods * I supplied by foreign affiliates and import M by domestic daughter companies located abroad. Thus, from the point of view of the representative household, it declares demand for varieties available on the home market but coming from various sectors. This demand is expressed as follows:

Figure 2 . 1 .

 21 Figure 2.1. Probability density and cumulative distribution functions of Pareto distribution with unit scale parameter

Figure 2 . 4 .From

 24 Figure 2.4. Numbers of firms against probability density function

Figure 2 . 5 .

 25 Figure 2.5. Shares of sectors against cumulative probability function

Figure 2 .

 2 Figure 2.5 illustrates how the shares of the sectors depend on the cutoff points of the idiosyncratic productivity by the given shape parameter k of the Pareto distribution. The CDF is concave, thus there are fewer high productive firms than the ones with low productivity levels. The share of the given sector is determined by how much its cutoff point is smaller than the next cutoff level.

81 )

 81 Let us notice that labour in the amounts t D l , ~ and t X l , ~ is used by the domestic firms, whereas labour in the amounts t I l , ~ and t M l , ~ is exploited by the foreign multinationals. Thus, we get this way the labour distribution in the home economy.

  (2.119)-(2.134) derived in the part 2.3.1. can be further transformed into the structural form of the model. We work now with variables which are percent deviations from the steady state values of the original variables given in levels. Each endogenous variable depends on the other endogenous variables, including the future ones and also on the exogenous variables. Solving the system is proceeded by numerical methods and means deriving the reduced form of the model in which each endogenous variable depends only on the past endogenous variables and on the exogenous variables.

Figure 2 . 6 . 1 Foreign

 261 Figure 2.6. Temporary aggregate productivity increase in home, Calibration 1

60

  According toAguiar, Gopinath [2007] the countercyclicality of the trade balance and the excess volatility of consumption indicate that permanent technology shocks are much more important in the emerging markets than in the developed countries. They studied this issue in a proposed real business cycle model augmented with a shock to productivity trend (permanent technology shock).

62 .

 62 Analysis of such type allows for studying the impact of change in regime, that means the structural change. Here we can treat given steady state value of the aggregate productivity as regime and question what is the effect of transition to another path of longterm economic.

Figure 2 . 10 .

 210 Figure 2.10. Permanent aggregate productivity increase in home, Calibration 2

Figure 2 . 11 .

 211 Figure 2.11. Permanent aggregate productivity increase in home, Calibration 3

  Because we use much the construction of the symmetric model presented earlier, we mainly outline the basic modification in the form of the assumption about the asymmetric production structures. We focus on the consequences of such asymmetry in the model equation system and in the results in terms of the IRFs comparison. For details of microfoundations and the aggregation issues, especially connected with the heterogeneous firms assumption, we refer to descriptions and computations of Chapter II, which were conducted for the symmetric model.The chapter is organized as follows. At the beginning we describe the whole model construction, with the special attention on the asymmetry assumption, because this is what distinguishes the model of Chapter III from the one presented previously. In the next subsection we provide the steady state analysis and explain how the values of parameters are chosen. In the subsequent part we study, interpret and discuss results of the model and compare them with the results from Chapter II. The aim is to address the issue, whether the way of introducing the asymmetry gives the qualitatively different results and what can be stated form the point of view of both economies. The chapter ends with some conclusions.

  countries and consist of four sectors. The only source of asymmetry in shares of sectors resulted from differences in values of the parameters. Now the asymmetry has a structural character and is introduced at the level of model construction. It has consequences in almost every stage of the model constructing and thus effects the model dynamics. It is revealed for the first time in the intratemporal problem of the consumer.

  income on goods produced and sold by domestic firms at home market, varieties produced by foreign multinationals. In the foreign economy foreign consumers spend * ,t D S of their income on goods produced and sold by foreign firms at foreign market,

  firms we have similarly the respective functions:

Figures 3 .

 3 Figures 3.1 and 3.2 illustrate how decisions of firms in the home and foreign economies depend on cutoff points of the productivity. Their compare their own productivities with the cutoff levels each period and on this basis they decide which strategy of producing and selling to choose.

Figure 3 . 1 .

 31 Figure 3.1. Entry mode in the home economy

  depend on the Pareto distribution characteristic for the foreign economy, that is .There are four types, including multinationals which besides domestic production engage in foreign direct investment to produce abroad and sell there in the number of * ,t I N or export back to their own country economy in the number of :

  engage in FDI and export from abroad to their own country economy:

  .98) Averaging the productivity from the point of the firm production localization we define the average productivity of producers in the given economy regardless the origins

  given by (3.97) and(3.98).Taking together the aggregate accounting and labour market clearing equations for both economies we derive the balanced current account condition:

  proxy for exports of goods and services as percentage of GDP[START_REF] Blinder | Asking About Prices: A New Approach to Understanding Price Stickiness[END_REF] . The share of the foreign multinationals stocks and also expressed in percentage of GDP[START_REF] Borensztein | How Does Foreign Direct Investment Affect Growth[END_REF] . To get values for *

  equal to 0.58 in the asymmetric framework, as a share of the local firms in the total number of firms, equal to the sum of numbers of two sectors only from the symmetric model, namely 0.54 and 0.39. Similarly we treat the steady state value of the share of exporters. concepts like openness or closeness of economies should be analysed only in this sense. The gross domestic product is equal to the aggregate consumption plus the aggregate investment designated for entries of firms. Is what the home consumers buy in other words what the home and foreign producers sell in the home economy. The gross national product is what the home producers sell at home and abroad.

Figure 3 . 3 .

 33 Figure 3.3. Temporary increase in aggregate home productivity -asymmetric model

  t

  expenditure at home. It affects the entrepreneurs who sell to the home consumers, that is foreign exporters

Figure 3 . 4 . 3 )

 343 Figure 3.4. Temporary aggregate productivity increase in home -symmetric model of Chapter II (asymmetric Calibration 3)

*

  It is because the foreign exporting firms do not operate on the foreign market with the home multinationals, while the foreign multinational firms compete with the home firms on the home market.

3 . and 3 . 5 .Figure 3 . 6 .

 33536 Figure 3.6. Reponses of variables to temporary increases in aggregate home and foreign productivities -asymmetric model

Figure 3 . 7 .

 37 Figure 3.7. Reponses of variables to temporary increases in aggregate home and foreign productivities -symmetric model of Chapter II (asymmetric Calibration 3)

  the real exchange rate, but also shifts in numbers of firms in sectors, thus in sizes of sectorial activities and expenditures.

Figure 3 . 8 .Figure 3 . 9 .

 3839 Figure 3.8. Adjustment of sectorial activities and expenditures -temporary aggregate home productivity increase

Figure 3 . 10 .Figure 3 . 11 .

 310311 Figure 3.10. Adjustment of sectorial activities and expenditures -aggregate home and foreign productivities increases; asymmetric model

  no firms with the idiosyncratic productivity high enough to engage in the foreign direct investment. In the model of two open economy this assumption is quite realistic, because we can point the examples of pairs of economies in which only one of them sets its multinationals abroad, while the other one does not or share of such firms is negligible. We do not model the trade connections with the rest of the world.

  responses of home variables to the home aggregate productivity shock in comparison to reaction of foreign variables to the foreign productivity increase. The symmetric structure, even by the asymmetric Calibration 3, displays almost identical responses of home and foreign variables to the respective shocks. The asymmetric production structures assumption leads to the situation, in which the home economy reacts differently to the home shock than the foreign economy to the foreign disturbance. When the home economy has only two sectors of production and the foreign one has four sectors, then CPI-based real exchange rate responds with different power to the home and foreign shocks. The discrepancy between the welfare-based and the CPI-based RER is higher in case of the foreign shock. Thus, the variety effect is more visible in this case and it has significant consequences for the domestic buyers, who start to have lower utility from spending the same amount on the home market, due to the decline in the goods variety available for them.

A. 1

 1 Mathematical appendix to Chapter I: Introduction to methodology of DSGE models A.1.

( 81 )

 81 If we shift the time index one period into the future, multiply by θ β and put the conditional expectation ,

1 . 7 ,

 17 to derive the Blanchard-Kahn condition for the basic New Keynesian model (1.72)-(1.74) described in Chapter I. Let us remind that the model can be presented as follows:

δ

  and substituting equation (3) to the other first-order conditions: ]

.

  mark-up over the marginal cost.

  Average productivities are obtained by integrating the probability distribution function of the Pareto distribution and account for the elasticity of substitution between goods.

(

(

  In Table2.1. from Chapter II we have the model summary showing all the most important equations from the home economy perspective. The respective equations for the foreign economy are analogous. But we present them here to highlight which parameters for the both economies can have different values. Of course the balanced current account equation remains unchanged.

  In the asymmetric steady state we do not impose the same values of parameters for both economies. In particular it is allowed that: be obtained numerically on the basis of relations among these variables in the steady state.For the numerical procedure of getting the steady state we have to state a system of equations that have unique solution depending on values of parameters. This system can be derived from equations of balanced current account, average profit of home firms, average profit of foreign firms, price index in home, price index abroad and definitions of variables .

  TON All the other quantities are auxiliary variables, parameters or functions of parameters. System (147)-(152) allows for different values of parameters for two economies ,thus for different steady state values of respective variables. When we assume the full symmetry between two economies in the steady state then from (147) we get: ), (155), in turn, can be reduced to the equation of hyperbola: the same as equation (2.112) from Chapter II, when . 1 = τ System (147)-(152) can be solved numerically. Steady state values of the remaining variables are obtained analytically from their definitions and other model relations. From equations of price indices, aggregate accounting and average profits of multinationals' exporting firms we get: be obtained numerically on the basis of relations among these variables in the steady state.From the equation of balanced trade:

  From equations of price indices in the home and foreign economies:

  .

  ) constitute the system of eleven analytical equations of following variables: can be found numerically. Steady state values of the remaining variables are obtained analytically from their definitions and other model relations.From equations (17) and (20), aggregate accounting and average profits of exporting firms and foreign exporting multinationals we get:

  ------------------------------------------------------------------------------*/ //parameters' transformations # theta_big=(1-alfa)/(1-alfa+alfa*epsi); # lam=(1-theta)*(1-bet*theta)/theta*theta_big; # kap=lam*(gam+(phi+alfa)/(1-alfa)); # ksi=(1+phi)/(gam*(1-alfa)+phi+alfa); # mi=log(epsi/(epsi-1)); # wal=-(1-alfa)*(mi-log(1-alfa))/(gam*

  routine for getting IRFs, temporary shockTo solve and simulate DSGE models we use the DYNARE software. The routine is written in the MATLAB environment[START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] , because DYNARE is a pre-processor which exploits MATLAB source routines. The program with the model description is saved as a '.dyn' file and can be called directly in the MATLAB command window.

  / //the steady state is computed in the file flex4_steadystate.m /*-

  / //parameters' transformations # mi=sig/(sig-1); # s=sig-1; # is=-s; # tri=k/(k-s); # trif=kf/(kf-s); # theta=(1-bet*(1-delta))/(bet*(1-delta)); # zd=tri^(1/s)*zmin; # zdf=trif^(1/s)*zminf; w=1/mi*zmf*romf*Z*1/tau; wf=1/mi*zm*rom*Zf*1/tauf; wff=w*Zf/Z*tol; c=w*(L+nd*feb/Z); cf=wf*(Lf+ndf*febf/Zf); cff=c*toco; %----------------------------------------% %% nee=delta/(1-delta)*nd; nef=delta/(1-delta)*ndf; nm=(zmin/zm)^k*tri^(k/s)*nd; nmf=(zminf/zmf)^kf*trif^(kf/s)*ndf; nx=nm*kap^k*(lam^k*tol^(mi*k)-1); nxf=nmf*kapf^kf*(lamf^kf*tol^(-mi*kf)-1); ni=nm*(kap^k-1); nif=nmf*(kapf^kf-1); ndo=nd-nx-ni-nm; ndof=ndf-nxf-nif-nmf; %-

  % %% gdp=c*(nd*rod^is+nif*roif^is)+ cf*(nx*rox^is+nmf*romf^is)+nee*v; gdpf=cf*(ndf*rodf^is+ni*roi^is)+ c*(nxf*roxf^is+nm*rom^is)+nef*vf; %gdp=ad+ax+aif+amf+nee*v; %to check correctness of analytical calculations %gdpf=adf+axf+ai+am+nef*vf; gnp=c*(nd*rod^is+nm*rom^is)+ cf*(nx*rox^is+ni*roi^is)+nee*v; gnpf=cf*(ndf*rodf^is+nmf*romf^is)+ c*(nxf*roxf^is+nif*roif^is)+nef*vf; %gnp=ad+ax+ai+am+nee*v; %to check correctness of analytical calculations %gnpf=adf+axf+aif+amf+nef*vf; FDI=(ni*proi+nm*prom)/y; FDIf=(nif*proif+nmf*promf)/yf; netFDI=(ni*proi+nm*prom-nif*proif-nmf*promf)/y; netFDIf=-(ni*proi+nm*prom-nif*proif-nmf*promf)/yf; %----------------------------------------% %% Q=1; q=Q*((nd+nxf+nif+nm)/(ndf+nx+ni+nmf))^(1/s); tot=(nxf+nmf)/(nx+nm)*(nx*rox+nm*rom)/(nxf*roxf+nmf*romf); ntt=tau/Q*(nd*rod/(nd+nif)+nif*roif/(nd+nif))/(nx*rox/(nx+nmf)+nmf*romf/(nx+nmf)); nttf=tauf*Q*(ndf*rodf/(ndf+ni)+ni*roi/(ndf+ni))/(nxf*roxf/(nxf+nm)+nm*rom/(nxf+nm)) Ztilde=1/(nd+nx+nif+nmf)*(nd*zd+nx*zx+nif*zif+nmf*zmf)*Z; Zftilde=1/(ndf+nxf+ni+nm)*(ndf*zdf+nxf*zxf+ni*zi+nm*zm)*Zf; %-

  we obtain in fact only eight values of interest, six of which are designed for the home and the foreign economy and two of them are just equal to one as ratio values in case of symmetry.The asymmetric calibration gives fourteen values found numerically. But some of them are just auxiliary ones. The steady state values we want to obtain are . routine for getting IRFs, temporary shockThe structure of the routine is very similar to the one for the symmetric model from Chapter II. It is written in the MATLAB language, but uses DYNARE as an overlay for the MATLAB. This main program with the whole model description calls for some other routine written in MATLAB to get steady state values of variables.

Table 1 . FDI outward stocks in percentage of GDP

 1 Source: Eurostat database, EU direct investment, main indicators, data updated in December 2012.

		2006	2007	2008	2009	2010
	Germany	32.4	34.9	34.6	32.8	34.0
	Poland	4.0	4.6	4.7	6.6	9.3

Table 2 . FDI positions by partner country, millions of euros, German economy perspective

 2 Values in brackets are expressed in percentage of GDP, the German one in case of outward FDI and of the partner economy in case of inward FDI. Source: OECD.Stat, Dataset: FDI positions by partner country. Eurostat database, GDP and main components, currents prices, data updated in March 2013. Author's calculations

	Type	Partner Country	2006	2007	2008	2009	2010
	Outward in Inward from	France	41309 (1.79%) 61728 (3.43%)	45875 (1.89%) 63184 (3.35%)	43782 (1.77%) 65270 (3.38%)	40394 (1.70%) 62845 (3.33%)	41501 (1.66%) 66311 (3.42%)
	Outward in Inward from	Poland	14186 (0.61%) 200 (0.07%)	17392 (0.72%) 198 (0.06%)	16388 (0.66%) 273 (0.08%)	17069 (0.72%) 325 (0.10%)	19424 (0.78%) 477 (0.13%)

  . The model economy consists of four types of economic agents. A representative household consumes the final good and works for intermediate firms. There is a continuum of such firms. Each of them is a monopolist in the production of a particular intermediate good. Hence, it is able to set the price for this good. Composing the differentiated goods provided by intermediate firms a representative final-good producing firm sells its product to households in a competitive market. The monetary authority sets the nominal interest rate.

  Expenditures of the household come from consumption of the final good whose price is t P and saving, that means buying one-period discount government bonds with price t Q

																	1)
	subject to the intertemporal budget constraint:
								P t	C	t	+	Q t	B t	≤	B t	1 -	+	W t	L t	-	T	,	(1.2)
	where t C denotes the quantity consumed of the single good and t L means hours of work 13 .
	The parameter	β	∈	(	) 1 , 0	is called a time discount factor and represents the idea that
	consumers are impatient in their decisions about consumption and leisure. When viewed from
	the perspective of the current period , t given levels of consumption and leisure in the future
	do not generate as much utility as do the same levels of consumption and leisure in the period
	t	.
	(thus with gross rate of return	/ 1 t	)
																	1	1
												(	,	)		1	1	,

Q . The source of income is sale of government bonds bought in the previous period and nominal wage t W taken as given. Other sources of income or expenditures are enclosed in a lump-sum component .

t T

We consider the household utility function of the form:

Table 1 .1. BNK model summary Price setting rule

 1

  Derivation of the whole log-linearized system (1.59)-(1.65) is presented in Appendix A.1.5.

	y	t	=	E	t	{	y	t	1 +	}	-		1 γ	( i	t	-	E	t	{ π	t	1 +	}	-	ρ	),	(1.61)
	mc	t	=		  	γ		+	1 ϕ	α α + -	  	y	t	-	1 1	-+	α ϕ	a	t	,	(1.62)
												~n t t t y y y -=	,	(1.63)
	0	=	  	γ	+	1 ϕ	α α + -	  	y	n t	-	1 1	-+	α ϕ	a	t	,	(1.64)
									π	t			=		p	t	-	p	t	1 -	.	(1.65)
	Equation (1.61) is a dynamic and forward-looking relationship between the aggregate
	activity t y and the ex-ante real interest rate	t r		=	i	t	-	E	t	{ 1 + t	},

Table 1 .2. Log-linearized model summary

 1

											and (1.68) display the crucial role of monetary policy in shaping
	expectations about the future economic outcomes and, through this, in the current outcomes
	of the economy.
		Introducing the natural rate of interest:
																t r	n	=	ρ	+	γ	E	t	{ 1 n t y +	-	y	n t	}	(1.69)
	and using the definition of the natural level of output, we can rewrite equation (1.61) as:
											{ ~1 1 ) } { ( 1 + + + ---= t t n t t t t t y E r E i y π γ	}.	(1.70)
		Combining (1.62), (1.64) and (1.67) ,we can express the NKPC in the form:
																π	t	=	β	E	t	{ 1 t π +	+	κ	, } t y	(1.71)
	where	κ	=	λ	( γ	+	( ϕ	+	α	)	1 /(	-	α	)	).
		We can notice that the system (1.59)-(1.65) can be reduced to the NKPC and the DIS
	equations. These two equations, in three endogenous variables	t i y , ~	t	and	, π constitute the t
	non-policy block of the basic New Keynesian model. To close the model, we need another
	equation. Regarding the influence of the monetary policy, mentioned earlier, one should
	describe how this policy is conducted. Thus, the model is closed with the interest rate rule.
	Table 1.2. presents the whole log-linearized model, which is linear in its equations and
	accounts for all decision rules of all agents.
	New Keynesian Phillips curve		π	t	=	β	E	t	t { 1 κ π + +	t } y	(1.72)
	Dynamic IS equation					{ ~1 1 ) } { ( 1 + + + ---= t t n t t t t t y E r E i y π γ	}	(1.73)
	Interest rate rule						i	t		=	+ ρ π φ	π	t	+	y	t φ y	+	v	t	(1.74)
	Source: Author's calculations

Table 1 .3. Calibration of parameters

 1

	Parameter	Value	Meaning
	1	-	α	2/3	elasticity of production with respect to labour
	β			0.99	discount factor
	γ				1	relative risk aversion
	σ			6	elasticity of substitution among goods
	ϕ			1	elasticity of marginal disutility with respect to labour
	φ	π		1.5	influence of inflation rate in the interest rate rule
	φ	y		0.5/4	influence of output gap in the interest rate rule
	ρ	a		0.9	persistency of technology shock
	ρ	v		0.5	persistency of monetary policy shock
	θ				2/3	probability of retaining old price
	Source: Author's synthesis

Table 2 .1. FDI outward stocks in percentage of GDP

 2

		2006	2007	2008	2009	2010
	Germany	32.4	34.9	34.6	32.8	34.0
	Poland	4.0	4.6	4.7	6.6	9.3

Source: Eurostat database, EU direct investment, main indicators, data updated in December 2012.

Table 2 .

 2

1.

  stands for the elasticity of substitution among goods. Let us notice that in period

						13)
	where	σ	>	1
	t only a subset of goods	Ω t	⊂	Ω	is available for consumption. Moreover, subsets of goods
	available for consumption in home t Ω and foreign *

t Ω economy can differ.

  . Occurrence of such a shock is independent on the firm productivity level and it induces the bankruptcy of δ entrepreneurs, both producing and the new entrants.

	to establish a firm, it draws its level of the idiosyncratic productivity z from a common
	distribution	G	(z	)	with a support on	, [ min ∞ z	).	13 Each period, firms are hit by a bad shock with
	constant probability	δ	∈	, 0 (	) 1
	Production
	Each firm produces a different variety	ω	∈	Ω	using labour with productivity t Z . Costs
	of production account for producing	(ω	)
											t w	f	E	,	t	/	Z	t	.	Then, if the producer decides

t E f , effective labour units, before it starts production one period later. This entry cost is sunk, paid only once and equal to t y

  business entity as far as exporting from abroad to the domestic economy is not concerned, in the sense that such an activity would bring loss for firms with the productivity

																						t z , changes. Any firm with X
	z		>	z	X	,	t	is a profitable business entity as far as location only on the home economy market
	is concerned, in the sense that engaging in the foreign direct investment would bring loss for
	firms with the productivity	z	X	,	t	<	z	<	z	I	,	t	.	Firms with the productivity level	z	>	z	X	,	t	enter the
	export market, but only a part of them can consider whether to establish a daughter company
	abroad.
								If a firm has the relative productivity	z =	z	I	,t	,	which is the cutoff point for engaging
	in the foreign direct investment, then	π	I	,	t	( , I z	t	)	=	0	and it can consider establishing
	multinational network and locating its affiliate on the foreign market. Any firm with	z	z	I	t
	z	I	,	t	<	z		<	z	M	,	t	.			Firms with productivity level	z	z	I	t
								With the relative productivity	z =	z	M	,t	,	which is the cutoff point for multinationals'
	exporting,		M	,	t	( , M	t	)	=	0
																						z	z	M	t

, > is a profitable , > enter the sector operating in the foreign direct investment, but only a part of them can consider whether to start exporting to the home economy. z π and a firm considers using its daughter company to produce goods abroad and selling them back on the home market. Any firm , >

  See Appendix A.2.13 for details. use the aggregate productivity t Z common for the whole economy, which expresses the average productivity of firms regarding their origins. But we can also average the productivity from the firm production localization perspective, and thus consider the average productivity

	of home producers:
				*	*	*	* *
	,	,	,	* ,	,	,	,	.
	,		,	,	,

  . Our model is the two country model, hence the special interest is in bilateral interdependences of all types. Non-traded to traded price ratio measures what is the relation of the average price

	t NTT	=	t t Q τ	⋅	, , D t t X N N	+ +	* , * I M N N	, t	t	⋅	, D t , X N N	, D t , X ρ ρ t	t	* * , , M t t I N N + +	~* , * , M t I ρ ρ	t	.	(2.97)
									*	,	*	,			*	, ,	~* , ,	.

of goods that are not traded in the home economy to the average exports price. In this definition we encompass also the products that are sold in home by the foreign multinationals and the products that are exported by such firms back to the foreign economy. The variable is expressed in units of the home consumption and constructed in such a way that not to account for iceberg costs. Prices are weighted by shares of given products in the whole mass of non-traded or traded goods: Another variable of interest is terms of trade. It is a ratio of the price index for exported goods to the price index for imported ones, weighted by shares of given products in the whole mass of exported or imported goods:

Table 2 .3. Values of parameters in line with the literature, symmetric model

 2

	Parameter							Value	Source
	β								0.99
	δ								0.025	Ghironi, Melitz [2005]
	γ								2
	σ								3.8	Bernard et al. [2003]
	k								3.4	Ghironi, Melitz [2005]
	Source: Author's synthesis
	The subjective discount factor	β	=	0	.	99	is a standard choice for quarterly business cycle
	models giving the steady state value of the interest rate	r	=	1	%	44 . The probability of a firm
	bankruptcy	δ	=	0	025 .	corresponds with the level of 10 % job destruction per year. The
	parameter of relative risk aversion	=	2
									goods	σ	=	8 . 3
	corresponds to the constant mark-up over marginal cost equal to 35.7 % net. The shape
	parameter of the Pareto distribution is	k	=	. 4 . 3	This involves that a standard deviation of log
	sales of a firm	1	/(	k	-σ	+	) 1	is equal to 1.67

γ

is also a standard choice when we interpret periods as quarters. A consumer prefers a consumption level that with certainty would enable him to for the rest of its lifetime consume some given level of goods quarterly, rather than a risky alternative where he with a 2% probability would be able to consume one unit less and with a 98% probability an infinite amount. The elasticity of substitution among

Table 2 .

 2 2. The steady state interest rate is given by Bernard et al. [2003] report that a standard deviation of log plant sales in the USA is 1.67. Their different values in various calibrations are presented in Table 2.4.

	r	=	1 (	-	β	)	/	β	.

[START_REF] Kleiber | Statistical Size Distributions in Economics and Actuarial Sciences[END_REF]

τ

Table 2 .4. Parameters shaping sectorial shares, symmetric model

 2

	Parameter	Calibration 1	Calibration 2	Calibration 3
	u		f	X	,	u	* f	X	0.18	0.11	0.17, 0.12
		u	f	I		u	f	I	1.10	0.26	1.30, 0.21
	u	f	XM		u	f	XM	1.95	0.95	1.95, 0.87
				τ	, τ	*	1.09	1.09	1.09, 1.09

* , * , Source: Author's calibrations In the first and second calibrations parameters for the foreign economy in a given version of the model have the same values as for the home economy. This induces the symmetric settings. Calibration 3 results in regarding economies that differ in long-run tendencies as they exhibit different steady state values of respective variables. Changing values of the parameters we can control for the main steady state relations of interest.

Table 2 .5. Parameters shaping values of macro variables

 2

	Parameter	Calibration 1	Calibration 2	Calibration 3
	z	min , z	* min	1.03	1.02	1.02, 1
		f	E	* , E f	1	1	1, 1.18
		Z	, Z	*	1	1	1, 1.08
	Source: Author's calibrations

Table 2 .6. Exports of goods and services as percentage of GDP

 2 Source: Eurostat database, GDP and main components, current prices, data updated in April 2012.

		2005	2006	2007	2008	2009
	Germany	41.3	45.5	47.2	48.1	41.9
	Poland	37.1	40.4	40.8	39.9	39.4

Table 2 .7. FDI outward stocks as percentage of GDP

 2

		2005	2006			2007	2008	2009
	Germany	30.3	32.4			34.9	34.6	37.6
	Poland	2.2	4.0			4.6	4.7	6.6
			I N N /	D	and	N	/ D M N	.

Source: Eurostat database, EU direct investment, main indicators, data updated in March 2012.

By a given calibration of parameters we get steady state levels of main variables, presented in Table

2

.8

[START_REF] Kydland | Time to Build and Aggregate Fluctuations[END_REF]

. Calibration 1 is consistent with the mentioned indicators for Poland, whereas Calibration 2 with the data for German economy. The third calibration gives us relationships found in both economies respectively. Unfortunately it is impossible to find data connected with separated variables

Table 2 .8. Steady state relationships, symmetric model

 2

								Steady state values
	Variable	Calibration	Meaning
								1	2	3
	DO N N /	D	0.54	0.21	0.54, 0.21	share of local firms
	X N /	N	D	0.39	0.42	0.39, 0.42	share of exporters
	I N N /	D	0.06	0.33	0.05, 0.33	share of multinationals
	M N /	N	D	0.01	0.04	0.02, 0.04	share of exporting MNFs
	E N N /	D	0.026	0.026	0.026, 0.026 share of new entrants
	D ~ z						1.92	1.89	1.89, 1.86	average productivity of home firms
	X ~ z						1.64	1.21	1.60, 1.19	average productivity of exporters
	I ~ z						2.76	1.75	2.62, 1.74	average productivity of multinationals
	z	M						3.57	2.57	3.31, 2.62	margin productivity of exporting MNFs
	Z ~						1.92	1.79	1.86, 1.89	average productivity of home producers
	C /	Y					0.86	0.86	0.86, 0.86	aggregate consumption / GDP
	N v E / ~	Y	0.14	0.14	0.14, 0.14	aggregate entry investment/GDP
	π	N D /	Y	0.19	0.19	0.19, 019	dividends / GDP
	w						3.39	3.39	3.39, 3.39	real wage
	Source: Author's calculations

Table 2

 2

	.4. it can be derived as

The home economy result is comparable in the first and third calibrations. The foreign economy result is comparable in the second and third calibrations.

  2.138) we observe rising of the consumption t C and of the income t Y in the home economy. That means that the effect of the positive productivity shock is higher demand and higher expenditure. It affects the entrepreneurs who sell to the home consumers,

	that is foreign exporters			N	* X	,t	,		foreign multinationals * ,t I N and home re-exporters	N	M	,t	.
	Moreover, producers	N	X	,	t	,	N	* , I	t	,	N	* M	,	t	who employ the home labour face now lower costs

of production due to the more productive home labour. Altogether we can see that in each

7. Temporary aggregate productivity increase in home, Calibration 2

  . The IRFs for such an economy are presented in Figure2.7.When it comes to the comparison of calibrations 1 and 2 we can state that the biggest differences occur in responses of variables shaping bilateral relations between two countries,

	especially connected with export and re-export. The second calibration gives stronger reaction
	of exporting firms	t N , and X	N	* X	,t	,	whereas the first one gives more intensive responses of re-
	exporting multinationals	t N , and M	N	* M	,t	.
	Figure 2.Foreign economy, t q and

t TOT in dashed line

Table 2 .9. Characteristics of impulse-response functions, domestic variables, symmetric model

 2

	Domestic variable	Calibration 1	Calibration 2	Calibration 3
	N	D	0.65	(49)	0.68	(50)	0.66	(50)
	N	X	0.44	(50)	0.61	(50)	0.52	(50)
	N	I	0.67	(50)	0.63	(50)	0.69	(50)
	N	M	0.35	(50)	0.27	(50)	0.30	(50)
	N	E	4.39	(14)	4.37	(9)	4.41	(8)
	TOL	-.03	(44)	-.00	(27)	-.02	(41)
	TOT	0.10	(50)	0.14	(50)	0.11	(50)
	NTT	0.04	(42)	-.07	(50)	-.05	(50)
	C		0.35	(45)	0.34	(50)	0.35	(48)
	w		0.99	(31)	0.99	(32)	0.99	(32)
	Y		0.85	(36)	0.85	(31)	0.85	(38)
	Z ~		0.99	(18)	0.96	(10)	0.97	(12)

Table 2 .10. Characteristics of impulse-response functions, foreign variables, symmetric model

 2

	Foreign variable	Calibration 1	Calibration 2	Calibration 3
	N	* D		-.11	(50)	-.16	(50)	-.14	(50)
	N	* X		-.35	(50)	-.52	(50)	-.39	(50)
	N	* I		-.60	(50)	-.57	(50)	-.56	(50)
	N	* M		-.27	(50)	-.19	(50)	-.23	(50)
	N	* E		-.24	(34)	-.32	(47)	-.28	(40)
	Q			0.14	(50)	0.15	(50)	0.14	(50)
	q				0.22	(50)	0.13	(50)	0.18	(50)
	NTT	*	0.11	(44)	0.17	(50)	0.12	(49)
	C		*		0.04	(50)	0.05	(50)	0.05	(50)
	w	*		0.03	(50)	0.04	(50)	0.03	(50)
	Y	*		-.04	(50)	-.05	(50)	-.04	(50)
	Z		*		0.06	(50)	0.08	(50)	0.09

Table 3 .1 FDI positions by partner country, millions of euros, German economy perspective

 3 Values in brackets are expressed in percentage of GDP, the German one in case of the outward FDI and of the partner economy in case of the inward FDI, that means the Polish GDP.

	Type	Partner Country	2006	2007	2008	2009	2010
	Outward in Inward from	Poland	14186 (0.61%) 200 (0.07%)	17392 (0.72%) 198 (0.06%)	16388 (0.66%) 273 (0.08%)	17069 (0.72%) 325 (0.10%)	19424 (0.78%) 477 (0.13%)

Source: OECD.Stat, Dataset: FDI positions by partner country. Eurostat database, GDP and main components, currents prices, data updated in March 2013. Author's calculations

In Table

3

.1. we can notice a high degree of asymmetry in the bilateral FDI relations between Poland and Germany. It is not the same situation as we described in Chapter II,

Table 3 .2. Summary of the asymmetric production structures assumption

 3

	Economy							Home												Foreign
	Production side	Numbers of firms				N	DO	,	t				N	X	,	t			N	* DO	,	t			N	* X	,	t	N	* , I	t	N	* M	,	t
				Sectorial activities							X A ,	t									A	* X	,	t	* , I A	t	* M A	,	t
	Consumption side	Shares of expenditures	S	D	,	t			S	X	,	t			S	I	,	t			S	* D	,	t	S	* X	,	t	S	* M	,	t
	Source: Author's synthesis
			In the home economy, income of all exporting firms is expressed by	A	X	,t	.	In the
	foreign economy there are another two sources of income, * ,t I A from engaging in FDI and
	A	* M	,t

  To deal with exchange rates, first let us notice that the welfare-based

	t P	*	=	[ N	* D	,	t	p	* D	1 , -σ t	+	N	X	,	t	p	1 -, σ t X	+	N	* M	,	t	] , ~11 1 * , σ σ --t M p	(3.102)
	which gives following equations with relative prices:
		=	N	D	,	t	ρ	1 -, σ t D	+		N	* X	,	t	ρ	* X	1 , -σ t	+	N	* , I	t	, 1 1 * , σ ρ -t I	(3.103)
						*	,							*	1 ,							,	1	,	*	,	1 1 * . ,
	price indices are:
	t P	=	[ N	D	,	t	p	1 -, σ t D	+	N	* X	,	t	p	* X	1 , -σ t	+	N	* , I	t	] , ~11 1 * , σ σ --t I p	(3.101)

  .4, obtained in the Final Calibration, lead to Calibration 3 steady state results as close as it possible. Let us notice, that to get desired steady state relationships, we had to control also for the shape parameters of the Pareto distributions

				k	, k	*
	and steady state values of the iceberg costs	τ	, * τ	.

Table 3 .4. Parameters shaping sectorial shares, asymmetric model

 3 For the symmetric model in three different calibrations we needed equal or very close steady state values of variables for the home and foreign economy, to be able to make comparison of scale of responses resulting from the different distributions of various types of firms in the economy. Now, not only the steady state is asymmetric, but also the dynamics of the model itself. Thus, we expect not only quantitative, but also qualitative differences in IRFs. Hence, we are not any more interested in getting the steady state values equal for both economies.

	Parameter	Starting calibration	Final calibration
	z	min , z	* min	1.02, 1	1.02, 1
			k	, k	*	3.4, 3.4	3.6, 4.8
	u	f	X					u	f	X	0.17, 0.12	0.13, 0.21
				u	* f	I	0.21	0.28
			u	* f	XM	0.87	0.19
			τ	, τ	*	1.09, 1.09	1.7, 1.09
		f	* , E E f	1, 1.18	1, 1.12
			Z	, Z	*	1, 1.08	1.13, 1.26
	In the Starting calibration values of parameters are the same as they were in Calibration 3 for the symmetric
	model of Chapter II.
	Source: Author's calibrations
	We impose	Z	, Z	*	to get similar real wages in both economies, equal to the values
	from Calibration 3.

*

,

Table 3 .5. Values of parameters in line with the literature, asymmetric model

 3

	Parameter	β	δ	γ	σ
	Values	0.025	0.025	2	3.8
	Source: Author's synthesis

Table 3 .6. Steady state relationships, asymmetric model

 3

	Steady state values

welfare-/CPI-based real exchange rate

The steady state values of the symmetric model in Calibration 3 are just recalled here for the sake of comparison possibility. Source: Author's calculations

Table 3 .7. Steady state GDP, GNP and shares of expenditures

 3

	Meaning			Asymmetric model home foreign	Symmetric model Calibration 3
	GDP				4.02, 6.68	4.2, 4.2
	GNP				2.98, 7.71	4.2, 4.2
	spending on goods:
	domestic	S	* , D D S		0.55, 0.87	0.55, 0.59
	imported	S	* , X X S		0.17, 0.10	0.06, 0.10
	of foreign MNFs at home	S	* , I I S	0.28 -	0.13, 0.09
	of home MNFs abroad	S	* , M M S	-0.03	0.26, 0.21
	The steady state values of the symmetric model in Calibration 3 are just recalled here for the sake of comparison
	possibility.
	Source: Author's calculations

Table 3 .8. Characteristics of impulse-response functions, domestic variables, asymmetric model in comparison with symmetric model (asymmetric Calibration 3)

 3

	Domestic variable	Asymmetric model	Symmetric model Calibration 3
	N	D	0.81	(44)	0.66	(50)
	N	X	0.41	(46)	0.52	(50)
	N	I	_______	0.69	(50)
	N	M	_______	0.30	(50)
	N	E	5.44	(8)	4.41	(8)
	TOL	-.08	(46)	-.02	(41)
	TOT	0.01	(50)	0.11	(50)
	NTT	-.02	(50)	-.05	(50)
	C		0.37	(41)	0.35	(48)
	w		1.01	(29)	0.99	(32)

Y

0.89

Table 3 .9. Characteristics of impulse-response functions, foreign variables, asymmetric model in comparison with symmetric model (asymmetric Calibration 3)

 3

	Foreign variable	Asymmetric model	Symmetric model Calibration 3
	N	* D	-.04	(50)	-.14	(50)
	N	* X	0.32	(46)	-.39	(50)
	N	* I	-.60	(50)	-.56	(50)
	N	* M	-.55	(50)	-.23	(50)
	N	* E	-.09	(26)	-.28	(40)
	Q		0.09	(47)	0.14

Table 3 .10. Comparison of asymmetric and symmetric models, reaction of variables to aggregate home and foreign productivity shocks

 3

	Variable	Asymmetric model	Symmetric model Calibration 3
	aggregate home productivity increase
	terms of labour	-.08		-.02
	terms of trade	0.01		0.11
	number of foreign firms	-.04		-.14
	number of foreign exporters	0.32		-.39
	number of foreign exporting multinationals	-.55		-.23
	number of foreign new entrants	-.09		-.28
	welfare-based RER	0.09		0.14
	CPI-based RED	0.17		0.18
	foreign non-traded to traded price ratio	0.06		0.12
	aggregate home/foreign productivity increase 16
	response of:	home variable	foreign variable	home variable	foreign variable
	number of firms	0.81	0.55	0.66	0.66
	number of exporters	0.41	-0.25	0.52	0.49
	terms of labour 17	-.08	-.06	-.02	-.02
	terms of trade	0.01	0.03	0.11	0.11
	welfare-based RER	0.09	0.1	0.14	0.14
	CPI-based RER	0.17	0.24	0.18	0.19
	non-traded to traded price ratio	-.02	0.07	-.05	0.02
	Source: Author's numerical simulations and the synthesis

  Log-linearization of the aggregate price dynamics equation is as follows:

	where	i	t	≈	1 ln(	+	i	t	)	=	ln	t R	and	ρ -=	ln β	.
														t R	=	-			+ β π φ	Π	t	+	φ	y	t Y	+	v	t	(40)
	Knowing that:
												π	t	=	ln	Π	t	-	ln	Π	=	ln	Π	t	-	ln	1	=	ln	Π	t	,	(41)
													ln ~t t 1 ln ln ln ln t t Y Y Y Y y = -= -=	,	(42)
	we get the interest rate rule in terms of the log-deviations:
															i	t	=	+ ρ π φ	π	t	+	φ	y	~t t v y +	,	(43)

6 New Keynesian Phillips curve

															E	t	0 ∑ ∞ k =	θ	k	t Q	,	t	+	k	t Y	+	k	t	{ P t	*	-	µ	MC	t	+	k	t	t P	+	k	} , 0 ) =	(64)
	where	MC	t	+	k	t	=	t Ψ′ +	k	( Y t	+	k	t	)	/	t P	+	k	.
	Let us remind that:
																													,
																													Π	t	=	1 -t P t P	(61)
	after the log-linearization, takes the form:
										ln	Π	t	=	ln	P t	-	ln	P t	1 -	=	(ln	P t	-	ln	P	)	-	(ln	P t	1 -	-	ln	P	),	(61)
	which gives:
																												π	t	=	p	t	-	p	t	1 -	.	(62)
	A.1.We begin with:
															E	t	0 ∑ ∞ k =	θ	k	t Q	,	t	+	k	t Y	+	k	t	{ P t	*	-	µ	Ψ′ + t	k	( Y t	+	k	t	} , 0 ) =	(63)
	which can be written as:

.7 Blanchard-Kahn method

	A.1Let us consider a linear model in the following form:
																								B	  	1 + 1 t + y t x t E	  	=	A	  	t t y x	  	+	G	ε	t	,	(86)
	where t x is a	( × n	) 1	vector of predetermined variables at date t , t y is a	( × m	) 1	vector
	of predetermined variables and t ε is a	( × k	) 1
		p	t						E	t				p	t					mc	t								E	t	p	t	p	p	(83)
	which can be written also as:
												p	* t	-	p	t	1 -	=	β	θ	E	t	{ * t p + 1	-	p	t	}	+	Θ	1 (	-	β	θ	)	mc	t	+	π	t	,	(84)
	where	Θ	=	1	-	1 α -+ α α	σ	.
	Exploiting (46) and (84), we finally derive an approximate New Keynesian Phillips curve:
																										π	t	=	β	E	t	{ 1 t π +	}	+	λ	mc	t	,	(85)
	where	λ	=	1 (	-	θ	1 )( θ	-	βθ	)	. Θ

Mathematical appendix to Chapter II: Symmetric DSGE model with heterogeneous firms A.2.1 Euler equations for shares and bonds

  One of the first-order conditions of Lagrangian problem gives:

	A.2
									a	0 >	, 1	(104)
									1 a	<	1 0 a +	.	(105)
	From (104) it results that:
					φ	y	+	κ	φ	π	>	-	1 (	-	β	) γ	,	(106)
	which is always satisfied as	β	∈	(	; 0	). 1
	From (105) we get that:
					( φ κ π	-	) 1	+	1 (	-	β	) φ	y	>	0	.	(107)

[START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF]

:

.13 Total demand for labor

	l	M	,	t		( ω	)		=	( σ			-	) 1	   	t Q	π	* M w t ,	t	( ω	+	f	* , t I	+ Z	t	f	* XM	,	t	   	⇔	) ) 1 ( * , ,     + -= t t M t t M w Q l π σ	f	* , t I	+ Z	t f	* XM	,	t	.    	(122)
	A.2+ + + + = t M t M t I t I t X t X t D t D D t l N l N l N l N , , , , , , , , L * * ~
	N	E	,	t				t E Z f ,	t		+		N	X		,	t						t X Z f ,	t			+	N	I * ,	t	t * t I Z f ,	+	N	M *	,	t	f	t * I ,	+ Z	t f	XM *	,	t	=
	( σ		-	1	N	D	,	t		+ ) t t D w , π	( σ			-	1	N	X	,	t	  	+ ) t t X w , π	t X Z f ,	t	  	+	( σ	-	1	N	I * ,	t	   	+ ) I t t I Z f w t Q * t t , * , π	   	+
	( σ		-	1	N	M *	,	t	   	Q	t	+ ) I t t M f w * t , * , π	+ Z	t f	XM *	,	t	   	+	N	E	,	t	t E Z f ,	t	+	N	X	,	t	t X Z f ,	t	+	N	I * ,	t	t * t I Z f ,	+	N	M *	,	t	f	t * I ,	+ Z	t f	XM *	,	t	=
		-t w σ	1			N		D	,	t	π	D	,	t				+		N	X	,	t	π	X	,	t	+	t Q	N	* , I	t	π	* , I	t	+	t Q	N	* M	,	t	+ ( ) * , t M π
	σ +		1 Z σ    t σ			N	E	,	ω t f	E	,	t			+	N	X	,	t	f	X	,	t	+	N	* , I	t	f	ω * , t I	+	σ * M N	,	t	(	f	* , t I	π +	f	ω * , XM	t	)	.   	(123)
	) ~, , 1 ( ,    + -= t X t X t X Z f l π σ w t A.2	t	  	,	(120)
	π	I * ,	t	( ω	)	=		t Q 1 σ			ρ		I * ,	t	( ω	)	y	I * ,	t	( ω	)	-	t Q t w	t I Z f * t ,	=	t Q 1	   	1 σ	⋅	σ	-σ	1	⋅	t Z w z	t	⋅	z	Z	t	l	I	,	t	( ω	)	-	t Z w	t f	t * I ,	   	=
	t Q 1			   	σ	-1	1		t w		l	I	,	t		( ω	)		-	t Z w	t f	t * I ,	   	⇔	l	I	,	t	( ω	)	=	( σ	-	) 1	   	t Q	t t w I * , π	( ω	)	+	t I Z f * t ,	   	⇔
	) ~*, 1 ( * , ,     + -= t I t t I t t I Z f w Q l π σ	t	   	,	(121)
	π	* M	,	t		( ω	)			=		1 σ		ρ	* M	,	t	( ω	)	y	* M	,	t	( ω	)	-	t Q w t Z	t	(	f	* , t I	+	f	* XM	,	t	)	=	1 σ	⋅	τ Q t t	⋅	σ	-σ	1	⋅	t Z w z	t	⋅	τ Z t z	t	l	M	,	t	( ω	)	-
	t Q w t Z	t	(		f	* , t I			+		f	* XM		,	t	)	=		1 t Q	  	σ	-1	1	t w	l	M	,	t	( ω	)	-	t t w Z	(	f	* , t I	+	f	* XM	,	t	) ⇔   

.14 Real exchange rate

  The welfare-based price indices are given as follows:To get the RER expressed only in real terms we use transformation below:

															1 t Q														t P P t t e	*		1						p e t	, P D t	* t	1	~1 , p P t D t	M L	,
													t P	=	[ N	D	,	t		p	1 -, σ t D			+	N	* X	,	t		p	* X	1 , -σ t	+	N	* , I	t	p	* , I	1 -σ t	+	N	M	,	t	] , ~11 1 , σ σ --t M p	(124)
													t P	*		=	[ N	* D	,	t	p	* D	1 , -σ t	+	N	X	,	t	p	1 -, σ t X	+	N	I	,	t	p	1 , -σ t I	+	N	* M	,	t	] . ~11 1 * , σ σ --t M p	(125)
	Because the RER is given as			t Q		=	t e	t P	*	/	t P	we need:
	t e	t P	*	=	[ N	* D	,	t	t e	( * D p	,	t	)	1 -σ	+	N	X		,	t	t e	( X p	,	t	) 1 -σ		+	N	I	,	t	t e	( I p	,	t	) 1 -σ	+	N	* M	,	t	t e	( * M p	,	t	) 1 -σ	] , 1 1 σ -	(126)
	where:
																			p	* D	,	t			=	µ		~* * , * t t D t Z z W	,	p	X	,	t	=	t t e τ	µ	~, X z W t t Z	t	,	(127)
																			p	I	,	t				=		µ	~* , * t t I t Z z W		,		p	* M	,	t	=	* t t e τ	µ	~* , M z W t t Z	t	.	(128)

  We can show that the balanced current account is sufficient to close the model.

	t Q	N	D	t	t TOL D t N		D D N z z	X t t	t	t TOL N	X z t z t X	t D	t t z z X D t	t	N	I	t	I D t z I z N	t t	t TOL	M t t N I D z z	t	t TOL N	M z z	t	t z	t D M z	t	(130)
	From the aggregate accounting:
					t	t	* t		t	D	,	t	t		E	,	t		t		t	* t	*	t		* D	,	t	* t	t	* E	,	t	~* t	.

A.2.15 Closing the model -balanced current account

  Subtracting the same terms on both sides of (137) and then dividing it by two we get the

	C	t		t Q	C	* t			C	t	C	t	N	* X	,	t	1 , 2 * t X		C	t	N	M	,	t	1 2 , t M Q t	C	* t	t Q	C	* t	N	X	,	t	1 2 , t X
		Q	t	C	* t	N	* M	,	t	2 1 * , t M N ρ σ + -	I	,	t	2 , t I π +	t Q	N	M	,	t	2 , t M π -	t Q	N	* , I	t	2 * , t I π -	Q	t	N	* M	,	t	. 2 * , t M π	(137)
	balanced current account condition:
												t t		* t * X	,	t		X	, * t X	1 , t	1 X	,	t	t	t	M	* t , t		* M 1 M	, , t t	1 , M *	t	t	* , I	t	I	, * t , I	~2 , M ~* , , t t I * , t t M t M t t N	.	M	,	t

Table A .2.1 Model summary, foreign economy perspective, symmetric model

 A

	Price index		=	N	* D	,	t	ρ	* D	σ -1 , t	+	N	X	,	t	ρ	σ -1 , t X	+	N	I	,	t	ρ	σ -1 , t I	+	N	* M	,	t	σ -1 , 1 ρ * t M
	Total average profit	π	* t	=	π	* D	,	t	+	N N	* * D X	, , t t	π	* X	,	t	+	N N	* * , , D t t I	π	* , I	t	+	N N	* * D M	, , t t	* ~t M , π
	Free entry	* ~t t * , * * E t t Z f w v =
	Sectorial profits	* ~* * 1 * * * * , * t t k t k k t X	k	*	1	* t	* X *	,	t
																t										t				t

  / var //number of firms 10 lnnd, lnndf, lnnx, lnnxf, lnni, lnnif, lnnm, lnnmf, lnne, lnnef, //average sectorial productivities 6 lnzx, lnzxf, lnzi, lnzif, lnzm, lnzmf, //Euler equation for shares 2 lnv, lnvf, //average sectorial profits 10 lnpro, lnprof, lnprodd, lnprodf, lnprox, lnproxf, lnproi, lnproif, lnprom, lnpromf, //real interest rates 2 lnr, lnrf, //real exchange rates (acc. welfare-and CPI-based) 2 lnQ, lnq, //average sectorial relative prices 8 lnrod, lnrodf, lnrox, lnroxf, lnroi, lnroif, lnrom, lnromf, //real side 6 lnc, lncf, lnw, lnwf, lny, lnyf, //shocks 36 lnZ, z, Z, lnZf, zf, Zf, lnfe, FE, fe, lnfef, FEF, fef, lnfx, FX, fx, lnfxf, FXF, fxf, lnfii, FII, fii, lnfif, FIF, fif, lnfxm, FXM, fxm, lnfxmf, FXMF, fxmf, lntau, TAU, tau, lntauf, TAUF, tauf, //definitions 10 lntol, lntot, lnntt, lnnttf, lnlam, lnlamf, lnkap, lnkapf, lnZtilde, lnZftilde, //auxiliary variables -sectorial activities 6 lnax, lnaxf, lnai, lnaif, lnam, lnamf, //composition of expenditure 8 lnsd, lnsdf, lnsx, lnsxf, lnsi, lnsif, lnsm, lnsmf;

	//one needs 106 equations
	//predetermined_variables lnr, lnrf, lnnd, lnndf;
	/*-

  / parameters //Pareto distribution 4 k, kf, zmin, zminf, //of utility function, trade in bonds, substitution of goods 4 bet, delta, gama, sig, //for shock processes of aggregate productivity Z 3 rhoz, rhozf, phiepsz, //steady state aggregate productivity 2 Zss, Zfss, //for shock processes of costs 8 ufx, ufxf, ufii, ufif, ufxm, ufxmf, tauss, taufss, //persistency of shocks 10 rhoFE, rhoFEF, rhoFX, rhoFXF, rhoFII, rhoFIF, rhoFXM, rhoFXMF, rhoTAU, rhoTAUF,

	//steady state labor 1
	L,
	//steady state entry costs 2
	fess, fefss;
	//34 parameters
	/*-

  % %% prodd=c/sig*rod^is; prodf=cf/sig*rodf^is; prox=cf/sig*rox^is-w*fx/Z; proxf=c/sig*roxf^is-wf*fxf/Zf; proi=cf/sig*roi^is-wf*fii/Zf; proif=c/sig*roif^is-w*fif/Z; prom=c/sig*rom^is-wf*fm/Zf; promf=cf/sig*romf^is-w*fmf/Z;

	v=w*fe/Z;
	vf=wf*fef/Zf;
	pro=theta*v;
	prof=theta*vf;
	r=(1-bet)/bet;
	rf=r;
	y=c+nee*v;
	yf=cf+nef*vf;
	ad=c*nd*rod^is;
	adf=cf*ndf*rodf^is;
	ax=cf*nx*rox^is;
	axf=c*nxf*roxf^is;
	ai=cf*ni*roi^is;
	aif=c*nif*roif^is;
	am=c*nm*rom^is;
	amf=cf*nmf*romf^is;
	sd=nd*rod^is;
	sdf=ndf*rodf^is;
	sx=nxf*roxf^is;
	sxf=nx*rox^is;
	si=nif*roif^is;
	sif=ni*roi^is;
	sm=nm*rom^is;
	smf=nmf*romf^is;
	%-

  in the main file

	ys =[
	lnnd	lnndf	lnnx	lnnxf	lnni	lnnif	lnnm	lnnmf	lnne	lnnef
	lnzx	lnzxf	lnzi	lnzif	lnzm	lnzmf	lnv	lnvf	lnpro
	lnprof	lnprodd	lnprodf	lnprox	lnproxf	lnproi	lnproif	lnprom
	lnpromf	lnr	lnrf	lnQ	lnq	lnrod	lnrodf	lnrox	lnroxf
	lnroi	lnroif	lnrom	lnromf	lnc	lncf	lnw	lnwf	lny	lnyf
	lnZ	z	Z	lnZf	zf	Zf	lnfe	FE	fe	lnfef	FEF	fef
	lnfx	FX	fx	lnfxf	FXF		fxf	lnfii		FII	fii	lnfif	FIF
	fif	lnfxm	FXM	fxm	lnfxmf	FXMF	fxmf	lntau	TAU	tau
	lntauf	TAUF	tauf	lntol	lntot	lnntt	lnnttf	lnlam	lnlamf
	lnkap	lnkapf	lnZtilde	lnZftilde	lnax		lnaxf		lnai	lnaif	lnam
	lnamf	lnsd	lnsdf	lnsx	lnsxf	lnsi	lnsif	lnsm	lnsmf];

Le Directeur de Thèse Le Responsable de l'École Doctorale VU pour autorisation de soutenance Rennes, le Le Président de l'Université de Rennes 1 Guy CATHELINEAU VU après soutenance pour autorisation de publication : Le Président de Jury,

  % %% %declare in exactly the same order as in the 'var' command in the main file Dans cette thèse, nous analysons la question de l'ajustement réel entre des économies de niveau de développement diffèrent au sein d'une union monétaire. Dans ce, les deux économies représentées -une économie développée et une économie émergente -ne peuvent utiliser le taux de change nominal pour s'ajuster à des chocs asymétriques. Pour étudier les conditions de l'ajustement réel entre ces pays, nous prenons en compte les flux d'investissements directs. En effet, ce type d'investissement a profité largement aux économies d'Europe de l'est non membres de le zone euro. Pour étudier cette question, nous utilisons un modèle DSGE (« dynamic stochastic general equilibrium ») permettant de micro fonder les décisions d'investissement direct sur l'hétérogénéité productive des firmes. Nous complétons la littérature existante dans ce domaine en privilégiant deux aspects : (1) les investissements directs peuvent être à la fois des substituts aux importations ou une solution retenue par les firmes pour réduire leurs coûts de production afin de réimporter des biens sur leur marché national et (2) les pays sont traités de manière asymétrique, afin de relier leur niveau de développement aux types de variétiés de biens (non échangeables, exportables, délocalisables). Nous évaluons de quelle manière ces éléments affectent la dynamique des économies à un choc de productivité asymétrique. De manière générale, on observe que les économies vont répondre de manière différente au niveau macroéconomique en fonction de leur structure productive. En résumé l'analyse proposée dans cette thèse montre que des différences structurelles et la possibilité pour les pays de s'engager dans des investissements directs détermine de manière critique la réaction des variables macroéconomiques à des chocs asymétriques. Mots clefs : structures de production asymétriques, compte courant, modèles DSGE, Investissements directs, firmes hétérogènes, macroéconomie internationale, convergence, ajustement réel, délocalisations

	ys =[
	lnnd	lnndf		lnnx	lnnxf	lnnif		lnnmf	lnne	lnnef	lnzx	lnzxf
	lnzif	lnzmf		lnv		lnvf		lnpro		lnprof	lnprodd	lnprodf	lnprox
	lnproxf	lnproif	lnpromf		lnr		lnrf	lnQ	lnq	lnrod
	lnrodf	lnrox	lnroxf	lnroif	lnromf	lnc	lncf	lnw
	lnwf	lny		lnyf	lnZ		z	Z	lnZf	zf	Zf
	lnfe	FE	fe	lnfef	FEF	fef		lnfx	FX	fx	lnfxf	FXF
	fxf	lnfif		FIF		fif	lnfxmf	FXMF	fxmf	lntau	TAU
	tau	lntauf	TAUF	tauf	lntol		lntot	lnntt	lnnttf	lnlamf
	lnkapf	lnZtilde		lnZftilde	lnax		lnaxf	lnaif	lnamf	lnsd	lnsdf
	lnsx	lnsxf			lnsi		lnsmf];
									(Nom et Prénom)

The monetary criteria relate to levels of inflation rate and nominal long-term interest rate, as well as to fluctuations in the exchange rate. The fiscal criteria concern fiscal deficit and public debt in relation to GDP. For all criteria there are some reference values or rules how they are calculated. For the inflation criterion, as well as for the criterion of nominal long-term interest rate, reference set for calculating the reference value consists of countries with the lowest inflation rates.

The Werner plan proclaimed in 1970 assumed the euro area creation in 1980.

In the 80's the most important element of the monetary integration among the European Economic Community countries was the European Monetary System (EMS) established in 1979. It mainly served the purpose of interior stability by equalizing the inflation rates among countries of the community at the possibly lowest level, setting the zone of stable currencies and conditions for harmonious economic development.

As pointed in Narodowy Bank Polski[2009] production structure in Poland is significantly different than production structures of most of the Eurozone countries. The biggest differences are in comparison with the core of the euro area, that means with Germany and France. For detailed research see[START_REF] Adamowicz | Synchronizacja cyklu koniunkturalnego polskiej gospodarki z krajami strefy Euro w kontekście struktury tych gospodarek[END_REF].

A country's inward FDI position is made up of the hosted FDI projects, while the outward FDI position consists of the FDI projects owned abroad.

The model is taken from[START_REF] Galí | Monetary Policy, Inflation, and the Business Cycle. An introduction to the New Keynesian Framework[END_REF], Chapter 3 and referred there as the basic New Keynesian model. The origins of similar microfounded monetary models with monopolistic competition and sticky prices go back to[START_REF] Akerlof | A Near-rational Model of the Business Cycle with Wage and Price Inertia[END_REF],[START_REF] Mankiw | Small Menu Costs and Large Business Cycles: A Macroeconomic Model[END_REF],[START_REF] Blanchard | Monopolistic Competition and the Effects of Aggregate Demand[END_REF] and[START_REF] Ball | Real Rigidities and the Non-neutrality of Money[END_REF].

Real Business Cycle Theory started with a work by[START_REF] Kydland | Time to Build and Aggregate Fluctuations[END_REF]. They proposed a stochastic version of an economic growth model by Solow. Their model served also as the basis for New Keynesian modelling.

We exploit some of these microeconomic foundations in next parts of this chapter. The approaches of quantitative sciences relate to conceptual tools and formal techniques.

[START_REF] Grabek | SOEPL 2009 -An Estimated Dynamic Stochastic General Equilibrium Model for Policy Analysis And Forecasting[END_REF],[2007] provide a comprehensive insight into issues of the background of DSGE models.

What has been recently adopted is a concept of heterogeneity in behaviour and characteristics of economic agents, starting from the source articles by[START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF] and[START_REF] Ghironi | International Trade and Macroeconomic Dynamics with Heterogeneous Firms[END_REF]. This issue is broadly discussed in[START_REF] Lejour | Trade costs, Openness and productivity: Market access at home and abroad[END_REF] where one can find review of new heterogeneous firms literature.

In the thesis we depart from broad discussion about shortages of DSGE models, challenges they face and their valuation comparing to different classes of macroeconomic models in use. But we would like to emphasize that

Essentially, adding randomness serves the purpose of better fit with the data or it has strictly theoretical grounds. Broader on this can be found in McCandless [2008], Chapter 5 and Alvarez-Lois et al. [2005].

This form of introducing the sticky prices assumption was proposed by[START_REF] Calvo | Staggered Prices in a Utility-Maximizing Framework[END_REF].

An infinitely-lived representative consumer is a simple representation of a mass of households which as a whole outlive any individual and they are inherent element of the economy.

The CRRA utility functions are within the Gorman class, in which one can represent aggregate behaviour as if it resulted from the maximization of a single household. See[START_REF] Acemoglu | Introduction to Modern Economic Growth[END_REF] on this point. When the parameter γ is interpreted as a measure of a risk aversion, then the CRRA function is viewed as the von Neumann-Morgenstern utility function (see von[START_REF] Neumann | Theory of Games and Economic Behavior[END_REF]). Such a function, used in the expected utility hypothesis and called also the expected utility function, represents preferences of an agent on gambles, thus describes his/her attitude toward risks.

As pointed by[START_REF] Heer | Dynamic General Equilibrium Modelling[END_REF] the mathematician Leonhard Euler (1707-1783) was the first one who derived such a condition from a continuous time dynamic optimization problem.

Derivation of these household decision rules are given in Appendix A.1.1.

Derivation of this optimal price setting rule can be found in Appendix A.1.3.

The method is widely discussed in[START_REF] Uhlig | A Toolkit for Analysing Nonlinear Dynamic Stochastic Models Easily[END_REF]. We recommend to see also[START_REF] Zietz | A clarifying note on converting to log-deviations from the steady state[END_REF] which presents the issue in a very compact but comprehensive way.

A detailed description of the method by Blanchard, Kahn[1980] for a DSGE model in general case is presented in Appendix A.1.7.

See Appendix A.1.8 for the proof.

All the exploited methods for getting the IRFs are the ones recommended by ManciniGriffoli [2007Griffoli [ -2008] ] and implemented in the DYNARE software.

The starting point was the model by[START_REF] Hopenhayn | Entry, Exit and Firm Dynamics in Long Run Equilibrium[END_REF], describing the industry dynamics in the perfect competition and the[START_REF] Krugman | Scale Economies, Product Differentiation and the Pattern of Trade[END_REF] model.

Earlier works, including[START_REF] Hopenhayn | Entry, Exit and Firm Dynamics in Long Run Equilibrium[END_REF], did not use the average productivity of representative firms from the given sector. Instead, the information about the sector productivity resulted from the productivity distribution of a firm.

[START_REF] Helpman | Export versus FDI[END_REF] discussed possibility of regarding firms which export from their subsidiaries to other countries. Our model is a two country model, thus we can consider only bilateral relations and exporting back to the economy of origin.

The kind of asymmetry is regarding different sizes of economies in terms of labour units. For example, in a model by[START_REF] Pappada | Real Adjustment of Current Account Imbalances with Firm Heterogeneity[END_REF] a number of entrants depends on the size of the economy. The other kind of asymmetry was proposed by[START_REF] Helpman | Export versus FDI[END_REF] in the form of relying on an exogenously fixed relative wage between countries. As[START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF] points out, resulting differences in country size affect only the relative number of firms.

According to the FTSE Poland belongs to the advanced emerging markets. Also International Monetary Fund, The Economist, Morgan Stanley Capital International, Standard and Poor's and Dow Jones list Poland as an emerging market.

We assume that such a shock does not influence the firm productivity. An exit is independent of the level of productivity. As[START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF] points out, this simplification allows for exogenous determination of individual productivity levels of surviving firms, while average productivity levels are determined endogenously.

Usually one identifies varieties as single goods.[START_REF] Casares | Firm Entry under Financial Frictions[END_REF] propose a broader view on this.We can think about product lines. Then, creation of one new good corresponds to either one additional production line in an existing firm or the creation of a single new firm.

We can notice that in the lifetime utility setting like(2.4) this interest rate t r is equal to the real interest rate. Details on this are in Appendix A.2.2.

One can find more about the intratemporal problem of the consumer in Chapter I. Computational details of derivations are analogous to the ones presented in Appendix A.1.2.

Derivation of optimal prices is presented in Appendix A.2.5.

In the literature on the size distribution of firms there is an idea of explaining size by (unobserved) aptitudes.Lucas [1978] presented a model in which differing abilities of managers follow a Pareto distribution. Then, the implied size distribution is also of this form in his model. Thus, the observed size distribution is a solution to the problem of how to allocate productive factors among managers, so as to maximize output. On distributions in economics, especially the size distributions, see for example[START_REF] Kleiber | Statistical Size Distributions in Economics and Actuarial Sciences[END_REF].

The standard in the literature on DSGE firms with heterogeneous firms is to treat the economies in the model in a symmetric way. Thus, one usually assumes the identical distribution for both economies. See[START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF],[START_REF] Ghironi | International Trade and Macroeconomic Dynamics with Heterogeneous Firms[END_REF],[START_REF] Contessi | How Does Multinational Production Change International Comovement?[END_REF]. We assume only the same type of the distribution, mainly the Pareto distribution but its parameters can differ for the economies.

It matters when we calibrate the model, because the size of a firm has it empirical counterpart in its sales.Thus, we can concern some statistical characteristics for firms' size series, like the mean or the standard deviation.

Details on this in Appendix A.2.7.

To compute this values, we use definitions of the probability density and the cumulative distribution functions of the Pareto distribution given in (2.52) and(2.53). Details are presented in Appendix A.2.8.

In Appendix A.2.9 we present how to derive these values using the definition of the PDF of the Pareto distribution.

In Appendix A.2.11 we use the first method because the second one would need some transformations of average productivities to get the forms of equations (2.70)-(2.74).

Suffice is to substitute definitions of the average productivities (2.66)-(2.69) into equations for the optimal relative prices (2.46)-(2.47).

Details on this in Appendix A.2.12.

The point is broadly discussed in[START_REF] Broda | Product Creation and Destruction: Evidence and Price Implications[END_REF]. As the authors stress, statistical agencies do not account sufficiently for the processes of creation and destruction of products, leading to biases in price measurement. The commonly used CPI ignores the importance of quantities of goods. This transmits further on the other indicators based on the CPI, like the real exchange rate or the inflation rate.

The name "welfare" highlights the fact that consumers deliver welfare benefits from increased product variety.

[START_REF] Corsetti | Varieties and the Transfer Problem: the Extensive Margin of Current Account Adjustment[END_REF] argue that the CPI-based RER tends to depreciate stronger than the welfarebased one. The reason is the fall in the total number of varieties available to domestic consumers translates into an increase in the welfare-based consumer price index.

This kind of approach to solving DSGE models is based on perturbation methods, employed in the DYNARE software, which we use here. The second class are projection methods. Advantages and drawbacks of both are widely discussed in Lim, McNelis[START_REF] Grabek | SOE-PL -Model DSGE małej otwartej gospodarki estymowany na danych polskich. Metodologia, specyfikacja, wyniki estymacji i pierwsze zastosowania[END_REF].

This reduction, as well as main steps of getting the asymmetric steady state, is shown in Appendix A.2.17.

In a Programming Appendix B.2.4 we present a MATLAB routine to find the steady state values numerically.Imposing the symmetric steady state, we get the value only for the average productivity of multinational exporting firms. The asymmetric setting of parameters for both economies results in the need to find numerical values for much more parameters. See the Mathematical Appendix A.2.17.

In case of foreign firms this rise is directly at the impact and vanishes quite quickly. After a few quarters the effect takes the reverse direction.

The detailed description of shocks in both, deterministic and stochastic, settings is presented in the programming Appendix B.2.1 and B.2.2.

A country's inward FDI position is made up of the hosted FDI projects, while the outward FDI position consists of the FDI projects owned abroad. The inward position represents imported capital. The data on the FDI positions are available on an annual basis and reflect the state at the end of the year.

The source works for studying DSGE models with the heterogeneity are[START_REF] Melitz | The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity[END_REF],[START_REF] Ghironi | International Trade and Macroeconomic Dynamics with Heterogeneous Firms[END_REF] and[START_REF] Contessi | How Does Multinational Production Change International Comovement?[END_REF].

We do not mention income from domestic selling, because it is obtained by firms of all types and cannot be attributed to the activity in a particular sector of production.

The intertemporal problem of the consumer is presented in details in Chapter II. The basis of this issue are, in turn, explained in Chapter I and its Appendix A.1.

The whole system of steady state equations consists of eleven equations in eleven variables to be found numerically. The steady state values of all the remaining variables are get directly as results of analytical calculus. Details on this are given in Appendix A.3.

This calibration was used in Chapter II. Calibrations 1 and 2 were symmetric, whereas Calibration 3 was asymmetric, with different values of respective parameters for the home and the foreign economy.

See Table2.6 in Chapter II, with the data on Exports of goods and services as percentage of GDP.

See Table2.7 in Chapter II, with the data on FDI outward stocks as percentage of GDP.

This division is as follows: 90 percent for share of multinationals producing and selling abroad and 10 % for those also producing abroad but exporting back to the economy of their origin.

The second part of Table3.10 presents responses of home variables to the aggregate home productivity shock and of foreign ones to the aggregate foreign productivity shock.

In case of foreign productivity shock and variables, which do not have their foreign counterparts, like terms of labour, terms of trade and real exchange rates, we presents reposes of their opposites.

The differentiation can be done under the integral sign according to the Leibniz theorem. See[START_REF] Flanders | Differentiation under the Integral Sign[END_REF] on this. To get[START_REF] Calvo | Staggered Prices in a Utility-Maximizing Framework[END_REF] we exploit also the chain rule of calculus to compute the derivative of the composition function.

A description of the method in a more general case, can be found in[START_REF] Mccandless | The ABCs of RBCs. An Introduction to Dynamic Macroeconomic Models[END_REF]. In particular, the stochastic version of the model is considered, as well as the case, when the matrix B is not invertible. In the latter situation one can exploit the generalized Schur method to decompose the matrices B and .A The generalized Schur triangulation is comprehensively described by[START_REF] Golub | Matrix Computations. Third Edition[END_REF], who in turn refer to the source work by[START_REF] Moler | An Algorithm for Generalized Matrix Eigenvalue Problems[END_REF].

The formulation of this preposition can be found in LaSalle[1986].

The differentiation can be done under the integral sign according to the Leibniz theorem. See[START_REF] Flanders | Differentiation under the Integral Sign[END_REF] on this. To get[START_REF] Calvo | Staggered Prices in a Utility-Maximizing Framework[END_REF] we exploit also the chain rule of calculus to compute the derivative of the composition function.

The similar way of describing the steady state in a separate file is presented in a program by Schorfheide, which was used to get the steady states for a model in[START_REF] Schorfheide | Loss function-based evaluation of DSGE models[END_REF]. The program inspired authors of the DYNARE software to propose the way of writing a separate MATLAB file providing the steady state for a main file with description of a DSGE model.

We use a R2012b version of MATLAB and a 4.3.2 version of DYNARE. The letter is a free software and can be downloaded from the official web site www.dynare.org.

In this routine, as well as in the next ones, we would like to highlight some parts that are important from the point of view of the model construction or of the model results' presentation.

We will present MATLAB routines to find the steady state numerically in the last part of this Appendix B.2.4.

Acknowledgements

support. Thank You both for Your advices, encouragement, patience and help throughout my life. I dedicate my thesis to You. 1 The sources of financial support of the research were: Bourse du Gouvernement Français 2010-2012 "Doctorat en Cotutelle", "Grant promotorski NCN nr N112 371840" funded in 2011 by National Science Centre Poland, and Research Project "Bourse de mobilité entrante 2009". in real terms.

significant that we can describe economic agents of the same type in both economies but which behave differently to the similar shocks due to the different economic environment in the form of competition with the multinational firms from the other economy.

Summary of comparison

Comparing the symmetric and asymmetric models means comparing their results in the form of the impulse-response functions. First of all let us notice that the symmetric model with the asymmetric Calibration 3 gave us some average responses of variables between the symmetric Calibrations 1 and 2. So the responses of the different scale were the result of the given parameterization only. They were not explained by the different dynamic equations.

Secondly the symmetric model gave the mirror responses of home and foreign variables in case of the home and foreign productivity shock, respectively despite the fact that the economies were characterized by different shares of sectors. It means that the home economy's reaction to the home productivity increase was exactly the same as the foreign economy's reaction to the foreign productivity increase.

In both versions of the model the shares of sectors in both economies were calibrated so that to shape the very similar conditions regarding the symmetric and asymmetric model.

The IRFs were of course different due to the different dynamics and it was clear in case of number of firms from various production sectors. But the differences came out also in comparing bilateral conditions between the economies, that means while comparing the terms of trade, terms of labour, the non-traded to traded price ratio or real exchange rates.

When we regard the novelty of the results of the asymmetric model the most interesting is that when the home economy is hit by the positive productivity shock then response of numbers of foreign firms is not just deterioration but the shift in the production structure in the less productive firms direction. Analogously when the foreign economy is hit by the positive productivity shock then response of numbers of foreign firms is the shift in the production structure in the more productive firms direction.

What is also worth highlighting in case of the asymmetric version of the model is, that the terms of trade reacts very weak and the terms of labour reacts very strong comparing to the symmetric model. Also the positive reaction of the number of home firms is much stronger, whereas the negative reaction of the number of foreign companies is much weaker. Thus, we see that the sources of adjustment in variables are not only behaviour of the terms

Using the first expression from (74) we get that:

A.2.11 Average profits of sectors

Each of the average profits is computed by using integration of the PDF of the Pareto distribution. The main difficulty is to get clear compact forms of these values. Thus we use subsequent transformations.

Average firm profit earned from domestic sales is given by:

B.2.3 MATLAB routine giving steady state values

In the routine with the structural form of the model we use log-linearized equation system.

Each nonlinear dependence of the theoretical model has been approximated by expanding it into the Taylor series around the point of the deterministic long-term equilibrium of steady state type. Thus it is necessary to find steady state values of all model variables.

In the mathematical Appendix A.2.17 we have shown that the model interrelations are too complex to find the steady state just by analytical methods. Thus also numerical procedure had to be adopted 3 . When we obtain the steady state it can be used in the main program with the model equations. Each time the DYNARE routine calls for the steady state values it exploits a MATLAB file where all these values are given directly. This happens a few times. For example when the initial values are needed. Then when the IRFs are computed.

In case of a permanent shock two settings of the steady state have to be delivered, one before hitting the system with the disturbance and one after because all variables will finally reach --------------------------------------- --------------------------------------- --------------------------------------- %---------------------------------------- --------------------------------------- --------------------------------------- --------------------------------------- --------------------------------------- --------------------------------------- ------------------------------------------------------------------------------* ------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------* ------------------------------------------------------------------------------* ------------------------------------------------------------------------------* ------------------------------------------------------------------------------* ------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------*/ stoch_simul(irf=200, noprint);

B.3.2 MATLAB routine giving steady state values

The program with the model description above has to be delivered with an additional routine which states the whole steady state. For each variable its steady state value has to exist by the given set of values of parameters. Thus each steady state value is given by means of values of parameters or of variables computed earlier. --------------------------------------- %---------------------------------------- --------------------------------------- %---------------------------------------- ---------------------------------------

flexas_steadystate.m