{'fraction_non_alphanumeric': 0.02427933581613547, 'fraction_numerical': 0.006337318162177733, 'mean_word_length': 4.8890100569489885, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Informality, Frictions, and Macroprudential Policy

We analyze the effects of macroprudential policies through the lens of an estimated dynamic stochastic general equilibrium (DSGE) model tailored to developing markets. In particular, we explicitly introduce informality in the labor and goods markets within a small open economy embedding financial frictions, nominal and real rigidities, labor search and matching, and an explicit banking sector. We use the estimated version of the model to run welfare analysis under optimized monetary and macroprudential rules. Results show that although informality reduces the efficiency of macroprudential policies following a convex fashion, combining the latter with an inflation targeting objective could be beneficial.


Introduction
The recent financial crisis underscored the cost of systemic financial instability and highlighted the need for dedicated macroprudential policies in addition to the regulation and supervision of individual institutions to achieve financial stability. These policies have been widely used by emergent markets and advanced economies to minimize systemic risks. A large progress has been made in the design and implementation of macroprudential tools. The recent literature recognizes that macroprudential policies can be beneficial in term of mitigating booms (and busts) as well as improving household's welfare.
Examples of these studies are the following. Strategic interaction between macroprudential policy and monetary policy-in a DSGE model for the euro area with banks and credit market frictions-is studied by Angelini et al. (2012). Angeloni and Faia (2013) analyze the optimal setting of monetary policy and capital regulation using a model of bank runs. Unsal (2013) analyses the complementarities between monetary and macroprudential policy rules in mitigating the impact of capital inflows shocks. More recently, Quint and Rabanal (2014) study the optimal state-contingent policy mix needed within a currency union, where country-specific boom and bust cycles cannot be solely addressed with monetary policy. Lewis and Villa (2016) consider the interdependence of monetary and macroprudential policy in a New Keynesian business cycle model under the zero lower bound constraint. De Paoli and Paustian (2017) and Silvo (2018) analyze the optimal monetary and macroprudential policies under cooperative and non cooperative setting in New Keynesian models.
When applied to developing countries, the analysis of monetary policy and macroprudential policy mix is generally considered in a context of a small open economy, which focuses on the structure of foreign borrowing (e.g., Ozkan and Unsal, 2014) or the foreign exchange intervention (e.g., Aguirre and Blanco, 2015). We contribute to this literature through taking into consideration the presence of sizable informality in the production and labor markets, which characterize many developing countries. Intuitively, this friction is expected to play an important role in defining the relevance of macroprudential policies as the behavior of borrowing entrepreneurs and individuals should differ depending on whether they participate more actively in the formal or informal sector. In particular, capital accumulation -used as borrowing collateral -and bank capital are expected to decrease in the case of a pronounced participation in the informal activities.
Very little was done in the literature on the effect of informality on the conduct of monetary policy.
Most of papers on this field focus on the dynamics of inflation and the implied optimized interest rate rules. Batini et al. (2011) show that informality plays an important role in defining the characteristics of reaction functions of fiscal and monetary authorities. More specifically, they argue that simple implementable optimized rules, which respond only to observed aggregate inflation and formal-sector output, can be significantly worse in welfare terms than their optimal counterpart. Shapiro and Gonzalez (2015) explore the impact of a countercyclical policy that reduces credit fluctuations with a model embedding an informal labor market characterized by the presence of self-employed agents. The main assumption of the model is the reduced access to formal financing. The first-order simulation of the calibrated model implies that introducing a countercyclical macroprudential policy could reduce the volatility and persistence of consumption, investment, and output.
In this paper, we reassess the effects of countercyclical macroprudential policies in a small open economy model with price stickiness, search and matching frictions, financial frictions, and an explicit banking sector. The economy features formal and informal sectors, both in goods and labor markets. Once the agents choose to engage in informal activities, their transactions of are not recorded by the government -not subject to taxation -if they are not audited. Then, the model is estimated using data from developing economies where the share of the informal sector is documented to be significant (e.g., Medina and Schneider, 2018). 1 From a policy perspective, conducting this analysis in the case of a developing economy is very timely and appealing. In particular, many developing economies are currently implementing monetary policy reforms to stabilize inflation and conduct macroprudential regulations for financial stability purposes. Several macroprudential tools have been proposed, and some have been used even before the recent crisis, to address various externalities. The adopted policy tools, for both corporate and households, include caps on loan to value and debt to income ratios, limits on credit growth, limits on amortization periods, and (countercyclical) capital requirements.
Applying households' welfare as a metric, we find that the presence of informality reduces the efficiency of macroprudential policies especially if the central bank is not targeting inflation. The rationale is the following. Under a positive shock in the economy, the financial accelerator would yield higher fluctuations of most variables including those affecting welfare, which can be mitigated by the implementation of the macroprudential rule. However, in the presence of informality, the same positive shock will imply a higher increase in the informal activity as the cost of hiring is lower. As the formal sector is more capital intensive, the accumulation of capital -the collateral for entrepreneurs' borrowing -would be smaller than in the case without informality, which curtails the impact of such policies. Further, the same should happen with the accumulation of housing stock as salaries in the informal labor market is smaller at the equilibrium. In parallel, banks accumulate less capital and less lending resources would be available, given the structure of their balance sheet, which further dampens the efficiency of macroprudential rules.
Interestingly, the estimated model shows that the relation between informality and the efficiency of the policy of interest is negative and concave; unless the central bank commits to inflation stabilization.
The paper also sheds light on the interaction between macroprudential and monetary policies. We 1 The estimation results of this paper could be also used as an alternative reference to document the size of the informal sector as it infers its value from the dynamics of a set of macroeconomic and financial data in the context of an estimated DSGE model.
find that the welfare improving role of macroprudential rules is drastically enhanced by the introduction of aggressive interest rate responses to inflation. Simultaneously, financial stability facilitates maintaining price stability by containing excessive accumulation of credit, limiting unsustainable developments in asset prices, and mitigating the financial accelerator mechanism. Finally, other sources of market imperfections -i.e., costly hire and imperfect matching, price rigidity, and incomplete markets -temper the impact of macroprudential policies.
The rest of the paper is organized as follows. In Section 2 the the theoretical underpinnings of the model are described. Section 3 presents the estimation results and evaluates the quantitative outcomes of the estimated model. We evaluate the optimality of alternative simple monetary and macroprudential rules in Section 4, which also includes some sensitivity analysis. Section 5 summarizes and concludes.

The Model
The model features three types of key agents: impatient households and entrepreneurs who contract loans from domestic commercial banks -in local currency -and patient households who are savers. The measures of these agents are Γ B , Γ E , and Γ L , respectively; and the measure of all agents in the economy is one. Patient households are characterized by a higher discount factor than the other agents. Each group of representative patient and impatient households consists of formal and informal employees as well as unemployed job seekers. Job seekers can choose to search in the informal sector and evade income taxes with a non-zero probability of being audited. Banks play the role of financial intermediaries between savers and borrowers in a monopolistically competitive market. Impatient households and entrepreneurs borrow from banks to help finance their purchases of housing and capital, respectively. On the production side, domestic producers rent capital and labor services to produce the domestic output good, which is combined with imported goods to produce four types of final goods: consumption, business investment, residential investment, and exports. Importers and exporters are introduced as separate agents in the model to capture the partial pass-through of exchange rate movements to import and export prices at the retail level.

Labor market
We account for the imperfections and transaction costs in the labor market by assuming that jobs are created through sectoral matching functions as in Pappa et al. (2015) and Anand and Khera (2016). In particular, the fraction of household members of type i = L, B who are employed in sector j = F, I, is denoted by n i, j t . The sum of the number of workers who survive an exogenous separation and the number of new hires during the same period, m i, j t , corresponds to the total number of employees during a period t. Hence, the number of workers in the formal sector can be defined as follows where σ F is the exogenous separation rate.
In the informal sector there is an exogenous fraction of jobs destroyed in each period, σ I , as well as a probability, ξ , that an informal employee loses her job due to an audit. Therefore, n I t is given by: We define n j t and m j t the number of workers employed and hired in period t, respectively. Note that defining At the beginning of each period, there is a pool of jobless individuals seeking to be hired in sector j, and whose size, u i, j t , is defined as follows: which corresponds to the beginning of period unemployment.
For simplicity, we assume that the patient and impatient households are symmetric with respect to the share of working time dedicated to the formal and informal sectors. Namely, we define n L, j The probability of a jobseeker being hired in the sector j corresponds to x j t ≡ m j t u t . The process of hiring labor for entrepreneurs is assumed to exhibit a cost, g j t , which is defined as follows: where κ j the efficiency of the matching process in each sector; and η is the elasticity of matching to vacancies.

Patient households
The representative patient household maximize the expected utility, which is a function of current individual consumption c L t , housing services h L t and the share of working individuals n L t .
where n L t ≡ n L,F t + n L,I t . The parameter ϕ is the inverse of the Frisch elasticity; μ and ι determine the weights of housing investments and leisure in the households' utility, respectively.
The intertemporal budget constraint is given by: The stock of housing is defined as t−1 and the parameter δ h corresponds to the depreciation of the housing stock. The variable s t corresponds to the real exchange rate, defined as the adjusted nominal exchange rate, e t , with the relative foreign and domestic price indexes, P * t and P t (i.e., s t = e t P * t P t ). The real price of housing is defined as q h t . The flow of expenses includes current consumption, c L t , accumulative of housing services, h L t , deposits at domestic banking system, d L t , and purchase foreign bonds b * t . Foreign assets are subject to an endogenous quadratic adjustment cost ψ * 2 (b * t − b * ) 2 . The flow of revenue encompasses net of tax labor revenues from the formal sector, non-taxable labor revenues from the informal sector, returns on deposits at a gross rate of R D t , and returns on foreign assets at a gross rate of R * t . Besides, if unemployed, a household receives a transfer εw F t u L t . Finally, households receive at each period the distributed dividends from producing firms and banks, Π L t , in addition to a lump-sum transfer from the government, T L t .

Impatient households
Impatient households do not hold deposits and do not own retail firms. The representative impatient household maximizes the expected utility: where n B t ≡ n B,F t + n B,I t . The household maximizes her utility subject to the following (real term) budget constraint: Impatient household's expenses include consumption, accumulation of housing services and reimbursement of past borrowing have to be financed with the wage income, new borrowing, and lump-sum transfers received from the government.
In addition, impatient households face a borrowing constraint: they carry over the unamortized share, ζ , of last period debt, b B t−1 , and borrow to finance new housing investment. But, they can only borrow up to a certain fraction of the value of their collateralizable new housing investment at period t according to the following rule: where, , and ϖ t is the stochastic loan-to-value (LTV), which is assumed to follow a first-order autoregressive process with i.i.d. normal error terms such that ϖ t ϖ = ϖ t−1 ϖ ρ ϖ exp(ε ϖ,t ), where 0 < ρ ϖ < 1 and ε ϖ,t ∼ N(0, σ ϖ ).

Entrepreneurs
An entrepreneur only cares about his own consumption c E t and maximizes the following utility function: In order to maximize lifetime consumption, entrepreneurs choose the option stock of physical capital, k E t , the desired amount of labor input, n E t , and borrowing, b E t . Labor and effective capital are combined to produce two intermediate outputs, y F t and y I t , according to the following production functions: and The total factor productivity, Z t , is assumed to follow an exogenous I(1) process: Z t = Z t−1 exp(z t ) and In addition, we introduce an idiosyncratic technology shock on each sector i = {F, I} that follows an exogenous AR(1) process: Notice that the steady state level of sectoral technology will identify, among other parameters, the relative size of formal and informal production levels.
Entrepreneurs can borrow, b E t , from the banks at an interest rate R E t . They face a probability, ξ , of being inspected by the fiscal authorities, convicted of tax evasion and forced to pay a penalty, which is a fraction, τ p , of their total revenues. Finally, we assume that, once they are produced, there is no differentiation between intermediate goods from the different sectors. In other words, we assume that formal and informal goods are perfect substitutes, so that they are sold at the same price, p E t .
The intertemporal budget constraint is given by: where τ s t is a payroll tax, γ j is the cost of posting a new vacancy in sector j, and q k t is the price of one unit of physical capital in terms of consumption.
Similarly to the mortgage borrowers, we assume that the amount of resources that banks are willing to lend to entrepreneurs is constrained by the value of their collateral, which is given by their holding of physical capital. The borrowing constraint can be written as follows: where ω t is the entrepreneurs' loan-to-value ratio, which is assumed to follow the stochastic process: In order to maximize lifetime consumption, entrepreneurs choose the stock of physical capital, k E t , the desired amount of borrowing, b E t , and the number of workers, n E, j t ( j = F, I).

Wage Nash bargaining
Wage setting follows a Nash bargaining process between workers and wholesalers where exogenously determined wage bargaining power of the worker in the two sectors is given by ϒ j with j = {F, I}.
Let V L, j n,t , and V L, j u,t , denote the marginal value of the expected income of an employed, and unemployed worker respectively. The employed worker earns a wage, suffers disutility from work, and might lose her job with probability σ F . Hence, the marginal value of a new match is: where λ L t corresponds to the marginal utility of income associated to the budget constraint of patient households.
This equation defines the marginal value of a job for a worker as the real wage reduced for the marginal disutility of working and the expected-discounted net gain from being either employed or unemployed during period t + 1. The unemployed worker expects to move into employment with probability x F t . Hence, the marginal value of unemployment corresponds to: This equation states that the marginal value of unemployment is made up of unemployment benefits together with the expected discounted gain from being either employed or unemployed during period t + 1. Similarly, and Also for impatient households: where λ B 1,t corresponds to the marginal utility of income associated to the budget constraint of impatient households.
The structure of the model guarantees that a realized job match yields some pure economic surplus.
The share of this surplus between the worker and the firm is determined by the wage level. The wage is set according to the Nash bargaining solution. The worker and the firm split the surplus of their matches with the absolute shares ϒ F and ϒ I . The difference between V L,F n,t and V L,F u,t determines the worker's surplus. To keep the model simple, we assume that the firm's surplus is given by the real cost per hire, κ j x j t η .
Hence, the total surplus from a match is the sum of the worker's and the firm's surpluses. The wage bargaining rule for a match in the sector j is where

Domestic retailers
There is a continuum of domestic retailers of measure one identified by i. They purchase undifferentiated , brand them, and sell them to aggregators. 2 The aggregators have the following domestic goods production function: where θ D is the elasticity of substitution between intermediary domestic goods.
1−θ D as the price index associated with the aggregator y D t . Then, demands for individual domestic intermediate goods is given by We assume that the small open economy has no control over the world price of exported goods. Hence, the domestic-currency export price, P X t (i), once converted to foreign currency, is equal to the world price, Domestic retailers operate in a monopolistically competitive environment and set their prices while supporting a quadratic adjustment cost ψ D 2 The gross inflation rate of domestically produced goods is defined as π D t (i) = P D t (i) P D t−1 (i) and is set to π D at the steady state. Importing firm i solves the following problem:

Importers
The aggregate of imported intermediate goods is given by where θ M is the elasticity of substitution between intermediary imported goods.
1−θ M as the price index associated with the aggregator y M t . Then, demands for individual imported intermediate goods is given by Foreign intermediate goods are imported by monopolistically competitive firms at the world price, e t P * t . Importing firms then sell those goods in domestic currency to final-good producers. Resale prices, and is set to π M at the steady state. Importing firm i solves the following problem: where Π M t (i) identifies real profits and is defined as follows:

Final-good producers
Firms in the final-good sector are perfectly competitive. They combine domestic and imported goods to produce a single homogeneous good using the following constant elasticity of substitution (CES) technology: where the share of imported goods at the steady-state is defined by a and γ corresponds to the inverse of the elasticity of substitution between domestic and imported goods.
The representative final-good producer solves The zero-profit condition implies that

Exports
The foreign demand for locally produced products is as follows: where y * t is total revenue in the foreign economy, ρ 1 captures the elasticity of substitution between the exported and foreign-produced products in the consumption basket of foreign consumer, and ρ 2 is the share of exports in the rest of the world's total demand.

Banks
The banking sector is specified based on Gerali et al. (2010). Banks, owned by patient households, are monopolistically competitive in the deposit and loan markets, which gives them the power to set the rates while taking into account the demand from impatient households and entrepreneurs. Further, banks have to obey a balance sheet identity defined in real terms: suggesting that banks can finance their loans, b t , using either deposits, d t , or bank capital (equity), k b t .

Wholesale branch
The wholesale bank combines bank capital, k b t , and wholesale deposits, d t , on the liability side and issues wholesale loans, b t , on the asset side. Banks are assumed to be subject to a quadratic cost whenever the capital to risk weighted assets ratio, deviates from a bank capital ratio that is required by the regulator, ψ k 1,t . The regulated capital ratio follows the stochastic process: where 0 < ρ ψ < 1 and ε ψ,t ∼ N(0, σ ψ ).
Banks accumulate the stock of capital by retaining a constant share of profits in each period. Hence, the law of motion for bank capital is given as follows: where, k b,n t ( j) is bank j's equity in nominal terms, Π b,n t−1 ( j) are overall profits made by banks in nominal terms, ς is the share of undistributed dividends, and δ b measures the capital depreciation rate, which also prevents from overaccumulation of bank capital.
Let's considerR B from the deposit branch. The wholesale bank chooses the amounts of loans b B t , b E t , and deposits d t so as to maximize profits, subject to a balance sheet constraint. and where is the quadratic cost incurred by the wholesale bank and the parameters ϑ B and ϑ E are the risk-based weights on the bank's assets.
By no-arbitrage arguments, the deposit rate paid by the wholesale to the deposit branch will be equal to the policy rate (i.e., R D t = R t ).

Loan and deposit demand
We assume that units of loan contracts bought by households and entrepreneurs are bundled in a CES basket of differentiated products -each supplied by a branch of a bank, j, with elasticity of substitution equal to θ B and θ E , respectively. 3 The demand function for households seeking an amount of borrowing equal to b B t ( j) can be derived from minimizing the total repayment: Impatient households' demand for loans at bank j is obtained as: Bank lending to entrepreneurs is determined in a similar fashion. The representative entrepreneur's optimal demand for loans from a bank j is the following:

Retail banking
Retail banks operate under a monopolistic competition regime where they set lending and deposit rates while considering a quadratic adjustment cost.
Consider next the problem of the loan branch of the bank itself, which takes demand for its loan products, Equations (30) and (31), as given when maximizing profits by setting its lending rates. The loan branch borrows funds from the wholesale branch of the bank at the ratesR B t andR E t ; and transforms these into loans made available to impatient households and entrepreneurs at lending rates R B t ( j) and R E t ( j) set as markups overR B t andR E t , respectively. The bank must pay adjustment costs when changing its lending rates of the form: The problem for retail loan banks is to choose R B t ( j) and R E t ( j) given the following optimization problem: subject to Equations (30) and (31).

Capital and housing producers
At the beginning of each period, we assume each capital good producer purchases an amount i k t of final goods from retailers and stock of old non-depreciated capital (1 − δ )k t−1 from entrepreneurs at a real price q k t . Old capital can be converted one-to-one into new capital, while the transformation of the final good is subject to quadratic adjustment costs.
The amount of new capital is given by: Assuming that capital goods producers are owned by the patient households, one can write the maximization problem as follows Similarly, we assume that housing accumulation follows: and the optimization problem is:

Monetary and tax policies
The central bank targets the short term policy rate according to an augmented Taylor type policy rule, which allows the monetary authority to react to changes in the real exchange rate.
where ρ R ∈ (0, 1) is the degree of interest rate smoothing and ρ π , ρ y , ρ s > 0 are coefficients measuring the relative weights on inflation deviation from its steady state, and output and real exchange rate change with respect to previous period levels, respectively. Further, the interest rate rule is subject to an uncorrelated exogenous shock ε R,t ∼ N(0, σ R ).
Government expenditures consist of distributed social benefits and lump-sum transfers, while revenues come from the collected fines following audits as well as payroll and labor income taxes. The government is assumed to have a balanced budget rule defined as follows: We do not consider active instruments for the government as the tax rates τ t and τ s t are assumed to follow AR(1) exogenous processes. Namely, τ t τ = τ t−1 τ ρ τ exp(ε τ,t ) and where ρ τ and ρ s τ ∈ (0, 1), ε τ,t ∼ N(0, σ τ ), and ε τ s ,t ∼ N(0, σ τ s ). seven key macroeconomic quarterly time series as observable variables: the log difference of real GDP, the log difference of tax revenues, the log difference of real deposits, the log difference of the real borrowing, the log difference of real effective exchange rate, the CPI inflation rate, and the housing price inflation rate. Some parameters are calibrated as they turn out to be difficult to identify -generally, parameters that are closely tied to long run moments. Regarding the real sector, we assume the elasticity of output with respect to labor in both sectors, 1 − α F and 1 − α I , to be equal to 0.65, a value broadly used in the DSGE literature. The steady state of the formal sector technology, z F , is calibrated to 1. The elasticity of substitution among different intermediary goods, θ D and θ M , are set to 6 so that the intermediary firms' steady-state mark-up is pinned down at 20 percent. The depreciation rate of physical capital is set to 0.025, implying that it takes 10 years to completely depreciate.

Calibration and prior distributions
For the labor market parameters we resort to a variety of studies. We calibrate the exogenous separation rate in the formal sector to 0.05, similar to the estimates of Mumtaz and Zanetti (2017) and the calibration of Blanchard and Galí (2010). To capture the importance of unionization and the employment protection legislation in the formal sector, we assume a higher level of exogenous probability of getting fired from the informal sector, which is set to 0.1. Households' bargaining power in both sectors are assumed to be equal to a standard value of 0.5. Regarding income tax and social security contribution by firms, we set their steady states, τ and τ s , to 0.35 and 0.15, respectively.
Considering the financial sector, we calibrate the elasticity of substitution between intermediary loans to impatient households and entrepreneurs, θ B and θ E , to 3 and 4, respectively. The share on nondistributed profits is chosen to match the ratio of capital to total asset of 15 percent. Bank risk weight on impatient households' and entrepreneurs' borrowing are set to 0.5 and 0.25, respectively, reflecting a lower risk for the mortgage loans. The depreciation rate of bank capital is equal to 0.035.
Tables 1a and 1b report the prior distributions of the estimated parameters. For several new Keynesian and international macroeconomic structural parameters, prior distributions are close to Smets and Wouters (2003) and Jouini and Rebei (2014). Besides, we set the average value of the steady state of the informal technology, z I , to 3 with a standard deviation of 1.5. 4 In addition, we use the calibration of the labor market parameters reported in Blanchard and Galí (2010), as the average prior while permitting diffuse distributions. For the exogenous processes, autoregressive coefficients prior averages are set to 0.5 except for the persistence parameter of the shock on trending technology -assumed to be equal to 0.2 as suggested in the literature. Finally, standard deviations follow diffuse inverse of gamma distributions with an average ranging between 0.005 and 0.01.

Estimation results
The  Regarding the degree of stickiness in bank interest rates, we find that entrepreneurial loan rates adjust more rapidly than the rates on mortgage loans to changes in policy rates. This result reflects the degrees of risk and the amount of collateral relative to the loan characterizing each type of households. The capitalto-asset ratio adjustment cost is estimated below its prior mean, implying a rather low deposit-loan spread required to offset profit losses due to deviations from the equilibrium ratio. Adjusting investment in the housing sector is estimated to imply a higher cost than in the productive capital sector as the parameters governing the two adjustment costs have average posterior values equal to 5.976 and 4.866, respectively.
The posterior average estimates of the extended Taylor rule characterize the conduct of monetary policy.
The posterior average of the reaction coefficient to fluctuations of output growth is found to be equal to 0.268, while the estimate of the reaction coefficient to inflation deviations from the target is 1.771. The monetary reaction to exchange rate changes, estimated at 0.743, is high and statistically significant. These estimates suggest that the nominal interest rate reacts more strongly to fluctuations in exchange rate than output, which is consistent with the managed exchange policy adopted by the central bank of Tunisia during the considered period.

Impulse-response functions
We highlight in this section the impact of some shocks specific to the financial sector. As an illustrative example, we describe the transmission mechanisms of the borrower's and entrepreneurs' LTV shocks as they turn out to be important in determining real aggregate fluctuations. Figure 1 shows the impulse responses following a temporary 1 percent increase in the LTV of impatient households. The shock generates an immediate mild response followed by a stronger and hump-shaped increase of household borrowing with a maximum of about 6 percent reached after six quarters. In parallel, interest rate spreads increase as a result of the rising demand of loans. Patient households' resources are redirected towards deposits; as a result, aggregate consumption drops on impact and increases subsequently owing to the positive revenue effect.
Housing prices increase on impact due to higher demand. The increasing borrowing cost for entrepreneurs is passed through to intermediate-then to final-goods producers generating a moderate increase of inflation on impact. As an initial consequence of the surge in borrowing, interest rates rise implying a real exchange rate appreciation. A second round effect attributed to the augmented Taylor rule occurs and interest rates mildly drop given the important reaction parameter relative to exchange rate fluctuations. Once deposits start returning to the initial steady state, aggregate consumption becomes mildly positive.
In Figure 2 a 1 percent shock on entrepreneurs' LTV is imposed. This demand shock transmits through a rise in lending to entrepreneurs as they increase the demand for consumption goods, labor, and physical capital as a first round effect. Impatient households face an increase in the banking interest rate spread and lower the demand of bank loans. Credit demand shifts from the household to the business side. With the increase in deposits by savers, the two mechanisms imply a fall in aggregate consumption, which persistently stays below the steady state. Thus, the shock manifests like a negative aggregate demand shock generating a decline in sectoral and aggregate production levels, higher unemployment rates, and a drop in final good prices. Accordingly, the monetary authority loosens its policy and the real exchange rate depreciates.   Table 2 shows the fractions of the forecast error variance of endogenous variables accounted for by the structural shocks at the mean; the 5 th and 95 th percentiles of the posterior distribution are also reported. In the context of the estimated model, the output is mainly driven by technology shocks in the formal sector followed by monetary policy shocks. The foreign shocks and financial sector shocks account for 15.6 and 10.6 percent of the fluctuations of real GDP growth, respectively.

Variance decomposition
On average, financial market shocks are responsible of approximately half of the loans' fluctuations of the patient households and entrepreneurs in the long run. Interestingly, both impatient households and entrepreneurs LTV shocks play a significant role in the dynamics of domestic variables including sectoral productions and aggregate consumption. Nevertheless, the importance of these shocks in the domestic inflation rate and exchange rate fluctuations are relatively limited to 5.7 and 0.5 percent, respectively.
Concerning the real activity, between 10 and 20 percent of the sectoral production dynamics are attributed to financial market disturbances.
The exchange rate acts as a shock absorber in the sense that the real exchange rate movements have served to mitigate the impact of the foreign interest rate shock on the domestic economy. In particular, the real exchange rate volatility is mainly explained by the foreign interest rate (85.1 percent in average); while the same shock generates 9.1 percent of the variance of output in the long run. In addition, the domestic monetary policy shock provides a very small contribution to the exchange rate fluctuations.

Monetary and Macroprudential Optimal Policies
In this section, we evaluate the optimality of alternative simple monetary and macroprudential rules using an aggregation of households' welfare as a metric. Counterfactual specifications of policy rules are compared to the historical average level of welfare derived from our benchmark model based on the estimated posterior averages of the structural parameters. While the monetary rule is assumed to follow the same specification in Equation (34), macroprudential regulation is implemented to assure financial stability through the monitoring of output and the credit supply during upswings and downturns. Specifically, we identify the following macroprudential policy rules: • Loan to value applied on households' borrowing (LTV-B) • Loan to value applied on entrepreneurs' borrowing (LTV-E) • Bank capital requirement (BKR) Then, we numerically search for the feedback coefficients in the monetary and alternative macrofinancial rules to maximize the present value of life-time utility, which reads given the equilibrium conditions of the model. Assuming no growth in the steady state,we rewrite equation in recursive form as Since with heterogeneous agents and incomplete markets there is no commonly accepted criterion for the choice of the weights assigned to each agent, we will report the welfare per type of household. In what follows we report the welfare effects of the various policies in terms of a consumption equivalent measure calculated as the percentage increase in the historical average consumption that would make each class of agents' welfare under the initially estimated policy equal to their welfare under the optimized policy rule.
Importantly, the second-order approximation method that we use allows us to take the effects of aggregate uncertainty into consideration.

Independent policy setting
Under the independent policy setting (i.e.,without cooperation), we run the welfare maximization exercise for the interest rate rule and a macroprudential rule separately while the parameters of the alternative policy are set to their estimated values. 6 The first welfare maximization exercise is conducted over the optimal choice of the extended Taylor rule parameters while assuming all parameters of the macroprudential rules to be zero. Table 3 shows the welfare gain yielded by setting the monetary rule parameters to their optimal values. To have a better understanding of the results, we conduct the exercise conditional on the source of fluctuation in the model and we distinguish between the welfare for each type of households. The results yield a very clear picture.
Welfare outcomes suggest that the monetary policy rule that maximizes welfare gains is an augmented one that stabilizes inflation, reacts to the exchange rate, and disregards output fluctuations. Considering all shocks of the benchmark model, the optimal augmented Taylor rule would procure a welfare gain equivalent to an average permanent increase in consumption of 2.06 percent where the main gain is attributed to borrowing households and entrepreneurs. This welfare gain is relatively elevated compared to other results reported in the literature (e.g., Schmitt-Grohe and Uribe, 2007), which is primarily tributary to the volatile sources of fluctuation in a developing economy context in addition to the low discount rate for impatient households and entrepreneurs. As discussed by Clarida et al. (2002), in the producercurrency pricing framework the nominal exchange rate automatically translates into a change in the price of imported goods relative to local goods, achieving a nearly efficient outcome. Hence, it is not optimal to target the nominal exchange rate. However, Corsetti et al. (2010) show that when international financial markets are incomplete, the inflation targeting policy reproduces the flexible price outcome and therefore 6 Based on the maximization of the proposed welfare measure, we limit our attention to policy coefficients in the interval (1, 5] for ρ π , [0, 1] for ρ y , and [0, 3] for ρ s as in (Schmitt-Grohe and Uribe, 2007), and in the interval [0, 3] for macroprudential instruments.
eliminates the welfare costs associated with staggered price setting, still the flexible price equilibrium is not fully optimal. In the context of our model, financial markets are imperfect owing to presence of the costly adjustment of foreign assets. This feature yields an optimized policy rule that stabilizes exchange rate fluctuations with a coefficient equal to 1.97 in the benchmark model. Table 3 shows that, when monetary and financial shocks or external shocks are considered, optimal policy does imply relatively significant departures from inflation targeting in terms of the parameters of the policy rule.  Tables 4a to 4c show the welfare gains yielded by three different panels according to the regulation regime. We consider two cases of loan-to-value countercyclical rules, one for borrowing households and another for entrepreneurs, which react to output and borrowing growth rates. Further, we consider the case of capital to weighted asset ratio, which can react to output and loans to households and entrepreneurs separately. A general outcome resulting from the counterfactual exercises is that optimized macroprudential LTV rules reflect pronounced countercyclical reaction functions towards output and/or borrowing dynamics. The impact on welfare is relatively small compared to the one obtained from the optimized extended Taylor rule. For instance, the highest average consumption gain, 0.33 percent, is achieved by the LTV-E optimized rule exhibiting stabilized output and entrepreneurs' borrowing. From the producer perspective, the interpretation of this result is that the output stability reduces the fluctuations of the production factors, both labor and capital, as well as their corresponding prices, which leads to a small interest rate premium due to higher lending rate adjustment costs. In other words, there is a compensation mechanism that a policy-induced reduction in interest lending spreads leads to a larger expected credit, resulting in a welfare gain through high investment, capital, housing, and consumption. Note that the welfare gain also comes from the housing accumulation of the borrowing households and business sector; while, patient households are also better off with the macroprudential policy, but with a smaller welfare gain.  However, the welfare outcome turns out to be very sensitive to informality as it drops by 95, 85, and 70 percent when we consider the LTV-B, LTV-B, and BKR rules, respectively. The accelerating negative correlation between welfare gains and the weight of the informal sector is mainly explained by the negative distortionary penalties on controlled agents.
The intuition behind our findings is rooted in the effect of macroprudential policies on the cyclical reallocation of resources between formal production, allowing access to financing and more efficient labor matching process, and informal production, which relies less on capital and exhibits less efficiency in the matching process between firms and job seekers.

Cooperative setting
Under cooperation, one institution sets both the monetary policy and the macroprudential tool in order to maximize the social welfare function. Tables 5 and 6 show that the impact of counterfactual macroprudential rules is more pronounced in the case of cooperation. For instance, the average consumption improves the optimized interest rate rule -with stabilized inflation and mitigated adverse effect of frictions -the output is higher in average, which generates larger accumulation of housing and physical capital and more operative macroprudential policy. Simultaneously, financial stability facilitates the monetary authority's task of maintaining price stability by containing excessive accumulation of credit, reducing unsustainable developments in asset prices, and mitigating the procyclical financial accelerator mechanism. Our results are similar to those reported by Lambertini et al. (2013) since they find that under the implementation of both interest-rate and LTV policies, agents are generally better off. 7 As the optimized policy parameter values are virtually unchanged in the independent and cooperative settings, we can infer the outcome of optimal macroprudential policy by simply taking the difference of welfare gains from the results shown in Table 3. Interestingly, Laureys and Meeks (2018) show that including a reaction to the bank capital ratio in the monetary policy rule could improve the outcome in terms of the objective function defined as a weighted average of the volatilties of some key variables. Further, the coefficients on inflation and output gaps significantly decline. Our results differ from those results as the coefficient of the optimized monetary rule remain virtually unchanged, which could come from the nature of the definition of the metric -welfare gain versus weighted sum of unconditional variances.

Role of the informal sector
Based on the estimated parameters of the model, including those of the monetary rule, we evaluate the optimality of the macroprudential policy based on different values of the steady-state value of technology in the informal sector. The objective is to analyze the sensitivity of the results reported in Tables 5 and 6 with respect to informality. Figure 3 reports the welfare gain sensitivity to the parameters of the LTV-B and LTV-E as well as the endogenous size of the informal sector.
Several interesting results are worth noting. First, the presence of the informal sector lowers the welfare impact of macroprudential policies. The rationale behind this results is twofold. First, capital accumulation by entrepreneurs is negatively correlated with the size of informality owing to its production technology, which does not rely on physical capital. In this context entrepreneurs would have a reduced access to borrowing and the stabilizing impact of the LTV-E policy is smaller. Second, wages are particularly lower in the presence of informality for both savers and borrowers yielding moderate average levels of accumulated housing stock. As a consequence, impatient households would have less access to financial services and smoothing out consumption over time becomes more challenging, which results in a less effective countercyclical LTV-B rule. 8 From the bank's perspective, low levels of credits to entrepreneurs and households yield reduced interest rate spreads in the long term; and their profitability declines, which accelerates the slow down in the credit market through a balance sheet effect (i.e., less accumulation of capital and lower deposits).
The second result that emerges from Figure 3 is that welfare gains drastically decline when the share of the informal sector reaches a certain threshold of about 20 percent. Furthermore, in several cases welfare losses are registered for high, but still reasonable, shares of informality (e.g., cases of LTV-B with respect to γ ϖ b B and LTV-E with respect to γ ω y ). Note that the results are based on the historical monetary rule, which is not aggressively reducing inflation fluctuations. One should expect that the negative effect of the presence of informality on macroprudential efficiency would be compensated by inflation targeting. 9 The findings suggest that combining financial frictions with other sources of market imperfection generally reduces the efficiency of the macroprudential policies. The quantitative reduction in the welfare gain generated by the implementation of the alternative policy rules can be substantive (e.g., the case of LTV-B). In particular, abstracting from price stickiness may more than double the welfare gain implied by the counterfactual macroprudential policies. This result is compatible with the outcome of the cooperative setting as it shows that when inflation targeting is sufficiently strong, the outcome of the macroprudential policy is drastically enhanced. When it comes to labor frictions, the policy rule may also dampen that market imperfection as long as LTV-B or a BKR rules are applied.

Conclusion
Macroprudential policies can play an important role in several economies, both advanced and developing economies. They impact the economy through the stabilization of financial market indicators and variables relevant for households' welfare-reduction of the financial friction negative effects. This paper models and estimates a New Keynesian small open DSGE economy with the housing sector, financial frictions and informality to examine the potential implications of macroprudential policies in the context of developing countries. The estimated model reveals that a large share of the economy-i.e., production and labor market-corresponds to informal activities. Findings suggest that the countercyclical loan-to-value ratio rule responding to output and borrowing changes is less effective in the presence of informality if the monetary policy remains passive -lack of a commitment to inflation stabilization.
Once cooperative monetary and financial stability policies are considered, the welfare improving role of 34 ©International Monetary Fund. Not for Redistribution the loan-to-value and bank capital ratio rules are drastically enhanced as far as the interest-rate responds aggressively to inflation.
Our framework, while capturing some critical features of developing countries and emerging market economies, abstracts from other relevant aspects. Indeed, one possible interesting extension would be to specify an optimized role of government in order to consider the possibility of intervening through the use of public spending, transfers, or tax rates. We also abstract from a richer specification of external financing for banks or private borrowers.