Essays in international macroeconomics and trade