Title: Essays on credit and risk