Carbon mitigation is a major aim of the power-generation regulation. Renewable energy sources for electricity are essential to design a future low-carbon mix. In this work, financial Modern Portfolio Theory (MPT) is implemented to optimize the power-generation technologies portfolio. We include technological and environmental restrictions in the model. The optimization is carried out in two stages. Firstly, we minimize the cost and risk of the generation portfolio, and afterwards, we minimize its emission factor and risk. By combining these two results, we are able to draw an area which can be considered analogous to the Capital Market Line (CML) used by the Capital Asset Pricing model (CAPM). This area delimits the set of long-term power-generation portfolios that can be selected to achieve a progressive decarbonisation of the mix. This work confirms the relevant role of small hydro, offshore wind, and large hydro as preferential technologies in efficient portfolios. It is necessary to include all available renewable technologies in order to reduce the cost and the risk of the portfolio, benefiting from the diversification effect. Additionally, carbon capture and storage technologies must be available and deployed if fossil fuel technologies remain in the portfolio in a low-carbon approach.