We derive a measure of the degree of inefficiency of the production structure of an economy by casting its optimal sectoral composition as the outcome of a portfolio allocation problem, in the spirit of Koren and Tenreyro (2004). We use the framework to construct measures of inefficiency using...