The standard approach to solving dynamic portfolio and consumption problems numerically uses backward induction, which complicates the solution if decisions at time t
depend on past decisions. In contrast, our solution algorithm goes forward in time. We use the insight that the main task in solving dynamic optimization problems consists of finding policy functions that use the current value of state variables as inputs and give the optimal decisions as outputs. Instead of assuming a functional form for these policy functions, we use a neural network for the estimation of the functions.