Three essays in applied econometrics with applications to international trade and finance