We study a model of consumption choice and portfolio allocation that captures, in two different interpretations, the combined effect of durability of consumption goods and habit formation over service flows from those goods. In a third interpretation, the model captures the idea of a dual purpose commodity. The optimal allocation problem is from the class of free boundary singular control problems. We discuss, formally, necessary and sufficient conditions for a consumption and portfolio policy to be optimal. We also introduce a numerical technique based on approximating the original program by a sequence of discrete parameter Markov chain control problems. We provide convergence results of the value function, the optimal investment policy, and the optimal consumption regions in the approximating discrete control problems to those in the original continuous time dynamic program. We construct numerically the consumption boundary that divides the state space into two regions—one of immediate consumption and the other of abstinence. We show that both the wealth required to start consuming and the optimal fraction of wealth invested in the risky asset are cyclical functions in both the stock of the durable good and the standard of living. This is due to the interaction between the durability and habit formation effects. We also study the effect of the cyclical investment behavior on the equilibrium risk premium in a representative consumer economy.