Investors shook off their worries about Greece on Monday and got back to their routine of little-by-little gains.
The Dow Jones industrial average climbed 73 points - nothing flashy, but enough to regain most of what it lost in an 89-point drop on Friday. Before that, stocks had enjoyed a slow, steady climb this year.
Financial stocks led the Dow higher. Its biggest gainers were Bank of America, up 2.2 percent, and JPMorgan Chase, up 1.8 percent. Financial stocks have been the best performers in the market this year.
Apple crossed $500 per share for the first time, with a 1.9 percent rise to close at $502.60. The company jockeyed with Exxon Mobil last year for the title of most valuable company by market value but now enjoys a wide lead, $468 billion to $400 billion.
The market's gains were broad-based, with nine of 10 stock categories in the Standard & Poor's 500 rising, led by industrial stocks. Utilities declined by a whisker. European stocks rose.
For once, investors had the Greek Parliament to thank. On Sunday, it approved sharp cuts in civil-service jobs, welfare and the minimum wage, required by international leaders for a $170 billion bailout that Greece must have to avoid defaulting on its debt.
Other details of the bailout still need to be finalized, though. And rioting while Greece's Parliament voted was a reminder that its financial problems are not solved. Germany also indicated it would take time before approving the bailout.
The Greek debt deal amounts to a default because creditors will get less than they are owed, said Peter Cardillo, chief market economist for Rockwell Global Capital.