Talk about a surprise! Stocks ended nowhere near where they started Thursday, after the market digested the Supreme Court's upholding of Obamacare and headlines coming out of the EU Summit in Brussels. That summit wraps up today, and already, there is progress.

Perhaps that's more of a surprise.

U.S. stock futures are poised to surge at the open. Today marks the end of the week, the month of June, the second quarter, and the first half of the year for Wall Street, and Dow futures are up about 150 points.

European leaders meeting through the night have agreed to use the their permanent bailout fund to recapitalize the region's struggling banks, particularly those in Spain. The leaders also agreed to the idea of a tighter union in the long term. EU President Herman Van Rompuy called the decision a "breakthrough that banks can be recapitalized directly."

Rumors of the progress certainly helped stocks Thursday. The Dow had been down 177 points and rallied back to close just 25 points lower with a furious rally in the final 20 minutes of trading. The Nasdaq lost 26 points yesterday and the S&P 500 gave up more than 2 points.

Investors struggled to understand the ramifications of the Supreme Court's health-care decision, and by many accounts, they were "surprised" by it. Many traders had expected the individual mandate to be tossed out, and when it wasn't, they bought hospital stocks.

Hospital operators HCA (HCA) and Universal Health (UHS) rallied on the thinking that if all Americans have to be insured by 2014, that's a whole lot of business coming to them.

Medicaid companies -- like Molina (MOH), WellCare (WCG), and Centene (CNC) -- also did well.

But the insurance companies  -- UnitedHealth (UNH), Humana (HUM) and  Aetna (AET) -- and the pharmaceuticals -- Merck (MRK) and Pfizer (PFE) -- weren't so sure how to react. Many of stocks in those categories turned in mixed performances.

The medical device makers, including Amgen (AMGN) and Biogen Idec (BIIB), fell.

Commodities were also linked to healthcare yesterday. Many commodities traders viewed the high court's ruling as a tax hike that would drain Americans in a soft economy, sapping demand for things like oil. Crude tumbled more than 3% yesterday to close at $77.69 a barrel. Oil is down a whopping 10% so far this month, but is rallying -- along with the overall stock market -- Friday morning.

Research in Motion's earnings were way worse than Wall Street expected, sending shares of the Canadian blackberry maker dramatically lower. RIM reported a quarterly loss of $518 million and a sales decline of more than 40%. Both measures significantly missed Wall Street targets.

If that's not bad, here's worse: RIM says it's cutting 5,000 jobs this year, and it delayed the launch of its next Blackberry operating system to next year. So forget about a back-to-school or holiday sales boost.

Lauren Simonetti joined FOX Business Network (FBN) in September 2007 as a field producer and became a reporter for the network in September 2011.