# approximation¶

Filename: approximation.py

Authors: Thomas Sargent, John Stachurski

## tauchen¶

Discretizes Gaussian linear AR(1) processes via Tauchen’s method

quantecon.markov.approximation.rouwenhorst(n, ybar, sigma, rho)[source]
Takes as inputs n, p, q, psi. It will then construct a markov chain that estimates an AR(1) process of: y_t = ar{y} +

ho y_{t-1} + arepsilon_t

where

arepsilon_t is i.i.d. normal of mean 0, std dev of sigma

The Rouwenhorst approximation uses the following recursive defintion for approximating a distribution:

theta_2 = [p , 1 - p]
[1 - q, q ]
theta_{n+1} = p [theta_n, 0] + (1 - p) [0, theta_n]
[0 , 0] [0, 0]
• q [0 , 0] + (1 - q) [0, ]
[theta_n , 0] [0, theta_n]
Parameters: n : int The number of points to approximate the distribution ybar : floatThe value ar{y} in the process. Note that the mean of this AR(1) process, y, is simply ybar/(1 - rho) sigma : floatThe value of the standard deviation of the arepsilon process rho : floatBy default this will be 0, but if you are approximating an AR(1) process then this is the autocorrelation across periods mc : MarkovChain An instance of the MarkovChain class that stores the transition matrix and state values returned by the discretization method
quantecon.markov.approximation.std_norm_cdf[source]
quantecon.markov.approximation.tauchen(rho, sigma_u, m=3, n=7)[source]

Computes a Markov chain associated with a discretized version of the linear Gaussian AR(1) process

y_{t+1} = rho * y_t + u_{t+1}

using Tauchen’s method. Here {u_t} is an iid Gaussian process with zero mean.

Parameters: rho : scalar(float) The autocorrelation coefficient sigma_u : scalar(float) The standard deviation of the random process m : scalar(int), optional(default=3) The number of standard deviations to approximate out to n : scalar(int), optional(default=7) The number of states to use in the approximation mc : MarkovChain An instance of the MarkovChain class that stores the transition matrix and state values returned by the discretization method