Growth was robust from 2004 to 2007 as South Africa reaped the benefits of macroeconomic stability and a global commodities boom , but began to slow in the second half of 2007 due to the electricity crisis and the subsequent global financial crisis ' impact on commodity prices and demand .