The prospect of lower interest rates from the Federal Reserve for a longer time was all US investors needed this week to ignore the Greek crisis and the Chinese meltdown.
Even as Greece's inability to strike a new bailout agreement with official creditors threatened eurozone stability, Wall Street was comfortable with the idea of more cheap dollars and steady US economic growth.
The 13 percent fall in Shanghai stocks over the week, half of it on Friday, also appeared to mean little.
While caution reigned on Friday -- a quadruple witching day of settlement for four key futures and options contracts -- the indices still finished the week strongly, with the Nasdaq setting a new record on Thursday.
For the week, all three key indices managed 1.01 percent gains. The Dow Jones Industrial Average finished at 18,014.28; the broad-market S&P 500 was at 2,109.76; and the Nasdaq Composite ended at 5,117.00, below its record close of 5,132.95 on Thursday.
The gains came for the market despite further signs of lower corporate profit growth and nothing new on the economy.
The big impetus was the dovish stance the Fed assumed coming out of its two-day policy meeting Wednesday.
As expected the Fed kept its benchmark interest rate unchanged at zero percent, but forecast a likely increase to 0.5 percent in two steps before year-end.
But what pleased equities investors was that the central bank sounded less sure of the economy's strength than a few months ago, and was now forecasting a much slower climb in rates over the next two years.
Chris Low of FTN Financial said that Fed Chair Janet Yellen's tone revealed "a distinct lack of eagerness about tightening, which I think investors found quite convincing."
- Caution over Greece -
Friday's modest sell-off, said Charlie Bilello of Pension Partners, likely reflects some caution over going into the weekend with Greece and its official lenders still far apart over the conditions for the release of 7.2 billion euros ($8.2 billion) in bailout financing for Athens.
The country is under huge pressure to reach a deal before it has to pay 1.5 billion euros ($1.7 billion) to the International Monetary Fund by June 30.
"Greece is obviously on everyone's mind; it could be just positioning ahead of that potential for volatility on Monday," he said. "Why take the risk over the weekend if you don't have to?"
Even so, noted Patrick O'Hare of Briefing.com, "the goings-on in the Chinese stock market and the goings that are off in Greece have not ruffled too many feathers here."
"The market is not trading in fear of a Greek debt default and eurozone exit."
The prospect of more cheap money appeared to be fueling continued mergers and acquisitions action, with ConAgra Foods facing an activist challenge and lifestyle and home furnishings business Martha Stewart Living Omnimedia expected to be bought out.
The IPO market also kept up speed, as Fitbit, which makes popular health-monitoring wearable devices, proved there was still power in new tech shares.
Its shares surged 48 percent in its market debut Thursday following its $732 million initial public offering, giving it a market value of $4 billion.
Although the US market has paid only light attention to the Greek crisis, many analysts and economists were supplying detailed "what if?" reports to clients as the weekend approached, in case Greece heads for a massive debt default and exit from the eurozone.
Sam Stovall of S&P IQ said Greece would take center stage next week, with the emergency summit of the leaders of the 19 eurozone countries in Brussels on Monday.
"I think the big driver will be what happens on Monday with Greece. The worry is whether the banks have to close down, will they have enough funds to keep operations going," Stovall said.
"We had the post-Fed rally and now investors are just waiting to see if there is more upside potential, or if it will be derailed by what's going on in Greece."