The Greek election "should be seen as a significant net positive for markets, but markets don't always react in a rational manner," said David Kelly, chief global strategist for JPMorgan Funds.
The ISE Homebuilders index rose 34 cents, or 3.5 percent, to $9.98. Lennar, PulteGroup, D.R. Horton, Toll Brothers and Hovnanian Enterprises all rose strongly.
Giant military contractor SAIC fell 38 cents, or 3.1 percent, to $11.86. The Defense Department said Friday that SAIC had lost its biggest contract to Lockheed Martin, a $4.6 billion deal to run the department's global network.
Energy prices, which are sensitive to investors' expectations of future economic growth, fell. Benchmark crude for July delivery slid 76 cents to $83.27 per barrel in electronic trading on the New York Mercantile Exchange.
Daniel Wagner can be reached at www.twitter.com/wagnerreports.
Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.