This paper presents a model for the optimal generation portfolio, specially designed to accommodate the characteristics of renewable generators and mitigate associated risks. The mathematical model is flexible enough to adjust to planner's desired goals — from economy to sustainability — and provide regulatory solutions to induce such adjustments. A realistic case study with the Brazilian system illustrates the potentiality of the proposed approach and paves the way to an efficient and fair regulatory framework.