[Economic Theory] Hopenhayn Model

A Ydobon
7 min readAug 12, 2023

Hello, it’s been a while since I left medium. So far, I have finished my second year phd and starting thesis years coming September. In this post, we will be looking at Hopenhayn model, which is one of the workhorses in macro model which deals with heterogenous firms.

The structure of model and the calibrated parameter values are taken from “The Empirical Distribution of Firm Dynamics and its Macro Implication, Jaimovich, Terry and Vincent (23, NBER).”

The main purpose of the paper itself is to move away from the usual assumption on idiosyncratic shock process that it follows Gaussian AR(1) process. Rather than the usual assumption, they take a non-parametric approach (simply, based on firm-level data) to approximate the shock.

However, in this post, we will look at the classic Hopenhayn model (1992) and see how to code it in python. Note that depending on the variants of the model, the timing of the model, or the definitions might slightly vary. Also, there were some simplications, too.

Model

Agents

First, we have a continuum of heterogenous firms: operating firms, potential entrants and exitors. As the name suggests, the entry and the exit of a market is a firm’s endogenous decision. The decisions are made by looking at the production cost (wage), operating cost, entry cost and the idiosyncratic profitability shock, which decides good and bad days for the firm.

Households in this model takes a very small role. A representative household will consume product and supply labor so that the two markets (product and labor market) clear in the equilibrium. However, we would not be able to see their optimization problem; maximize utility under the budget constraint kinda story is missing in this model. Also, without solving a complicated consumer’s problem we just take the result of inter-temporal optimization that the discount rate must be equal to the reciprocal of real interest rate.

This model is called to be a partial equilibrium model because we disregard the interactive mechanism of equilibrium but only focus on the firm’s choices given the prices. Although all the household’s choices are made under the surface, the model considers labor to be supplied inelastically (calibrated by employment rate) and the goal is to get the wage that enables the firm to demand the same amount if the wage is realized in the competitive market. Same for the product market, but by simplifying the single homogenous product good to have a unit price, the whole product market can be disregarded.

Types of Firms

Here, we will be discussing what kind of choices each firms make given what kind of restrictions.

i. Operating firms

They are composed by incumbents (have been operating for some time) and entrants (their first time operating). As we mentioned, they produce a homogenous good given p=1 and demand labor at given wage W. Each faces an idiosyncratic profitability shock z, which evolves according to Gaussian AR(1) process for incumbents

Incumbents

and drawn from a Gaussian distribution for entrants.

Entrants

Finally, to be able to operate, each firm has to pay the fixed cost drawn from a uniform distribution.

Fixed cost

ii. Potential entrants

Entrants must pay for sunk entry cost to become a operating firm, which must be equal to the expected value of a firm by free entry condition. At the very beginning a entrant will be drawing a shock z from distribution F_E. From then on it will evolve according to a AR(1) process. Even though some periods are favourable and some are not, in expectation a firm has zero profit.

iii. Exiters

Some portion of incumbents will be leaving the market, if they expect the value from continuing is less than the fixed cost that they will be paying. As we will be discussing later, note that a firm will draw the fixed cost for next period and then decide to exit or not. The key is to get the threshold value of fixed cost that makes one to exit given today’s shock z.

One thing to note is that the production function of a firm is concave i.o.w. decreasing returns to scale. This is to ensure to have a well defined distribution of firms in terms of the size (number of employers). Even a very big firm will have decreasing marginal product of labor so, at some point will stop hiring and leave a room for the existence of smaller firms. In math, 0<\alpha<1.

Equilibrium

i. Optimality of (operating) firm’s decisions.

Given product price and wage, a firm decides the number of employers (continuous choice) and exit (discrete choice). Also, the state variable would be the profitability shock z.

Operating firm’s optimality problem

Side note) \delta is defined as exogenous exit to compare with their data.

We can look more into what follows after max operator in the expectation.

  • 0 would be the value this firm will get if exits in the next period.
  • The second part would be the discounted expected continuation value of a firm given z today and then pay for the fixed cost.

From this, we can get a threshold value for the fixed cost that makes exit optimal. For any \phi_F over it, a firm will exit and get 0 profit. It is equivalent to only think about \phi_F below the threshold when computing expectation over \phi_F.

Optimal exit decision

We can rewrite as following:

Value function

It is important to note that the decision on labor demand is static choice so that it will be made where marginal product equals marginal cost of labor, i.e., wage. ‘Static’ implies that it does not affect future nor affected by the past choices. We only look at current wage and productivity.

Along with the individual firm’s optimization, a free entry condition must be satisfied. (entry cost is given)

Free entry condition

ii. Stationarity of the mass of operating firms (M_O)

Our goal from this model is to find stationary partial equilibrium. This requires the mass of operating firms today (t=0) should be same as yesterday (t=-1) after exits and entry decisions are made. It would be easier to think of mass of firms as number of firms. Along with wage, the mass of entrants is something that we need to find from solving the whole model.

Stationarity of mass.

iii. Stationarity of distribution of operating firms (F_O(z))

Now, along with the mass of firms, we want to have a stationary distribution of firms over profitability z along periods. Simply, we want the distribution to replicate itself over periods.

Stationarity of distribution

iv. (Labour) Market clearing condition

As we discussed early on, labor demand from all firms(LHS) must equal to given labor supply (\bar{N}).

Timing of the model

To grasp the overview of the model, it is crucial to understand so called timing of the model.

  1. New entrant firms pay entry costs \phi_E.
  2. In period t, incumbent firms and new entrants receive an idiosyncratic profitability draw z either from F[z’|z] or F_E(z).
  3. Each operating firms produces given z, W by choosing n. (static choice)
  4. Operating firms draw a fixed cost \phi_F from G(\phi_F).
  5. Operating firms form expectations of continuation values and chooses to exit at the end of period. If decides to remain, must pay the drawn fixed cost to move to next period.
  6. \delta fraction of firms just cease to exist.
  7. Surviving operating firms become incumbents for the next period.

In the following post, we will talk about how to ‘solve for’ this model. There will be some problems in discretizing shocks, setting up the algorithm and to repeat until all the conditions are met mainly through value function iterations and distributions.

Thank you for reading!

--

--