The programs require at least MATLAB version 7.0 The following are the main programs used for the computations in the paper: investorreturn(eta,c,mu,sigma,r_m,d): Computes the return to the investor facevalue(eta,c,mu,sigma,r_m,d): Computes the face value of the debt contract defaultprob(eta,c,mu,sigma,r_m,d): Computes the default probability The programs take vectors as inputs. The input variables are eta: % of assets retained by borrower in case of bankruptcy c: bankruptcy costs r_m: reservation return of the entrepreneur d: % of debt finance (1-d is equity) For more details about the variable, please see the paper The density of the return distribution is given in m-file density.m density(x,mu,sigma) is the value of the density at x given mu: Mean of return distribution sigma: Standard The default is a normal distribution. In order to switch to a T-distribution please comment/uncomment the respective part of the file.