Essays in finance and macroeconomics