We look at the role of credit ratings when assets are issued in a primary market and sold by dealers into a secondary, over-the-counter market in order to study regulatory proposals for rating agencies. Credit ratings are used to overcome a lemons problem. When the lemons problem is moderate, ratings are used to screen issuers, but are inefficiently inaccurate. Hence, too many lemons are issued in order for dealers to profit from rate shopping where low rating standards lead to high volume, but fragile trading in the secondary market. This inefficiency arises from dealers not properly taking into account the informational rents paid indirectly by investors in the secondary market to primary issuers. We use our framework to show that in-house ratings by investors or competition in the secondary market can lead to more accurate ratings and more stable trading, while promoting in-house ratings by dealers and competition among rating agencies are ineffective. Holding dealers liable or having investors pay for accurate ratings ex-post can also improve efficiency and stability.