US stocks surged this week as fears about Greece and China receded for now and strong earnings from some banks and technology companies took center stage.
The tech-rich Nasdaq Composite Index was the week's biggest star, closing the week up a whopping 212.44 points (4.25 percent) at a record 5,210.14 behind strong earnings from Google, Netflix and others.
The Dow Jones Industrial Average gained 326.04 (1.84 percent) at 18,086.45, while the broad-based S&P 500 advanced 50.02 (2.41 percent) to 2,126.64.
"It was actually a terrific week," said Chris Low, chief economist at FTN Financial.
"We're actually trading on fundamentals this week," Low said, adding that bank earnings were generally "really terrific."
Investors breathed a sigh of relief after Greek Prime Minister Alexis Tsipras at the start of the week backed tough reforms required by creditors as a condition for beginning formal bailout talks.
In subsequent days, the Greek parliament signed off on the reform measures and German lawmakers gave Chancellor Angela Merkel the green light to negotiate a new bailout deal.
The deal removed the imminent threat of a messy Greek departure from the eurozone, although analysts said the situation remained uncertain.
"I think most of the euphoria about the latest rescue passage has worn off," Low said. "Investors are realizing how many significant challenges remain."
Worries about China were also back-burnered. The Shanghai Index jumped 3.51 percent Friday, to give the market the second straight weekly gain following big drops the prior three weeks that rattled global markets.
But as with Greece, analysts were not convinced that China was completely out of the woods. The pullback in Chinese stocks has raised worries about slowing growth in the broader Chinese economy.
The stock upturn is "a rally that has effectively been rigged by government intervention," said Briefing.com analyst Patrick O'Hare.
"The overarching point... is that the good times rolling in the Chinese stock market at the moment are too good to be true because they are being fabricated by government control."
Investors also took heart from two days of congressional testimony from Federal Reserve Chair Janet Yellen, who gave a generally upbeat appraisal of the US economy as she stuck to her forecast for an increase in the Fed's key interest rate later this year.
But many market watchers continue to believe a rate hike is unlikely before December, a timeframe considered friendly to stock market gains.
- Netflix, Google lift Nasdaq -
Among the parade of earnings reports, Netflix vaulted 18 percent on Thursday to lift the Nasdaq to a record close after reporting that subscriptions jumped 3.3 million in the second quarter.
The streaming video company reported lower profits, but analysts view the stock as a must-have.
"It's a big believers story, the way Amazon is," said Mace Blicksilver, director of Marblehead Asset Management. "On growth metrics, you must own it."
On Friday, Google lifted the Nasdaq to a second straight record after a blowout earnings report pushed the stock up 16 percent to an all-time high.
That brought the company's full market value to about $468 billion, a gain of $65 billion, the biggest one-day gain in US history, according to S&P Indices.
Google reported a two percent rise in earnings to $3.4 billion and gave a bullish outlook on its YouTube business, while hinting that moves to return cash to shareholders were in the horizon.
Most large banks either met or exceeded earnings forecasts. The biggest jump came at Citigroup, which reported $4.8 billion in profits, up from just $181 million in the year-ago period when litigation costs weighed on results.
But Goldman Sachs saw earnings drop by almost half, to $1.05 billion from $2.04 billion due to a $1.45 billion legal charge.
Next week's calendar includes results from numerous heavyweights, including Apple, Microsoft, Boeing and General Motors. The schedule also includes June sales of new homes and existing homes.