Essays on macroeconomics and housing