Credit Ratings with Endogenous Assets