Learn R Programming

GE (version 0.2.5)

gemCanonicalDynamicMacroeconomic_3_2: A Canonical Dynamic Macroeconomic General Equilibrium Model (see Torres, 2016)

Description

A canonical dynamic macroeconomic general equilibrium model (see Torres, 2016, Table 2.1 and 2.2).

Usage

gemCanonicalDynamicMacroeconomic_3_2(
  discount.factor = 0.97,
  depreciation.rate = 0.06,
  beta1.firm = 0.35,
  beta1.consumer = 0.4,
  policy.supply = NULL,
  policy.technology = NULL,
  policy.price = NULL,
  ...
)

Arguments

discount.factor

the intertemporal discount factor.

depreciation.rate

the physical depreciation rate of capital stock.

beta1.firm

the first beta parameter of the Cobb-Douglas production function.

beta1.consumer

the first beta parameter of the Cobb-Douglas utility function. This parameter represents the individual's preferences regarding consumption - leisure decisions.

policy.supply

a policy function or a policy function list which adjusts the supplies.

policy.technology

a policy function or a policy function list which adjusts the technology.

policy.price

a policy function or a policy function list which adjusts the prices.

...

arguments to be to be passed to the function sdm2.

Value

A general equilibrium (see sdm2)

Details

A general equilibrium model with 3 commodities (i.e. product, labor, and stock) and 2 agents (i.e. a firm and a consumer). Labor is the numeraire.

References

Torres, Jose L. (2016, ISBN: 9781622730452) Introduction to Dynamic Macroeconomic General Equilibrium Models (Second Edition). Vernon Press.

Li Xiangyang (2018, ISBN: 9787302497745) Dynamic Stochastic General Equilibrium (DSGE) Model: Theory, Methodology, and Dynare Practice. Tsinghua University Press. (In Chinese)

See Also

The market clearing path (alias temporary equilibrium path, instantaneous equilibrium path) can be computed with the function policyMarketClearingPrice.

Examples

Run this code
# NOT RUN {
gemCanonicalDynamicMacroeconomic_3_2()

#### a market-clearing path (alias temporary equilibrium path)
ge <- gemCanonicalDynamicMacroeconomic_3_2(
  policy.price = policyMarketClearingPrice,
  ts = TRUE,
  maxIteration = 1,
  numberOfPeriods = 100,
  z0 = c(0.5, 1)
)

par(mfrow = c(1, 2))
matplot(ge$ts.z, type = "b", pch = 20)
matplot(ge$ts.p, type = "b", pch = 20)

#### technology change in a market-clearing path
policyTechnologyChange <- function(time, dstl) {
  alpha <- 1.2 # The original value is 1.
  time.win <- c(50, 50)
  discount.factor <- 0.97
  depreciation.rate <- 0.06
  beta1.firm <- 0.35
  return.rate <- 1 / discount.factor - 1

  if (time >= time.win[1] && time <= time.win[2]) {
    dstl[[1]]$func <- function(p) {
      result <- CD_A(
        alpha, rbind(beta1.firm, 1 - beta1.firm, 0),
        c(p[1] * (return.rate + depreciation.rate), p[2:3])
      )
      result[3] <- p[1] * result[1] * return.rate / p[3]
      result
    }
  }
}

ge <- gemCanonicalDynamicMacroeconomic_3_2(
  policy.technology = policyTechnologyChange,
  policy.price = policyMarketClearingPrice,
  ts = TRUE,
  maxIteration = 1,
  numberOfPeriods = 100,
  z0 = c(0.5, 1)
)

par(mfrow = c(1, 2))
matplot(ge$ts.z, type = "b", pch = 20)
matplot(ge$ts.p, type = "b", pch = 20)

#### an example on page 46 of Li Xiangyang (2018)
ge <- gemCanonicalDynamicMacroeconomic_3_2(
  discount.factor = 0.99,
  depreciation.rate = 0.025,
  beta1.firm = 0.36,
  beta1.consumer = 1
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab