Risk-based asset allocation models have received considerable attention in recent years. This increased popularity is due in part to the difficulty in estimating expected returns, as well as to the 2008 financial crisis, which helped reinforce the key role of risk in asset allocation. We propose a generalized risk budgeting (GRB) approach to portfolio construction. In a GRB portfolio, assets are grouped into possibly overlapping subsets, and each subset is allocated a prespecified risk budget. Minimum variance, risk parity and risk budgeting portfolios are all special instances of a GRB portfolio. The GRB portfolio optimization problem is to find a GRB portfolio with an optimal risk–return profile, where risk is measured using any positively homogeneous risk measure. When the subsets form a partition, the assets all have the same expected return, and we restrict ourselves to long-only portfolios; then, the GRB problem can in fact be solved as a convex optimization problem. In general, however, the GRB problem is a constrained nonconvex problem, for which we propose two solution approaches. The first approach uses a semidefinite programming relaxation to obtain an (upper) bound on the optimal objective function value. In the second approach, we develop a numerical algorithm that integrates augmented Lagrangian and Markov chain Monte Carlo methods in order to find a point in the vicinity of a very good local optimum. This point is then supplied to a standard nonlinear optimization routine with the goal of finding this local optimum. The merit of this second approach is in its generic nature: in particular, it provides a strategy for choosing a starting point for any nonlinear optimization algorithm.