We study multistage tracking error problems. Different tracking error measures, commonly used in static models, are discussed as well as some problems which arise when we move from static to dynamic models. We are interested in dynamically replicating a benchmark using only a small subset of assets, considering transaction costs due to rebalancing and introducing a liquidity component in the portfolio. We formulate and solve a multistage tracking error model in a stochastic programming framework. We numerically test our model by dynamically replicating the MSCI Euro index. We consider an increasing number of scenarios and assets and show the superior performance of the dynamically optimized tracking portfolio over static strategies.