View source: R/ramsey-policy.R
| ramsey_policy | R Documentation |
Solves for the welfare-maximising policy using the linear-quadratic approach. The planner chooses a feedback rule for the policy instrument(s) to minimise the expected discounted welfare loss function
L = E_0 \sum_{t=0}^{\infty} \beta^t (x_t' Q_{xx} x_t +
y_t' Q_{yy} y_t + 2 x_t' Q_{xy} y_t)
subject to the model's equilibrium conditions.
ramsey_policy(
model,
params = NULL,
shock_sd = NULL,
instruments,
welfare_weights,
beta = 0.99,
tol = 1e-10,
max_iter = 10000L
)
model |
A |
params |
Named numeric vector of model parameters. |
shock_sd |
Named numeric vector of shock standard deviations. |
instruments |
Character vector. Names of the policy instrument variables (subset of the model's control variables). |
welfare_weights |
A named list specifying the welfare loss weights. Elements:
At least one of |
beta |
Numeric. Discount factor (0 < beta < 1). Default 0.99. |
tol |
Numeric. Convergence tolerance for the Riccati iteration. Default 1e-10. |
max_iter |
Integer. Maximum Riccati iterations. Default 10000. |
The algorithm:
Solve the model to first order to obtain G (controls as a
function of states) and H (state transition).
Identify the columns of G and rows of the structural matrices
corresponding to the policy instruments u_t.
Formulate the constrained LQR problem:
x_{t+1} = A x_t + B u_t + \eta \varepsilon_t
\min \sum \beta^t (x_t' R_x x_t + u_t' R_u u_t + 2 x_t' N u_t)
Solve the DARE
P = R_x + \beta A' P A -
\beta^2 (A' P B + N)(R_u + \beta B' P B)^{-1}(B' P A + N')
via value-function iteration.
The optimal feedback rule is
F = -(R_u + \beta B' P B)^{-1}(\beta B' P A + N')
An object of class "dsge_ramsey" containing:
FOptimal feedback matrix (n_instruments x n_s): the
Ramsey policy rule u_t = F x_t.
H_ramState transition matrix under the optimal policy.
G_ramPolicy matrix under the optimal policy.
welfare_lossSteady-state welfare loss (unconditional mean).
PSolution to the discrete-time Riccati equation.
convergedLogical: did the Riccati iteration converge?
n_iterNumber of iterations taken.
instrumentsNames of policy instruments.
first_order_solThe first-order solution used as the basis.
Dennis, R. (2007). Optimal policy in rational-expectations models: New solution algorithms. Macroeconomic Dynamics, 11(1), 31-55.
Judd, K. L. (1992). Projection methods for solving aggregate growth models. Journal of Economic Theory, 58(2), 410-452.
welfare_loss, solve_dsge
# Simple NK model: planner minimises inflation and output gap variance
m <- dsge_model(
obs(y ~ z),
state(z ~ rho * z),
start = list(rho = 0.8)
)
set.seed(1)
sol <- solve_dsge(m, params = c(rho = 0.8), shock_sd = c(z = 0.1))
n_s <- ncol(sol$H); n_c <- nrow(sol$G)
ram <- ramsey_policy(
m,
params = c(rho = 0.8),
shock_sd = c(z = 0.1),
instruments = "y",
welfare_weights = list(
Q_yy = matrix(1, 1, 1, dimnames = list("y", "y"))
)
)
print(ram)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.