This paper develops theoretical foundations for the computation of competitive equilibria in dynamic stochastic general equilibrium models with heterogeneous agents and incomplete financial markets. While there are several algorithms which compute prices and allocations for which agents' first order conditions are approximately satisfied (`approximate equilibria'), there are few results on how to interpret the errors in these candidate solutions and how to relate the computed allocations and prices to exact equilibrium allocations and prices. Following Postlewaite and Schmeidler (1981) we interpret approximate equilibria as equilibria for close-by economies, i.e.\ for economies with close-by individual endowments and preferences. In order to conduct an error analysis in dynamic stochastic general equilibrium models, we define an $\epsilon $-equilibrium to be a set of endogenous variables which consists of the finite support of an approximate equilibrium process. Given an $\epsilon $-equilibrium we show how to derive bounds on perturbations in individual endowments and preferences which ensure that the $\epsilon $-equilibrium approximates an exact equilibrium for the perturbed economy.