The problems in the mortgage market triggered the 2007-09 financial crisis. Mortgage underwriters, servicers, investors, raters, and regulators need new data-driven models and efficient numerical methods for the analysis of risk in the mortgage markets. This talk will provide an overview of our work in this area. We focus on: (1) formulation and estimation of accurate mortgage default and prepayment risk models that harness “big mortgage data”, (2) design of efficient computational methods for the risk analysis of large pools of mortgages, and (3) development of large-scale optimization tools for the selection of mortgage portfolios and the design of mortgage-backed securities. We validate our approaches using an unprecedented data set which includes over 120 million mortgages with highly detailed loan-level data. This is joint work with Kay Giesecke (Stanford).