US stocks ended a roller-coaster week at the top Friday on hopes that central banks will take coordinated action if Greece\'s crucial weekend election unleashes market turmoil. Wall Street nervously watched developments in Europe\'s rising debt crisis and braced for the Greek election Sunday, which could lead the debt-riddled country to exit the eurozone. Investors were also betting on additional stimulus from the Federal Reserve at next week\'s main event in the United States: the Federal Open Market Committee\'s policy meeting Tuesday and Wednesday. The Dow Jones Industrial Average of 30 blue chips advanced 1.7 percent for the week to 12,767.17 points. The broader S&P 500 added 1.3 percent to 1,342.84 and the tech-rich Nasdaq underperformed both, edging up a mere 0.5 percent to 2,858.42. Typical of the week\'s topsy-turvy volatility, stocks on Friday rallied \"on the perverse thought that no matter what comes out on Sunday night, it\'s going to be good news: either the austerity plan continues and they stay in the euro or they decide not to and the central banks have to pump like crazy,\" said Mace Blicksilver at Marblehead Asset Management. Disappointing US data on regional manufacturing and consumer confidence also spurred confidence that the Fed will announce more stimulus for the feeble economy. For the first time since April, the Dow posted back-to-back triple-digit daily gains on Thursday and Friday. \"Ahead of Sunday\'s all-important elections in Greece, investors cheered reports that major central banks are preparing a coordinated action to provide liquidity in an effort to improve lending conditions. With investors focused on hopes of stimulus measures, a batch of weak economic data was overlooked,\" said Wells Fargo Advisors. That was not the case Wednesday, when data showing weak US consumer buying in May hit stocks. May retail sales fell 0.2 percent from April, and excluding autos were down a heftier 0.4 percent, the Commerce Department reported. \"Considerable weakness is showing up on the consumer front as the May retail sales report is in line with weak job numbers, declining consumer confidence, a volatile stock market\" and other factors, said Chris Christopher at IHS Global Insight. The coming week\'s economic calendar is fairly charged, in addition to the keenly anticipated two-day Fed policy meeting. Investors are expected to closely follow the Group of 20 summit in Mexico Monday and Tuesday where the leaders of the major economies are due to grapple with Europe\'s crisis and other global ills. A look at May conditions in the depressed housing sector will come Tuesday, with housing starts and building permits numbers. Existing-home sales for May will be released Thursday, along with weekly jobless claims.