Essays in macroeconomics and finance