We develop a general equilibrium overlapping generation model, with exogenous but time-varying growth as well as longevity.^{3} Economy is populated by *k*=1,2,…,*K* classes of agents with differentiated endowments and preferences (within one family of functions), who live for *j*=1,2…,*J* periods facing a time- and age-specific mortality rate *π*
_{
j,t
}. Agents have no bequest motive, but since survival rates until the age of *j* at time *t* – i.e., *π*
_{
j,t
} – are lower than one, in each period *t*, a certain fraction of subcohort (*j,k*) leaves unintentional bequests, which are distributed within their subcohort.

### 3.1 Production

Individuals supply labor (time) to the firms. The amount of effective labor of age *j* in subcohort *k* used at time *t* by a production firm is \(L_{t}=\sum _{j=1}^{\bar {J}-1}\sum _{k=1}^{K}N_{{j,k,t}} \omega _{k} l_{{j,k,t}}\), where *N*
_{
j,k,t
} is the size of a (*j,k*) subcohort at time *t*.

Perfectly competitive producers supply a composite final good with the Cobb-Douglas production function \(Y_{t}=K_{t}^{\alpha }(z_{t}L_{t})^{1-\alpha }\) that features a labor-augmenting exogenous technological progress denoted as *γ*
_{
t
}=*z*
_{
t+1}/*z*
_{
t
}. Standard maximization problem of the firm yields the return on capital \(r_{t} = \alpha K_{t}^{\alpha -1}(z_{t}L_{t})^{1-\alpha }-d\) and real wage \(w_{t} = (1-\alpha)K_{t}^{\alpha }z_{t}^{1-\alpha }L_{t}^{-\alpha }\), where *d* denotes the depreciation rate on capital.

### 3.2 Consumers

Consumers are born at the age of 20, which we denote *j*=1, at which time they are randomly assigned with individual productivity multiplier *ω*
_{
k
} as well as utility function parameters. These values do not change until the agent dies and the model is fully deterministic.^{4} Thus, a subcohort *k* of agents within its cohort is described uniquely by assigned values of *ϕ*,*ω*, and *δ* (see Section 4).

The year of birth determines fully the survival probabilities at each age *j*. At all points in time, consumers who survive until the age of *J*=80 die with certitude. The share of the population surviving until older age is increasing, to reflect changes in longevity. The data for mortality come from a demographic projection until 2060 and are subsequently treated as stationary until the final steady state (see Section 4). This modeling choice is conservative in the sense that DB systems are more fiscally viable if the population stabilizes.

At each point in time *t*, an individual of age *j* and subcohort *k* born at time *t*−*j*+1 consumes a non-negative quantity of a composite good *c*
_{
j,k,t
} and allocates *l*
_{
j,k,t
} time to work (total time endowment is normalized to one). In each period *t*, agents at the age of \(j=\bar {J}_{t}\) retire exogenously.^{5} Consumers can accumulate voluntary savings *s*
_{
j,k,t
} that earn the interest rate *r*
_{
t
}. Consequently, consumers’ lifetime utility is as follows:

$$ U_{j,k,t}=u_{k}\left(c_{j,k,t},l_{j,k,t}\right)+\sum_{s=1}^{J-j}{\delta_{k}^{s}}\frac{\pi_{j+s,t+s}}{\pi_{j,t}}u_{k}\left(c_{j+s,k,t+s},l_{j+s,k,t+s}\right) $$

((1))

where discounting takes into account time preference *δ*
_{
k
} and the probability of survival. The instantaneous utility function is given by:

$$ u_{k}\left(c_{j,k,t},l_{j,k,t}\right)=c_{j,k,t}^{\phi_{k}}\left(1-l_{j,k,t}\right)^{1-\phi_{k}} $$

((2))

and *l*
_{
j,k,t
}=0 for \(j\geq \bar {J}_{t}\). In this specification, *ϕ*
_{
k
} determines steady state labor supply. Labor income tax *τ*
^{l} and social security contributions *τ* are deducted from gross earned labor income to yield disposable labor income. Following the Polish legislation, we assume that the labor income tax *τ*
^{l} is deducted from the gross pension benefit to yield the disposable pension benefit. Interest earned on savings *r* are taxed with *τ*
_{
k
}. In addition, there is a consumption tax *τ*
^{c} as well as a lump-sum tax *Υ* equal for all subcohorts, which we use to set the budget deficit in concordance with the data. Received bequests are denoted by beq. When working, the agents are constrained by earned disposable income, bequests, and savings from previous periods with net interest. When retired, the agents are constrained by disposable pension benefit, bequests, and savings from the previous period with net interest. Thus, an agent of type *k* at age *j* in period *t* maximizes her lifetime utility function *U*
_{
j,k,t
} subject to the following sequence of budget constraints:

$$\begin{array}{@{}rcl@{}} \left(1+{\tau_{t}^{c}}\right)c_{j,k,t}+s_{j,k,t}+ \Upsilon_{t} &=&\left(1+\left(1-{\tau_{t}^{k}}\right)r_{t}\right)s_{j-1,k,t-1} \leftarrow \text{capital income}\\ & + & \left(1-{\tau_{t}^{l}}\right)(1-\tau)w_{t}\omega_{k}l_{j,k,t} \leftarrow \text{labor income} \\ & + & \left(1-{\tau_{t}^{l}}\right)b_{j,k,t}+beq_{j,k,t}. \leftarrow \text{pensions and bequests} \end{array} $$

((3))

The full solution to the consumer problem is presented in Appendix Appendix 1. Consumer problem solution.

### 3.3 Pension system

There are two economies, each with a different pension system: an economy with a defined benefit system and an economy in transition from a defined benefit system to a defined contribution one. The social security contribution rates are identical in the two economies, but the tax implicit in the pension system is not due to different algorithms for computing the pension benefits at retirement. Once the pension benefits are computed for each subcohort, they are indexed with the same rate in both systems and for all subcohorts. Both our pension systems are of the pay-as-you-go nature, so for the sake of brevity, we omit this identification when referring to the pension system DB or DC. The algorithms for computing the pension benefits are described below.

*Defined benefit* There is an exogenous contribution rate *τ* and an exogenous replacement rate *ρ* with \(b_{\bar {J}_{t},k,t}=\rho \cdot w_{t-1} \cdot \omega _{k}\cdot l_{\bar {J}_{t}-1,k,t-1}\) holding for all *j,k*. The benefits are indexed annually.^{6} The system collects contributions from the working and pays benefits to the retired:

$$ \sum_{j=\bar{J}_{t}}^{J}\sum_{k=1}^{K} N_{j,k,t}b_{j,k,t}=\tau\sum_{j=1}^{\bar{J}_{t}-1}\sum_{k=1}^{K} \omega_{k} w_{t} N_{j,k,t}l_{j,k,t}+\Xi_{t} $$

((4))

where *Ξ*
_{
t
} is a subsidy/transfer from the government to balance the pension system.

*Transition to defined contribution* The DC pension system collects contributions and uses them to cover for contemporaneous benefits but pays out pensions computed on the basis of accumulated contributions, as given by equation:

$$ b_{\bar{J}_{t},k,t} = \frac{\sum_{s=1}^{\bar{J}_{t}-1}\Big[\Pi_{\iota=1}^{s}\left(1+r^{I}_{t-j+\iota-1}\right)\Big]\tau_{t-j+s-1}\omega_{k} w_{t-j+s-1}l_{s,k,t-j+s-1}}{\sum_{s=0}^{J-\bar{J}_{t}}\frac{\pi_{\bar{J}_{t}+s,t+s}}{\pi_{\bar{J}_{t},t}}} $$

((5))

where \({r^{I}_{t}}\) is defined by the rate of the payroll growth. Analogously to the PAYG DB case, the benefits are subsequently indexed annually.

The initial steady state has a DB system. In period one, unexpectedly, an economy shifts gradually towards a DC system. The gradual transition means that for all cohorts living already before *t*=1, initial capital is computed and implied in the DC system but the pensions allocated according to the DB rules are honored without any adjustments. Furthermore, agents who were at the age of *j*=30 or older at *t*=1 also continue to receive DB pension benefits.^{7} The obligatory contribution rate *τ* is kept the same as in the initial steady state and DB system.

### 3.4 The government

The government collects taxes (*τ*
^{k} on capital, *τ*
^{l} on labor, and *τ*
^{c} on consumption, as well as a lump-sum tax *Υ*) and spends a fixed share of GDP on unproductive yet necessary consumption *G*=*g*·*Y*. After calibrating *g* in the initial steady state, we keep it stationary throughout the simulations (i.e., constant per effective unit of labor). The government balances the pension system. Given that the government is indebted, it naturally also services the debt outstanding.

$$\begin{array}{*{20}l} T_{t} &= \sum_{j=1}^{J}\sum_{k=1}^{K}N_{j,k,t}\left[{\tau^{l}_{t}}((1-\tau)w_{t}\omega_{k} l_{j,k,t}+b_{j,k,t}) + {\tau^{c}_{t}} c_{j,k,t} + {\tau^{k}_{t}} r_{t} s_{j-1,k,t-1} + \Upsilon_{t} \right] \end{array} $$

((6))

$$\begin{array}{*{20}l} T_{t}&+(D_{t}-D_{t-1}) =G_{t} + \Xi_{t}+r_{t}D_{t-1} \end{array} $$

((7))

We set the initial steady state debt *D*
_{
t
} at 45 % of GDP, which was the actual value of debt to GDP ratio in Poland in 1999. We calibrate *Υ*
_{
t
} in the steady state to match the deficit and keep it stationary (i.e., constant per effective unit of labor) throughout the rest of the simulation.

The government debt and consumption tax adjust in response to the changes in fiscal pressure. First, as deficit in the pension system occurs, the public debt is increased. However, the public debt cannot be allowed to increase infinitely. Following the Maastricht Treaty criteria as well as the constitution of Poland, we set the threshold of growth at 60 % of GDP. Once this threshold is hit, consumption tax adjusts. Once all the adjustment in population and retirement age are fully accommodated by the economy, gradually, over 80 years, the public debt level is reduced back to 45 % of GDP, through the consumption tax. The final and the initial steady states have thus identical levels of public debt share in the GDP.

### 3.5 Market clearing

In the equilibrium, the goods market clearing condition is defined as

$$\sum_{j=1}^{J}\sum_{k=1}^{K}N_{j,k,t}c_{j,k,t}+G_{t}+K_{t+1}=Y_{t}+(1-d)K_{t}. $$

This equation is equivalent to stating that at each point in time the price for capital and labor would be set such that the demand for the goods from the consumers, the government, and the producers would be met. This necessitates clearing in the labor and capital markets. Thus, labor is supplied according to:

$$\begin{array}{@{}rcl@{}} L_{t} =\sum_{j=1}^{\bar{J}-1}\sum_{k=1}^{K}N_{j,k,t}\omega_{k} l_{j,k,t}, \end{array} $$

and asset market clearing condition is given by

$$\begin{array}{@{}rcl@{}} D_{t+1}+K_{t+1}=\sum_{j=1}^{J}\sum_{k=1}^{K}N_{j,k,t}s_{j,k,t} \end{array} $$

where *s*
_{
j,k,t
} denotes private savings. We describe the model solving in Appendix Appendix 2. Model solving.