# Lifecycle model
### 1 Objective Function
The agent's value function is
$$
V_t = u_t + \delta E_t[V_{t+1}]
$$
and the instantaneous utility function takes a CRRA form:
$$
u_t = \frac{F_t^{1-\gamma_1}}{1-\gamma_1}+\psi_t\cdot \frac{\kappa W_t^{1-\gamma_2}}{1-\gamma_2}
$$
where $\delta$ is discounting factor, $\kappa$ is bequest motive parameter, $\gamma_1$ and $\gamma_2$ are risk aversion parameters. $\psi_t$ denotes the mortality rate at age $t$ for the subpopulation to which the agent belongs, $W_t$ is the agent's net wealth, $M_t$ is a state variable jointly determined by the agent's consumption, house size, and distance to a savings goal.
There are three types of financial assets: short-term bond, long-term bond, and equity. She invests in these assets via three savings accounts: (1) Private pension account, i.e. a tax-deferred DC pension account. She can save money into the account at any period, but is not allowed to withdraw money until retirement. (2) Liquid savings account, that she can save money into and withdraw money from at any period. (3) Goal-based savings account, similar to liquid savings account but assigned with a savings goal. Once the goal is met, she will take the money out and consume it all in a lump sum, and will not invest any more into this account. In our setting, the payments made with the money withdrawn from goal-based savings account will not count in consumption or housing expenditure. We use $A^P$, $A^L$, $A^G$ to represent the balance of each account.
We represent $F_t$ by
$$
F_t = [\alpha_1 C_t^{\rho} + \alpha_2H_t^{\rho} + \alpha_3G_t^\rho]^{1/\rho}
$$
where $\alpha_1$, $\alpha_2$, $\alpha_3$, $\rho$ are all parameters. $C_t$ denotes consumption, $H_t$ denotes house size, $G_t$ capture the utility that she gains by getting close to the savings goal $\bar{G}$.
$$
G_t = \min\{\bar{G},A^G_t\}
$$
Throughout the working life, the agent experiences the following five steps each year: (i) earning labor income and asset returns; (ii) making mandatory contributions to pension fund and housing fund; (iii) making retirement savings decisions and paying housing expenditure; (iv) paying income tax; (v) making investment decisions and paying consumption expenditure. After retirement, her labor income is replaced (at least partially) by pension benefit, and step (ii)(iv) is eliminated.
### 2 Income
#### 2.1 Labor Income
Let $\tilde{Y}_t$ denote the agent's before-tax labor income. Let random variables $z^u_t$, $z^p_t$, $z^q_t$ be the employment status, permanent income shock, and transitory income shock (a transitory shock only affects the agent's current income, while a permanent shock can affect her income in succeeding periods) . The deterministic part of labor income is represented by function $f_y(t,X_t)$, where $X_t$ is the agent's demographic features. Transitory shock $z^q_t$ follows an i.i.d. normal distribution. Permanent shock $z^p_t$ follows a AR(1) process with innovations drawn from a mixture of two normal distributions. Employment status $z^u_t$ can only be 0 (employed) or 1 (unemployed), and $P\{z^u_t=1\}$ denotes the probability of being unemployed. Therefore, the agent's labor income is determined by
$$
\begin{split}
& \tilde{Y}_t = (1-z^u_t)\cdot e^{f_y(t,X_t) + z^p_t + z^q_t} \\
& z^q_t \sim N(0,\sigma_q^2) \\
& z^p_t = \beta^pz^p_{t-1} + \eta_t \\
& \eta_t \sim \left\{
\begin{split}
& N(\mu_{\eta_1},\sigma_{\eta_1}) \; \text{with prob.} \,p_\eta \\
& N(\mu_{\eta_2},\sigma_{\eta_2}) \; \text{with prob.} \,1-p_\eta\\
\end{split}
\right. \\
& P\{z^u_t=1\} = \frac{1}{1+e^{-f_u(t,z^p_t)}}
\end{split}
$$
We assume $\mu_{\eta_1}p_\eta + \mu_{\eta_2}(1-p_\eta)=0$, and $\mu_{\eta,1}<0$. For simplicity, we set
$$
f_u(t,z^p_t) = \beta^u_0+\beta^u_1\cdot t+\beta^u_2\cdot z^p_t+\beta^u_3\cdot t\cdot z^p_t
$$
#### 2.2 Social Security
China's social security system consists of five mandatory insurances and a housing fund. During the working life, the agent spends a portion, say $\xi_c$, of her permanent income (which we call "social security contribution base"), contributing to these social security schemes each year. Her employer will make match contributions. The contribution base cannot be more than 3 times the province-wide average wage or less than 0.6 times the province-wide average wage. The contributions are deductible under income tax.
We let $Y^*_t$ be the province-wide average wage; then, the agent's contribution base at age $t$ is
$$
Y^B_t=\max\{\min\{\tilde{Y}_t e^{-z^q_t},3Y^*_t\},0.6Y^*_t\}
$$
For simplicity, we assume $Y^*_t$ is a AR(1) process.
#### 2.3 Pension Benefit
One of the China's five social insurance schemes is pension insurance. After retirement, the agent receives pension benefit (which is called "basic pension") each year. The amount of benefit is dependent on her previous contributions to pension insurance, and the province-wide average wage.
To calculate pension benefit, we set the ratio of the agent's pension contribution to her contribution base is $\xi_m$ ($\xi_m<\xi_c$), the ratio of her employer's match contribution in pension to the contribution base is $\xi_n$, the interest rate for the fund in basic pension account is $i_b$, the life expectancy in China is $t_{exp}$. The agent starts working at age $t_0$, retires at $t_{ret}$. The agent's basic pension consists of two parts. The first part, which we name $B^1_t$, is
$$
B^1_t = Y^*_t\left[\sum_{\tau=t_0}^{t_{ret}-1}\left(\frac{Y^B_\tau}{Y^*_\tau}\right) + (t_{ret}-t_0)\right]\times0.5\times1\%
$$
The second part of pension benefit, which we name $B^2_t$, is determined by the balance of the agent's basic pension account, $A^B_t$, at the time of retirement, where $A^b_{t_0}=0$.
$$
\begin{split}
& A^B_{t_{ret}}=\sum_{\tau=t_0}^{t_{ret}-1}
\left( A^B_\tau\cdot (1+i_b)+Y^B_\tau \cdot (\xi_m+\xi_n)\right) \\
& B^2_t =A^B_{t_{ret}} /
\left(\frac{1-(1+i_b)^{-(t_{exp}-t_{ret})}}{1-(1+i_b)^{-1}}\right)\\
\end{split}
$$
### 3 Financial Assets
#### 3.1 Asset Markets
Let $\tilde{R}_{j,t}$ be the return of asset type $j$, where $j \in J\equiv\{f,l,e\}$ (the letters in bracket represent short-term bond, long-term bond, equity, and housing in order). The asset returns are generated by a VAR(1) model:
$$
\textbf{r}_t = \beta_{r,0}+\beta_{r,1} \textbf{r}_{t-1}+\epsilon_t
$$
where $\textbf{r}_t =[\ln(\tilde{R}_{f,t}),\ln(\tilde{R}_{l,t}),\ln(\tilde{R}_{e,t}),r^{h}_t,i^{CL}_t,i^{HFL}_t,\pi_t]^T$ with $r^h_t$ being the house price growth rate, $i^{CL}_t$ being the commercial mortgage rate, $i^{HFL}_t$ be the housing fund mortgage rate, $\pi_t$ being the inflation rate.
#### 3.2 Private Pension
In 2022, the Chinese government started offering a tax-deferred DC pension to its citizens, which is called "private pension". The private pension differs from basic pension in three ways: First, basic pension is mandatory, while private pension is voluntary and takes a opt-in system. Second, basic pension account is managed by National Social Security Fund, whereas private pension account is managed by the agent -- she can decide both how much to invest and how to allocate money in this account. Third, basic pension is tax-free, while any withdrawal from the private pension account should be taxed at 3%.
The balance of private pension account is determined by
$$
A^P_{t+1} = \sum_{j\in J} (\tilde{R}_{j,t}A^P_{j,t}+S^P_{j,t+1})
$$
where $A^P_{j,t}$ and $S^P_{j,t}$ are the balance of and cash inflow to asset type $j$ in private pension account. $S^P_{t+1}\equiv \sum_{j\in J} S^P_{j,t+1} \leq S_\max$ and $S_\max$ is the maximum amount of fund that can be saved into private pension account each year. For all $j \in J$, $A^P_{j,t} \geq 0$. The range for $S^P_t$ is $[0,\infty)$ when $t<t_{ret}$ and is $(-\infty,0]$ when $t\geq t_{ret}$. When $S^P_t$ is negative, it implies the agent withdraws money from the account that year.
#### 3.3 Liquid and Goal-based Savings
The balance of liquid savings account is determined by
$$
\begin{split}
& A^L_{t+1} = \sum_{j\in J} (\tilde{R}_{j,t+1}A^L_{j,t}+S^L_{j,t+1}) \\
\end{split}
$$
where $A^L_{t+1} \geq -\bar{A}$, $\bar{A}$ denote credit limit.
The balance of goal-based savings account is determined by
$$
A^G_{t+1} = \left\{
\begin{split}
& \sum_{j\in J} (\tilde{R}_{j,t+1}A^G_{j,t}+S^G_{j,t+1}) &\; \text{if} \; G_t<\bar{G} \\
& A^G_t &\; \text{if} \; G_t=\bar{G}
\end{split}
\right.\\
$$
where for all $j \in J$, $A^P_{j,t_0} = A^L_{j,t_0} = A^G_{j,t_0} = 0$, $S^G_{t+1} \equiv \sum_{j \in J} S^G_{j,t+1}\geq0$.
### 4 Housing
#### 4.1 Homeownership
Let $\phi_{rp}$ be rent-to-price ratio, $v_t$ be house price and $v_{t+1}=(1+r^h_t)v_t$. At each period, the agent can choose to be either a pure renter or a homeowner. We use $o_t$ to represent this choice: if the agent is a homeowner at age $t$, $o_t = 1$; otherwise, $o_t = 0$. If the agent buys a house with mortgage, the loan-to-value ratio she faces is $\phi_{lv}$ and the mortgage term is $m$. When the agent buys a house, she has to pay $\zeta_b$ of the house value for transaction cost; when she sells a house, she has to pay $\zeta_s$ for transaction cost. We let $K_t$ denote the housing expenditure at age $t$. Due to the housing purchase limit, it is reasonable to assume the agent can only own one home at one time.
When the agent keeps to be a pure renter at $t+1$,
$$
K_{t+1}\{o_t = 0,o_{t+1} = 1\} =
\phi_{rp} v_{t+1}H_{t+1}
$$
When the agent buys a house at $t+1$, i.e. becoming a homeowner,
$$
\begin{split}
& K_{t+1}\{o_t = 0,o_{t+1} = 1\} \leq (1+\zeta_b)v_{t+1}H_{t+1} \\
& K_{t+1}\{o_t = 0,o_{t+1} = 1\} \geq (1-\phi_{lv}+\zeta_b)v_{t+1}H_{t+1} \\
\end{split}
$$
We assume the agent keeps living in her own home until selling it. Let $D_t$ be the agent's mortgage debt ($D_t\geq0$). If she borrows at $t+1$, she has to repay the debt in each subsequent period.
$$
D_{t+1} = \left\{
\begin{split}
& v_{t+1}H_{t+1}-K_{t+1} & \; \text{if} \; o_t = 0,o_{t+1} = 1 \\
& D_t - K_{t+1} & \; \text{if} \;o_t=1,o_{t+1}=1, D_t>0 \\
& 0 & \; \text{else}
\end{split}\right.
$$
Before the agent pays off the mortgage, i.e. when $D_t>0$, she cannot change or sell the house, or borrow a new mortgage; thus, the range for $o_{t+1}$ is $\{1\}$ and the range for $H_{t+1}$ is $\{H_t\}$ (otherwise they will be $\{0,1\}$ and $[0,\infty)$).
The agent's mortgage debt consists of both commercial loan and housing fund loan. Housing fund is one of the elements in China's social security system. Households who have contributed to housing fund can borrow mortgage at a cheaper interest rate than the commercial rate. The limit of housing fund loan is dependent on the balance of the household's housing fund account. Let $D^H_t$ ($0\leq D^H_t\leq D_t$) denote the agent's outstanding housing fund loan. In each instalment, the agent has to pay more than the minimum repayment value. Therefore,
$$
\begin{split}
& K_{t+1}\{o_t=1,o_{t+1}=1,D_t>0\} \geq \Phi^{HFL}_{t+1} D^H_t + \Phi^{CL}_{t+1}(D_t - D^H_t) \\
& K_{t+1}\{o_t=1,o_{t+1}=1,D_t>0\} \leq D_t \\
& K_{t+1}\{o_t=1,o_{t+1}=1,D_t=0\} = 0
\end{split}
$$
where
$$
\Phi^k_t = (1+i^k_t)\frac{(1+i^k_t)^{m^k_t}-1}{m^k_ti^k_t},\;k\in\{CL,HFL\}
$$
and
$$
m^{CL}_{t+1} = \left\{
\begin{split}
& m & \; \text{if} \; o_t = 0,o_{t+1} = 1 \\
& m^{CL}_t - 1 & \; \text{if} \;o_t=1, o_{t+1}=1, D_t-D^H_t>0 \\
& 0 & \; \text{else}
\end{split}\right.
$$
$$
m^{HFL}_{t+1} = \left\{
\begin{split}
& \min\{m,t_{ret}-t\}\; & \; \text{if} \; o_t = 0,o_{t+1} = 1 \\
& m^{HFL}_t - 1 & \; \text{if} \;o_t=1, o_{t+1}=1, D^H_t>0 \\
& 0 & \; \text{else}
\end{split}\right.
$$
We let $m^{CL}_t$, $m^{HFL}_t$ denote the remaining mortgage term for commercial loan and housing fund loan. The housing fund loan should be paid off before the agent retires.
When the agent sells a house at $t+1$,
$$
K_{t+1}\{o_t=1,o_{t+1}=0\} = \phi_{rp}v_{t+1}H_{t+1}-(1-\zeta_s)v_{t+1}H_t
$$
#### 4.2 Housing Fund
During the working life, the agent contributes $\xi_h$ ($\xi_h<\xi_c$) of her permanent income $Y^B_t$ to the housing fund account each year. At the mean time, her employer contributes the same amount to the account. The balance of housing fund account can only be used in paying housing expenditure (including the cost of renting, buying or decorating a house). At the time of retirement, the agent will redeem the housing fund, as part of her income in that year, then the account will expire. Let $A^H_t$ denote the balance of housing fund account, $K^H_t$ denote the money withdrawn from the account, $K^R_{t}$ denote the repayment for housing fund loan, then
$$
A^H_{t+1}= \left\{
\begin{split}
& (1+i_h)A^H_t+2\xi_h Y^B_{t+1} - K^H_{t+1} \;& \text{if} \; t+1<t_{ret}\\
& 0 \;& \text{if} \; t+1 \geq t_{ret}\\
\end{split}
\right.
$$
where $0\leq K^H_{t+1}\leq K_{t+1}$, $A^H_{t+1}\geq 0$, $i_h$ denote the interest rate of housing fund.
The agent's debt on housing fund loan is
$$
D^H_{t+1} = \left\{
\begin{split}
& \min\{\phi_h A^H_t,\bar{D}_{HFL},D_{t+1}\} \;& \text{if} \;o_t=0,o_{t+1}=1\\
& D^H_t - K^R_{t+1} \;& \text{if} \;o_t=1,o_{t+1}=1,D^H_t>0\\
& 0 \;& \text{else}
\end{split}
\right.
$$
where $0 \leq K^R_{t+1} \leq K_{t+1}$, $\phi_h$ denote the ratio of housing fund loan that the agent can borrow to her past year's housing fund balance, $\bar{D}_{HFL}$ denote the maximum limit of housing fund loan.
#### 5 Consumption Budget
Let $f_{tax}$ be the income tax, which is a function to the agent's taxable income.
The agent's after-tax income
$$
Y_t = \left\{
\begin{split}
& \tilde{Y}_t -f_{tax}(\tilde{Y}_t - \xi_cY^B_t - S^P_t - \min\{K_t,S_\max\}) \;& \text{if} \; t<t_{ret}\\
& B^1_t +B^2_t + A^H_{t-1} \;& \text{if} \;t=t_{ret}\\
& B^1_t +B^2_t \;& \text{if} \;t>t_{ret}\\
\end{split}
\right.
$$
Net wealth:
$$
W_t = A^B_t+A^P_t+A^L_t+A^G_t+A^H_t+o_tv_{t}H_t-D_t
$$
Before retirement:
$$
A^L_{t+1} = \sum_{j\in J}(\tilde{R}_{j,t+1}A^L_{j,t}- S^G_{j,t+1}) + Y_{t+1} - C_{t+1} - (K_{t+1} - K^H_{t+1})
$$
After retirement:
$$
A^L_{t+1} = \sum_{j\in J}(\tilde{R}_{j,t+1}A^L_{j,t}- S^G_{j,t+1}) + Y_{t+1} + (1-\xi_p) \cdot (-S^P_{t+1}) - C_{t+1} - K_{t+1}
$$
where $\xi_p$ is the tax rate for withdrawals from private pension account.
#### 6 Calibration
| parameter | description | value | source |
| ----------- | -------------------------------------------------- | ----- | ------ |
| $\delta$ | discounting factor | 0.96 | |
| $\kappa$ | bequest motive | 0.1 | |
| $\gamma_1$ | risk aversion coefficient for $F_t$ | 5 | |
| $\gamma_2$ | risk aversion coefficient for $W_t$ | 10 | |
| $\xi_c$ | | 15% | |
| $\xi_m$ | | 8% | |
| $\xi_n$ | | 16% | |
| $\xi_h$ | | 5% | |
| $\phi_{rp}$ | rent-to-price ratio | 1/600 | |
| $\phi_{lv}$ | loan-to-value ratio | 0.7 | |
| $\phi_h$ | ratio of housing fund loan to housing fund balance | 15 | |
| $m$ | mortgage term | 30 | |