We study the optimal stopping problems embedded in a typical mortgage. Despite a possible non-rational behaviour of the typical borrower of a mortgage, the problem is worth to be solved for the lender to hedge against the prepayment risk, and because many mortgage-backed securities pricing model incorporate this suboptimality via a so-called prepayment function which can depend, at time t, on t...