In this article, we consider a multi-period portfolio optimization problem, which is an extension of the single-period mean-variance model. We discuss several formulations of the objective function, constraints and coupling relationships. We then derive three numerical algorithms that can be used to solve such problems: the alternating direction method of multipliers, the block coordinate descent algorithm and the augmented quadratic programming method. We illustrate the differences between single-period and multi-period solutions by considering three asset allocation problems: transition management (Rattray, 2003), total variation regularized portfolio (Corsaro et al., 2020) and trading trajectory modeling (Gârleanu and Pedersen, 2013). Finally, we solve the portfolio alignment problem of Le Guenedal and Roncalli (2022) when the fund manager has to dynamically control the carbon footprint of his investment portfolio by integrating a carbon reduction scenario. Comparing the single-period and multi-period solutions shows that the active share between the two portfolios may be greater than 25%. This figure can also reach 40% if we include carbon trends and they are increasing.