The capacity to generate investment. An analysis of long-term determinants of investment