Skip to main content

FDI, Coexistence, and Jobs: A DSGE Model for Morocco

1. The Core Policy Question

We begin with a question critical for many developing economies, including Morocco:

When highly productive multinational corporations (MNCs) invest, what happens to the local economy?

  • Do they drive out domestic firms, capture the entire market, and repatriate profits?
  • Or can they coexist with domestic firms, creating moderate GDP gains and stable jobs?
  • What are the trade-offs for skilled vs. unskilled workers?

To answer this, we must build a model, but not just any model. We need one that is both economically realistic and computationally solvable. This document outlines the structure, key concepts, and findings of such a model.

2. Key Economic Concepts Explained

This model is a DSGE model that combines TANK households with an S&M labor market and CES production. Let's break down what that means.

DSGE (Dynamic Stochastic General Equilibrium):

  • Dynamic: The model evolves over time. Agents make decisions (like saving and investing) that link the present to the future. Capital ($K_t$) accumulates via investment.
  • Stochastic: The model can be hit by random shocks (e.g., a TFP shock or a policy change). Our analysis is a "counterfactual" or "comparative static" exercise, comparing two different steady states (before and after a shock).
  • General Equilibrium: All markets (labor, capital, goods) are modeled and must clear simultaneously. Prices (like the wage, $w$, and interest rate, $r$) are endogenously determined by supply and demand, linking everything together.

TANK (Two-Agent New Keynesian):

  • This describes the household side of the model. Instead of one "representative" household, we have two types, which is crucial for analyzing inequality.
  • "Savers" (Skilled): These households are patient (high $\beta$). They save, own the economy's capital stock ($K$), and smooth their consumption over time, as described by the Euler equation.
  • "Spenders" (Unskilled): These households are "hand-to-mouth." They are impatient and live paycheck-to-paycheck, consuming their entire labor income in each period. This introduces consumption inequality and makes the economy more responsive to labor income shocks.

S&M (Search-and-Matching):

  • This is a realistic model of the labor market, based on Nobel Prize-winning work. It replaces the simple "supply = demand" assumption.
  • In an S&M model, finding a job takes time. Unemployed workers must "search," and firms must post costly "vacancies" (job ads).
  • A "matching function" (like a production function) determines how many new hires are created from the pool of unemployed workers and open vacancies.
  • This process endogenously creates a "natural" rate of unemployment and explains why wages are the result of a Nash Bargaining process between the firm and the worker.

CES (Constant Elasticity of Substitution):

  • This is a flexible functional form used to aggregate different inputs. We use it in two places:
    1. To aggregate skilled ($L_S$) and unskilled ($L_U$) labor into a single "labor composite" ($L_f$).
    2. To aggregate the goods from domestic firms ($Y_D$) and MNCs ($Y_M$) into a final "total GDP" ($Y_{Total}$).
  • The key parameter is $\sigma$, the elasticity of substitution.
    • If $\sigma = \infty$, the goods are perfect substitutes. This leads to "corner solutions," where the most productive firm takes 100% of the market.
    • If $\sigma = 1$, it's a standard Cobb-Douglas function.
    • If $\sigma < \infty$, the goods are imperfect substitutes. This is the key to our model: consumers value variety. Even if MNC goods are cheaper, consumers still want *some* domestic goods, ensuring their survival.

3. The Model's Architecture & Core Equations

Our final, solvable model (`3_5_..._final.py`) combines these features. The "computational trick" to ensure a solution was to fix the economy's total capital stock ($K$) and its allocation, allowing us to focus on the labor market dynamics, which are the core of our policy question.

Model Architecture Overview
Component Feature Economic Rationale
Firms Heterogeneous (`domestic`, `mnc_us`, `mnc_china`) MNCs have different TFP, capital intensity (`p_alpha`), and skill preferences (`p_skill_pref`).
Households Heterogeneous (`savers`, `spenders`) A TANK setup to capture income and consumption inequality.
Labor Dual Markets (`skilled`, `unskilled`) Two separate Search-and-Matching (S&M) markets with frictions, bargaining, and realistic unemployment.
Production Nested CES Aggregation Imperfect substitution is the key. It ensures firms can coexist, preventing "corner solutions."

Mathematical Addendum: Core Model Equations

The following equations (drawn from the "full" DSGE in `3_mar_gamspy_fdi_model.py`) form the economic logic of the model. We solve for the "steady state," where all variables are constant over time.

A. Firm Production (for firm $f$)

1. CES Labor Composite ($L_f$): Aggregates skilled ($L_{f,S}$) and unskilled ($L_{f,U}$) labor, governed by skill preference $\chi_f$ and elasticity parameter $\rho$.

$$L_f = \left[ \chi_f L_{f,S}^{\rho} + (1-\chi_f) L_{f,U}^{\rho} \right]^{1/\rho}$$

2. Production Function ($Y_f$): Cobb-Douglas function combining capital ($K_f$) and the labor composite ($L_f$). $A_f$ is firm-specific TFP. The shares $\alpha_f + \beta_f < 1$ allow for decreasing returns to scale, which helps ensure stable firm sizes.

$$Y_f = A_f K_f^{\alpha_f} L_f^{\beta_f}$$

3. Optimal Capital Demand (FOC): Firms hire capital until its marginal product equals the economy-wide rental rate, $r$.

$$r = \frac{\partial Y_f}{\partial K_f} = \alpha_f \frac{Y_f}{K_f}$$

4. Optimal Labor Demand (FOC): Firms hire each labor type until its marginal product equals its wage ($w_S$ or $w_U$). This is derived using the chain rule on equations (1) and (2).

$$w_S = \frac{\partial Y_f}{\partial L_{f,S}} = \left( \beta_f \frac{Y_f}{L_f} \right) \cdot \left( L_f^{1-\rho} \chi_f L_{f,S}^{\rho-1} \right)$$ $$w_U = \frac{\partial Y_f}{\partial L_{f,U}} = \left( \beta_f \frac{Y_f}{L_f} \right) \cdot \left( L_f^{1-\rho} (1-\chi_f) L_{f,U}^{\rho-1} \right)$$

B. Search & Matching Labor Market (for skill type $s$)

5. Matching Function (Job Finding/Filling): Determines the probability of a worker finding a job, $p(\theta_s)$, and a firm filling a vacancy, $q(\theta_s)$, as a function of labor market "tightness" $\theta_s = V_s/U_s$ (vacancies / unemployed). $\mu_s$ is matching efficiency and $\eta_s$ is elasticity.

$$p(\theta_s) = \mu_s \theta_s^{1-\eta_s} \quad \text{(Job Finding Rate)}$$ $$q(\theta_s) = \mu_s \theta_s^{-\eta_s} \quad \text{(Vacancy Filling Rate)}$$

6. "Bathtub" Model (Unemployment Flow): In steady state, the flow of workers *out* of jobs (separation rate $s_s$ times employment $L_s$) must equal the flow *into* jobs (job finding rate $p(\theta_s)$ times unemployment $U_s$).

$$s_s L_s = p(\theta_s) U_s$$

7. Job Creation Condition (Free Entry): Firms post vacancies until the cost of hiring equals the expected profit from the job. $\kappa_s$ is the vacancy cost. This links the goods market ($MPL_s$) to the labor market.

$$\underbrace{\frac{\kappa_s}{q(\theta_s)}}_{\text{Cost of Hiring}} = \underbrace{\frac{MPL_s - w_s}{r + s_s}}_{\text{Present Value of Profit from Job}}$$

8. Nash Wage Bargain: The wage $w_s$ is the result of a bargain, splitting the total match surplus between the worker (who has bargaining power $\phi_s$) and the firm. $b_s$ is the worker's outside option (unemployment benefit/leisure).

$$w_s = (1-\phi_s) b_s + \phi_s \underbrace{(MPL_s + \kappa_s \theta_s)}_{\text{Total Match Surplus}}$$

C. Household & Macro Closure

9. Euler Equation (Savers): The saver's consumption choice over time, which links the discount factor $\beta$ and the real interest rate $r$ in steady state. $\delta$ is capital depreciation.

$$1 = \beta (1 + r - \delta)$$

10. Spender Budget: Spenders simply consume their entire labor income ($w_U L_U$).

11. Market Clearing: Total capital, labor, and goods produced must equal the sums across all firms and households.

4. Policy Experiments & Key Findings

We run several "counterfactual" scenarios to test the model, starting from a calibrated Baseline (which represents the current Moroccan economy). The charts below show the results of these policy experiments.

Note on Calibration: The model is calibrated to reflect a developing economy labor market with baseline unemployment rates of approximately 11% for skilled workers and 14% for unskilled workers. This reflects labor market conditions with higher job separation rates and search frictions compared to advanced economies. These elevated baseline rates make the model particularly relevant for analyzing labor market dynamics in economies like Morocco, where structural unemployment remains a key policy challenge.

Figure 1: Economic outcomes across different policy scenarios

Finding 1: Coexistence is the Default

The "High MNC TFP" shock (a 10% increase in MNC productivity) does not eliminate domestic firms.

  • In the text, a 10% MNC TFP increase only shifts their market share from 60% to 62%.
  • We can see this in Figure 1, Panel B: the "High MNC TFP" bar shows only a tiny increase in MNC share (red) and a tiny decrease in domestic share (blue).
  • Why? The Nested CES structure (Imperfect Substitution) means consumers value the "domestic" good variety. Even if MNCs are more efficient, a domestic market remains. No corner solution.

Finding 2: Moderate Gains, Stable Markets

Figure 2: Percentage changes from baseline for different policy shocks
  • The 10% TFP shock (a large shock!) only increases GDP by ~3.2% (Figure 2, Panel A). This is a credible, realistic gain, unlike the 147% predictions from simpler, frictionless models.
  • Look at unemployment (Figure 2, Panel B). The changes are modest, around 0.2 percentage points. Despite baseline unemployment of ~11% skilled and ~14% unskilled, labor markets remain relatively stable because the S&M frictions (job search, matching) dominate. Attracting FDI does not cause mass unemployment even in high-unemployment economies.

Finding 3: Policy is About Trade-Offs

Figure 3 is the most critical for policymakers, as it shows the trade-offs of different policy paths.

Figure 3: Policy Trade-offs in the Moroccan Economy
  • Trade-Off 1 (Panel A): Growth vs. Economic "Sovereignty"
    • The "Capital-Int. MNC" scenario (red square) delivers the highest GDP (x-axis), but at the cost of the highest MNC market share (y-axis).
    • "Domestic Catch-Up" (gray square) yields lower GDP but "claws back" market share for domestic firms.
  • Trade-Off 2 (Panel B): Efficiency vs. Inequality
    • The "Skill-Int. MNC" scenario (green square) delivers the highest wage premium (y-axis), dramatically increasing inequality between skilled and unskilled workers (86% premium vs. 31% baseline).
    • "Better Labor Mkt" (purple square) is the only policy that significantly lowers unemployment (x-axis, reducing it to ~8% skilled and ~11% unskilled) and reduces inequality (y-axis) simultaneously. This demonstrates that labor market reforms—such as reducing job separation rates through better job protection or training programs—can be highly effective in high-unemployment economies, achieving a 24% reduction in skilled unemployment.

Finding 4: "Good" vs. "Bad" Fragmentation (A Geopolitical Shock)

To model today's geopolitical environment, we introduce a new "Tech Denial" shock, representing FDI fragmentation. In this scenario, we apply a 5% TFP (productivity) penalty to `mnc_china` to simulate technology access restrictions.

This policy successfully reroutes market share, but it comes at a significant macroeconomic cost. The results show a "negative-sum" outcome:

  • Market Share is Rerouted: The `mnc_china` firm's market share falls from 30.1% to 28.5%. This lost share is captured by both `Domestic` firms (whose share rises from 39.8% to 40.7%) and `mnc_us` firms (share rises from 30.1% to 30.8%).
  • The Macroeconomy Shrinks: This is not a "win." The policy-induced inefficiency causes total GDP to fall from 3.576 (Baseline) to 3.518.
  • Labor Market Impact: This drop in national output leads to lower real wages for both skilled (4.493 → 4.411) and unskilled (3.423 → 3.386) workers, and a slight rise in unemployment (skilled: 10.9% → 11.1%; unskilled: 14.2% → 14.2%). In an economy with already elevated unemployment, these labor market impacts are more consequential.

This creates a powerful policy insight when compared to the "Domestic Catch-Up" scenario (see Figure 3, Panel A):

"Good" Fragmentation (Domestic Catch-Up): Domestic firms gain market share (to 40.9%) by *improving their own productivity*. This is a positive-sum outcome: total GDP rises (to 3.618) and so do wages.

"Bad" Fragmentation (Tech Denial): Domestic firms gain market share (to 40.7%) by *having a competitor penalized*. This is a negative-sum outcome: total GDP falls (to 3.518) and so do wages.

This demonstrates that while both policies can *look* similar (a ~1 percentage point gain in domestic market share), their underlying impact on national welfare is completely opposite.

5. Conclusion for Moroccan Policymakers

  1. Welcome FDI: Policymakers can pursue FDI liberalization without fearing the extinction of their domestic industries. The two will coexist in a stable equilibrium.
  2. Be Realistic: The economic gains will be moderate and gradual, not transformative overnight. A 10% increase in MNC productivity yields approximately 3% GDP growth—significant but not miraculous. This model provides credible, realistic effect sizes.
  3. Prioritize Labor Market Reforms: In an economy with elevated structural unemployment (11-14%), labor market reforms have outsized importance. The "Better Labor Market" scenario demonstrates that policies reducing job separation rates can achieve substantial unemployment reductions (24% for skilled workers) while maintaining wage equality. For developing economies, labor market institutions may be as important as FDI attraction itself.
  4. Watch for Inequality: The type of FDI matters. Attracting "skill-intensive" industries (Figure 3, Panel B) may boost overall wages but will significantly worsen the skilled/unskilled wage gap (from 31% to 86% premium) and push unskilled unemployment even higher (from 14% to 16%).
  5. Choose Innovation over Penalties: Policies that penalize one source of FDI (like the "Tech Denial" scenario) may successfully increase domestic market share, but they do so at the cost of lower national GDP (falling by 1.6%) and lower real wages for everyone. In a high-unemployment economy, such negative shocks have amplified labor market consequences. A strategy focused on boosting domestic productivity (like "Domestic Catch-Up") achieves similar market share goals while making the entire country wealthier and creating jobs.

Final Note: This analysis demonstrates that developing economies face a delicate balance. While FDI can bring growth, the benefits are moderate and must be carefully managed alongside labor market conditions. With baseline unemployment around 11-14%, policymakers cannot afford strategies that further contract the economy or reduce job creation. The path forward requires both welcoming productive FDI and investing in domestic capabilities and labor market institutions simultaneously.

Comments

Popular posts from this blog

Unemployment by state in the USA

Below is a visualization of unemployment rates by county using a powerful Python library called Bokeh . The two maps are for the states of Texas and the Commonwealth of Massachusetts. As the second largest economy in the United States (10th largest in the world), Texas shows interesting county variation in macroeconomic factors such as unemployment. According to Wikipedia , in 2015, Texas was home to six of the top 50 companies on the Fortune 500 list and 51 overall (third most after New York and California). The northern counties were least affected by the financial crisis of 2008/09. Dallas–Fort Worth–Arlington area encompasses 13 counties which constitute the economic and cultural hub of the region commonly called North Texas or North Central Texas. Bokeh Plot The least affected counties in Massachusetts were the southernmost tourist areas of Nantuckett and Dukes County. The ...

Modeling Core PCE inflation: A dual approach

Today's release of the August 2025 Personal Consumption Expenditures (PCE) inflation data drew widespread media attention, with coverage highlighting both the persistence of inflation and its implications for Federal Reserve policy. Across outlets, analysts pointed to resilient consumer spending and income growth as signs of underlying economic strength, even as inflation remains above the Fed's 2% target. The consensus among media reports is that while inflation is not worsening, its stubbornness continues to challenge policymakers navigating a softening labor market and evolving rate expectations. To provide deeper insights into inflation's trajectory, I've developed a forecasting framework that combines two econometric approaches — ARIMA time series modeling and Phillips Curve analysis—to predict Core PCE inflation. This analysis presents a unique opportunity to validate my forecasting methodology against eight months of 2025 data. ...

Do Minimum Wage Increases Really Kill Jobs? Evidence from the "Fight for $15" Era

The debate over minimum wage policy has raged for decades, with economists, policymakers, and business leaders offering sharply different predictions about its effects on employment. Critics warn that raising the minimum wage will force employers to cut jobs, while supporters argue that higher wages boost worker productivity and spending power. But what does the actual data tell us. Using a comprehensive difference-in-differences analysis and Federal Reserve Economic Data covering 43 U.S. states from 2012-2020 of the "Fight for $15" movement between 2012 and 2020, I provide some evidence about how minimum wage increases actually affect employment in the real world. The Perfect Natural Experiment The period from 2012 to 2020 provided economists with an ideal "natural experiment" to study minimum wage effects. Here's why this timeframe was perfect for analysis: Federal Stability : The federal minimum wage remained frozen at $7.25 per hour since 2009, creating ...