Most mortgages in the United States are securitized in agency mortgage-backed securities (MBS), and as a result, yield spreads on these securities are a key determinant of homeowners’ funding costs. We study variation in MBS spreads over time and across securities, and document a cross-sectional “smile” pattern in MBS spreads with respect to the securities’ coupon rates. We propose non-interest-rate prepayment risk as a candidate driver of MBS spread variation and present a new pricing model that uses “stripped” MBS prices to identify the contribution of this prepayment risk to the spread. The pricing model finds that the smile can be explained by prepayment risk, while the time-series variation is mostly accounted for by a non-prepayment risk factor that co-moves with MBS supply and credit risk in other fixed-income markets. We use the pricing model to study the MBS market response to the Federal Reserve’s large-scale asset purchase program and to interpret the post-announcement divergence of spreads across MBS.