Contractual agreements and endogenous partnerships in moral hazard economies : submitted in partial fulfilment of the requirements for the degree of Doctor in Economics at the Universitat Autònoma de Barcelona, May 2003