Credit Ratings With Endogenous Assets