This paper presents a portfolio building process for large public and/or nonprofit research organizations. The proposed approach allocates a research and development (R&D) program budget, taking into consideration both applications and technological areas. It starts with the definition of program objectives and covers the allocation of an R&D program budget, including a final activity selection, according to specific criteria. Budget allocation decisions rely on estimations of risk and return for areas and projects, based on the Markowitz portfolio selection model. A scenario implementation of the proposed portfolio building process in the context of a space agency is included. The application to other areas is also discussed.