Abstract
In this paper the general discrete time mean‐variance hedging problem is solved by dynamic programming. Thanks to its simple recursive structure the solution is well suited to computer implementation. On the theoretical side, it is shown how the variance‐optimal measure arises in the dynamic programming solution and how one can define conditional expectations under this (generally non‐equivalent) measure. The result is then related to the results of previous studies in continuous time.