At the end of 2007 , global financial markets froze up and the loss of capital inflows to Kazakhstani banks caused a credit crunch .