As home-mortgage delinquencies and foreclosures have surged in recent months , especially for subprime loans , the distress has roiled financial markets and sparked anxiety that it could spill over into the broader economy .