In this paper, we present a stochastic dynamic planning model called SMART-Invest, which is capable of optimizing investment decisions in different electricity generation technologies. SMART-Invest consists of two layers: an optimization outer layer and an operational core layer. The operational model captures hourly variations of wind and solar over an entire year, with detailed modeling of day-ahead commitments, forecast uncertainties and ramping constraints. The outer layer requires optimizing an unknown, non-convex, non-smooth, and expensive-to-evaluate function. We present a stochastic search algorithm with an adaptive stepsize rule that can find the optimal investment decisions quickly and reliably. By properly capturing the marginal cost of investments in wind, solar and storage, we feel that SMART-Invest produces a more realistic picture of an optimal mix of wind, solar and storage, resulting in a tool that can provide more accurate guidance for policy makers.