Essays in real estate finance and housing economics