Credit Allocation and Macroeconomic Fluctuations