We consider optimal consumption and (strategic) asset allocation of an investor with uncertain lifetime. The problem is solved using a multi-stage stochastic linear programming (SLP) model to generalize the closed-form solution obtained by Richard (1975). We account for aspects of the application of the SLP approach which arise in the context of life-cycle asset allocation, but are also relevant for other problems of similar structure. The objective is to maximize the expected utility of consumption over the lifetime and of bequest at the time of death of the investor. Since we maximize utility (rather than other objectives which can be implemented more easily) we provide a new approach to optimize the breakpoints required for the linearization of the utility function. The uncertainty of the problem is described by discrete scenario trees. The model solves for the rebalancing decisions in the first few years of the investor's lifetime, accounting for anticipated cash flows in the near future, and applies Richard's closed-form solution for the long, subsequent steady-state period. In our numerical examples we first show that available closed-form solutions can be accurately replicated with the SLP-based approach. Second, we add elements to the problem specification which are usually beyond the scope of closed-form solutions. We find that the SLP approach is well suited to account for these extensions of the classical Merton setting.