Essays on Macroeconomic Uncertainty and Capital Flows