This PTD consists of three self-contained research proposals, broadly related to credit and financial markets imperfections. Paper I uses firm-level data to assess the financial sector's ability to channel credit to its most productive use and studies how macroprudential policy shapes changes in credit allocation. Paper II analyzes the implications of shadow banking and collective moral hazard on the optimal prudential regulation of banks. Paper III documents a new empirical phenomenon that further challenges the efficient market hypothesis