Unidad A3 · Riesgo e incertidumbreUnit A3 · Risk and uncertainty
¿Qué se pierde al convertir un AR(1) en una cadena de Markov?What is lost when an AR(1) becomes a Markov chain?
Los métodos globales, como VFI o EGM, necesitan choques con un número finito de estados. Tauchen (1986) y Rouwenhorst (1995) aproximan z′ = ρz + σε con N estados. Con poca persistencia da casi igual cuál uses. Con ρ cerca de 1, Tauchen exagera la volatilidad y la persistencia, y su cadena se queda atorada. Global methods such as VFI or EGM need shocks with a finite number of states. Tauchen (1986) and Rouwenhorst (1995) approximate z′ = ρz + σε with N states. With little persistence it hardly matters which one you use. With ρ close to 1, Tauchen overstates volatility and persistence, and its chain gets stuck.
Qué probarThings to try
- Empieza con la PTF de Fernald (ρ = 0.964, N = 7, m = 3), como en el mazo 3. Tauchen infla la desviación estándar 26% y sube la persistencia a ρ̂ = 0.980: la vida media de un choque pasa de 18.9 a 34.4 trimestres. Rouwenhorst reproduce los dos momentos exactamente. La calibración de ingreso de T06_A (ρ = 0.90, σ = 0.20, N = 5) tiene el mismo problema: +26.9% en σ.Start with Fernald TFP (ρ = 0.964, N = 7, m = 3), as in deck 3. Tauchen inflates the standard deviation by 26% and raises persistence to ρ̂ = 0.980: the half-life of a shock goes from 18.9 to 34.4 quarters. Rouwenhorst reproduces both moments exactly. The T06_A income calibration (ρ = 0.90, σ = 0.20, N = 5) has the same problem: +26.9% in σ.
- Pulsa «ρ = 0.99». El error de Tauchen en σ sube a 31.9% y ρ̂ = 0.9999. En la simulación, con los mismos choques, la cadena de Tauchen no cambia de estado en 200 periodos y la de Rouwenhorst cambia 6 veces. El paso de la malla es de 7.1σ: para salir del estado central hace falta un choque de más de 3.5 desviaciones estándar.Press "ρ = 0.99". Tauchen's error in σ rises to 31.9% and ρ̂ = 0.9999. In the simulation, with the same shocks, the Tauchen chain does not change state in 200 periods and the Rouwenhorst chain changes 6 times. The grid step is 7.1σ: leaving the middle state takes a shock larger than 3.5 standard deviations.
- Vuelve a ρ = 0.964 y sube N de 7 a 21: el error de Tauchen en σ baja a 3.9%. Con N = 3, su cadena queda congelada (ρ̂ = 1.0000). Rouwenhorst acierta con cualquier N; lo que gana con más estados es la forma de la distribución. Su curtosis es 3 − 2/(N − 1): 2.67 con N = 7 y 2.90 con N = 21, frente a 3 en la normal.Go back to ρ = 0.964 and raise N from 7 to 21: Tauchen's error in σ falls to 3.9%. With N = 3, its chain freezes (ρ̂ = 1.0000). Rouwenhorst is right for any N; what it gains from more states is the shape of the distribution. Its kurtosis is 3 − 2/(N − 1): 2.67 with N = 7 and 2.90 with N = 21, against 3 for the normal.
- Cambia σ de 0.0088 a 0.20: la malla se estira, pero ningún error se mueve, porque los dos métodos escalan con σ/√(1 − ρ²). Lo que sí importa es m. Con ρ = 0.964 y N = 7, bajar m de 3 a 2 reduce el error de Tauchen en σ de +26% a +4.6%; con m = 1 la malla es tan estrecha que lo subestima 37%.Change σ from 0.0088 to 0.20: the grid stretches, but no error moves, because both methods scale with σ/√(1 − ρ²). What does matter is m. With ρ = 0.964 and N = 7, lowering m from 3 to 2 cuts Tauchen's error in σ from +26% to +4.6%; with m = 1 the grid is so narrow that it understates σ by 37%.
La matemáticaThe math
Tauchen (1986)
Malla equiespaciada en \(\pm m\,\sigma_z\), con \(\sigma_z=\sigma/\sqrt{1-\rho^2}\) y paso \(\Delta\). La probabilidad de pasar de \(z_i\) a \(z_j\) es la masa de la celda de \(z_j\) bajo \(\mathcal N(\rho z_i,\sigma^2)\):Evenly spaced grid on \(\pm m\,\sigma_z\), with \(\sigma_z=\sigma/\sqrt{1-\rho^2}\) and step \(\Delta\). The probability of moving from \(z_i\) to \(z_j\) is the mass of \(z_j\)'s cell under \(\mathcal N(\rho z_i,\sigma^2)\):
$$\begin{aligned}\Pi_{ij}={}&\Phi\!\left(\frac{z_j+\Delta/2-\rho z_i}{\sigma}\right)\\&-\Phi\!\left(\frac{z_j-\Delta/2-\rho z_i}{\sigma}\right),\end{aligned}$$con las colas completas en los extremos. Si \(\Delta\) es grande frente a \(\sigma\), casi toda la masa cae en la celda de origen y la cadena se atora. Con \(m\) y \(N\) fijos, \(\Delta/\sigma=2m/\big((N-1)\sqrt{1-\rho^2}\big)\) explota cuando \(\rho\to 1\).with the full tails at the end points. If \(\Delta\) is large relative to \(\sigma\), almost all the mass falls in the starting cell and the chain gets stuck. With \(m\) and \(N\) fixed, \(\Delta/\sigma=2m/\big((N-1)\sqrt{1-\rho^2}\big)\) explodes as \(\rho\to 1\).
Rouwenhorst (1995)
Con \(p=q=(1+\rho)/2\), se parte de \(\Pi_2=\begin{pmatrix}p&1-p\\1-p&p\end{pmatrix}\) y se construyeWith \(p=q=(1+\rho)/2\), start from \(\Pi_2=\begin{pmatrix}p&1-p\\1-p&p\end{pmatrix}\) and build
$$\begin{aligned}\Pi_N={}&p\begin{bmatrix}\Pi_{N-1}&0\\0^{\top}&0\end{bmatrix}+(1-p)\begin{bmatrix}0&\Pi_{N-1}\\0&0^{\top}\end{bmatrix}\\&+(1-q)\begin{bmatrix}0^{\top}&0\\\Pi_{N-1}&0\end{bmatrix}+q\begin{bmatrix}0&0^{\top}\\0&\Pi_{N-1}\end{bmatrix},\end{aligned}$$dividiendo entre 2 las filas interiores. La malla va de \(-\psi\) a \(\psi\), con \(\psi=\sqrt{N-1}\,\sigma_z\). Kopecky y Suen (2010) muestran que la cadena reproduce exactamente \(\rho\) y \(\sigma_z^2\) para cualquier \(N\); su distribución estacionaria es binomial.dividing the interior rows by 2. The grid runs from \(-\psi\) to \(\psi\), with \(\psi=\sqrt{N-1}\,\sigma_z\). Kopecky and Suen (2010) show that the chain reproduces \(\rho\) and \(\sigma_z^2\) exactly for any \(N\); its stationary distribution is binomial.
Momentos implícitos de la cadenaImplied moments of the chain
La distribución estacionaria resuelve \(\pi^{\top}\Pi=\pi^{\top}\). Con ella,The stationary distribution solves \(\pi^{\top}\Pi=\pi^{\top}\). With it,
$$\hat\sigma^2=\sum_i\pi_i(z_i-\bar z)^2,$$ $$\hat\rho=\frac{1}{\hat\sigma^2}\sum_i\pi_i(z_i-\bar z)\Big(\sum_j\Pi_{ij}z_j-\bar z\Big).$$\(\pi\) se calcula por reducción de estados (Grassmann, Taksar y Heyman, 1985), que no resta y sigue siendo exacta cuando la cadena de Tauchen casi no se mueve. Las colas de \(\Phi\) se evalúan con precisión relativa de máquina.\(\pi\) is computed by state reduction (Grassmann, Taksar and Heyman, 1985), which never subtracts and stays accurate when the Tauchen chain barely moves. The tails of \(\Phi\) are evaluated to machine relative precision.
Llévalo más lejosTake it further
- Cuaderno T06_A en Colab: el ingreso discretizado con Tauchen dentro de Aiyagari y EGM →Notebook T06_A in Colab: Tauchen-discretized income inside Aiyagari and EGM →
- Cuaderno T09_A en Colab: crecimiento estocástico con Rouwenhorst, VFI frente a la forma cerrada →Notebook T09_A in Colab: stochastic growth with Rouwenhorst, VFI against the closed form →
- Diapositivas 3: riesgo e incertidumbre →Slides 3: risk and uncertainty (Spanish) →
- En Python: In Python:
puremacro.vfi.tauchen,puremacro.vfi.rouwenhorst,puremacro.vfi.markov_stationary→