Default risk and equilibrium asset pricing: Applications to corporate and sovereign debt markets