We analyze a model where investors use a credit rating to decide whether to finance a firm. The rating quality depends on unobservable effort exerted by a credit rating agency (CRA). We study optimal compensation schemes for the CRA when a planner, the firm, or investors order the rating. Rating...