The second-largest U.S. mortgage insurer, PMI Group Inc., posted a fourth consecutive quarterly loss as claims surged amid rising homeowner defaults. The second-quarter net loss was $246.3 million, or $3.03 a share, compared with profit of $83.8 million, or 95 cents, a year earlier, the Walnut Creek, California-based insurer said today in a statement. The company shut its Canadian unit and said it will close sales offices in Germany, Spain and Italy. Mortgage insurers, which pay lenders when borrowers default and foreclosure proceeds fail to cover costs, have endured record losses and had their ratings cut amid the worst housing slump since the 1930s. One in every 171 households was foreclosed on, received a default notice or was warned of a pending auction in the second quarter, more than double the rate a year earlier, according to RealtyTrac Inc., a seller of default data.