On the Rating and Pricing of Mortgage Portfolios through Structured Finance