A trader rushes across the floor of the New York Stock Exchange Friday. U.S. stocks closed up on Friday,continuing a two-week rally. (Richard Drew/AP)

U.S. markets are watching their own version of the Euro 2012 soccer tournament, where stocks rise and fall based on thrilling plays in Europe.

The Dow Jones industrial average rose nearly 1 percent, to close Friday at 12,767.17. The Standard & Poor’s 500-stock index was up 1 percent to close at 1,342.84 points.

Investors were nervous and markets choppy throughout the week because of uncertainty in Europe, analysts said, but continued a two-week rally.

Back home, a slew of disappointing growth statistics released this week did not dampen investor optimism. Retail sales and industrial production numbers were down in May, close on the heels of a poor jobs report early in the month. Consumer sentiment also dropped to its lowest point in the year.

“The data points were mostly ignored by the market,” said Roger Volz, technical strategist at BGC Financial. “Right now, Europe is the overriding stimulus.”

Spain recently received a $125 billion bailout package from European leaders to save its failing banks. Investors are growing increasingly worried about the financial health of the Spanish and Italian governments, which have seen their borrowing costs soar.

Britain announced Thursday that it would pump billions of dollars into its banks to stave off any fallout from the debt crisis. Global investors embraced the idea that preventive measures were being taken, said Michael Mussio, portfolio manager at FBB Capital Partners.

All eyes are on the elections in Greece this weekend, analysts said. If the left-wing party Syriza wins, Greece could earn a red card and be forced from the euro zone. Syriza does not agree with the terms that accompanied the country’s bailout package.

“It’s anybody’s guess how things are going to shake out,” Mussio said.

Volz said traders were “hyper-sensitive to any whiff” of financial action by global central banks. European Central Bank President Mario Draghi did not close the door on interest rate cuts, but he urged leaders in a speech in Frankfurt on Friday to make policy decisions rather than rely on the ECB. Leaders from the Group of 20 are scheduled to meet in Mexico next week, and their discussions are likely to be focused on the European crisis and the Greek outcome.

The outlook for next week is “fairly decent,” said Mussio, but contingent on the outcome of Greek elections. The Federal Reserve’s policymaking board is meeting next week.

If the markets were truly on an upswing, added Volz, then any dips next week could be short-lived.

“Once we get past Tuesday next week, it might be an entire different ballgame,” Volz said.