import numpy as np
1. Human capital accumulation
Consider a worker living in two periods, .
In each period she decides whether to work () or not ().
She can not borrow or save and thus consumes all of her income in each period.
If she works her consumption becomes:
where is the wage rate and is her human capital.
If she does not work her consumption becomes:
where is the unemployment benefits.
Her utility of consumption is:
Her disutility of working is:
From period 1 to period 2, she accumulates human capital according to:
where is a stochastic experience gain.
In the second period the worker thus solves:
In the first period the worker thus solves:
where is the discount factor and is the expected value of living in period two.
The parameters of the model are:
rho = 2
beta = 0.96
gamma = 0.1
w = 2
b = 1
Delta = 0.1
The relevant levels of human capital are:
h_vec = np.linspace(0.1,1.5,100)
Question 1: Solve the model in period 2 and illustrate the solution (including labor supply as a function of human capital).
Question 2: Solve the model in period 1 and illustrate the solution (including labor supply as a function of human capital).
Question 3: Will the worker never work if her potential wage income is lower than the unemployment benefits she can get? Explain and illustrate why or why not.
2. AS-AD model
Consider the following AS-AD model. The goods market equilibrium is given by
where is the output gap, is the ex ante real interest and is a demand disturbance.
The central bank's Taylor rule is
where is the nominal interest rate, is the inflation gap, and is the expected inflation gap.
The ex ante real interest rate is given by
Together, the above implies that the AD-curve is
Further, assume that the short-run supply curve (SRAS) is given by
where is a supply disturbance.
Inflation expectations are adaptive and given by
Together, this implies that the SRAS-curve can also be written as
The parameters of the model are:
par = {}
par['alpha'] = 5.76
par['h'] = 0.5
par['b'] = 0.5
par['phi'] = 0
par['gamma'] = 0.075
Question 1: Use the sympy
module to solve for the equilibrium values of output, , and inflation, , (where AD = SRAS) given the parameters (, , , , ) and , , , , and .
Question 2: Find and illustrate the equilibrium when . Illustrate how the equilibrium changes when instead .
Persistent disturbances: Now, additionaly, assume that both the demand and the supply disturbances are AR(1) processes
where is a demand shock, and is a supply shock. The autoregressive parameters are:
par['delta'] = 0.80
par['omega'] = 0.15
Question 3: Starting from , how does the economy evolve for , and ?
Stochastic shocks: Now, additionally, assume that and are stochastic and normally distributed
The standard deviations of the shocks are:
par['sigma_x'] = 3.492
par['sigma_c'] = 0.2
Question 4: Simulate the AS-AD model for 1,000 periods. Calculate the following five statistics:
- Variance of ,
- Variance of ,
- Correlation between and ,
- Auto-correlation between and ,
- Auto-correlation between and ,
Question 5: Plot how the correlation between and changes with . Use a numerical optimizer or root finder to choose such that the simulated correlation between and comes close to 0.31.
Quesiton 6: Use a numerical optimizer to choose , and to make the simulated statistics as close as possible to US business cycle data where:
3. Exchange economy
Consider an exchange economy with
- 3 goods,
- consumers indexed by
Preferences are Cobb-Douglas with log-normally distributed coefficients
Endowments are exponentially distributed,
Let be the numeraire. The implied demand functions are:
where consumer 's income is
The parameters and random preferences and endowments are given by:
# a. parameters
N = 50000
mu = np.array([3,2,1])
Sigma = np.array([[0.25, 0, 0], [0, 0.25, 0], [0, 0, 0.25]])
gamma = 0.8
zeta = 1
# b. random draws
seed = 1986
np.random.seed(seed)
# preferences
alphas = np.exp(np.random.multivariate_normal(mu, Sigma, size=N))
betas = alphas/np.reshape(np.sum(alphas,axis=1),(N,1))
# endowments
e1 = np.random.exponential(zeta,size=N)
e2 = np.random.exponential(zeta,size=N)
e3 = np.random.exponential(zeta,size=N)
Question 1: Plot the histograms of the budget shares for each good across agents.
Consider the excess demand functions:
Question 2: Plot the excess demand functions.
Question 3: Find the Walras-equilibrium prices, , where both excess demands are (approximately) zero, e.g. by using the following tâtonnement process:
- Guess on , and choose tolerance and adjustment aggressivity parameter, .
- Calculate and .
- If and then stop.
- Else set and and return to step 2.
Question 4: Plot the distribution of utility in the Walras-equilibrium and calculate its mean and variance.
Question 5: Find the Walras-equilibrium prices if instead all endowments were distributed equally. Discuss the implied changes in the distribution of utility. Does the value of play a role for your conclusions?