This paper develops a nonparametric approach to examine how portfolio and consumption choice depends on variables that forecast time-varying investment opportunities. I estimate single-period and multiperiod portfolio and consumption rules of an investor with constant relative risk aversion and a one-month to 20-year horizon. The investor allocates wealth to the NYSE index and a 30-day Treasury bill. I find that the portfolio choice varies significantly with the dividend yield, default premium, term premium, and lagged excess return. Furthermore, the optimal decisions depend on the investor's horizon and rebalancing frequency.