By Anora Mahmudova and Sara Sjolin, MarketWatch

What a wild ride! U.S. stocks staged a dramatic finish Tuesday after a morning selloff to end the session with modest gains, following news reports that Greek Prime Minister Alexis Tsipras has proposed an interim financing until the end of July.

Greece asked for extra funds (http://www.marketwatch.com/story/greece-asks-creditors-for-financing-through-july-2015-07-07)in exchange for some overhauls being demanded from Greece's parliament, according to The Wall Street Journal.

The S&P 500 recovered from a 1% decline to end with a 12-points, or 0.6% gain, to 2,081.34. The sharp fall in the morning had at one point pushed the index below its 200-day moving average, a key technical level last breached in October.

The Dow Jones Industrial Average fell more than 200 points at session lows, but recovered to finish up 93.40 points, or 0.5%, higher at 17,776.

The Nasdaq Composite also pared more brutal declines to close 5 points, or 0.1%, higher at 4,997.46.

Earlier worries among global investors over Europe and Asia could be spotted from falling government bond yields, which move inversely to bond prices, as investors sought the safety of government bonds. The yield on a 10-year Treasury note fell as much as 10 basis points to 2.19%, but since then pared losses to move back to 2.26%.

"Investors need to get use to a shock like Greece, but there are bigger issues that investors should be concerned about," said Bruce McCain, chief investment strategist at Key Private Bank, referring to precipitous falls in China's stock market.

"When fundamentals are shaky and valuations are stretched, stock markets are vulnerable to shocks and usually it's unexpected ones that trigger large selloffs," McCain said.

Greece remained in the headlines on Tuesday as eurozone finance ministers convened for an emergency meeting in Brussels to discuss what's next for Greece after Sunday's referendum.

Read: Greece asks creditors for financing through July (http://www.marketwatch.com/story/greece-asks-creditors-for-financing-through-july-2015-07-07)

Greece's stock market remained shut Tuesday and Wednesday (), alongside the extended closure of the country's banks, the Hellenic Capital Market Commission said. Meanwhile, Global X FTSE Greece 20 ETF (GREK) rose 1.5%, recovering from a more than 3% fall earlier in the day.

Read: Greek debt crisis: Who's meeting and when on Tuesday (http://www.marketwatch.com/story/greek-debt-crisis-whos-meeting-and-when-on-tuesday-2015-07-07)

"The [morning] selloff is due to a number of factors and Greece is one of them," said Brian Fenske, head of sales trading at ITG.

"China's local stock market has essentially crashed, but that is now spilling over to U.S.-listed Chinese companies. Technology stocks are selling off due to some bad news from chip-makers," Fenske said.

"Large moves in oil and copper prices are adding to the selling pressure, which is why we are seeing big drops in materials stocks," he added.

U.S. data: The U.S. trade deficit rose 2.9% in May, mostly because the U.S. exported fewer aircraft and other manufactured goods. The increase was smaller than expected by economists surveyed by MarketWatch. Market reaction to U.S. trade data released ahead of the opening bell was muted.

Job openings at U.S. workplaces rose to a record high of 5.36 million in May (data go back to the end of 2000) from 5.33 million in April, the U.S. Department of Labor reported Tuesday.

Oil:Oil prices rebounded in late trade, (http://www.marketwatch.com/story/crude-oil-struggles-to-recover-from-selloff-2015-07-07) following Monday's carnage, with the August contract for crude oil up 0.7% to $52.94 a barrel. Brent crude for the same month rose 0.9% to $57.37 a barrel.

The contracts slid 7.7% and 6.3% (http://www.marketwatch.com/story/oil-tumbles-4-after-greek-voters-reject-creditors-reform-proposal-2015-07-06), respectively, on Monday. The selloff was driven by the turmoil in Greece and a potential Iranian nuclear deal, which may result in a flood of millions of barrels of oil, adding to global supplies.

Movers & shakers: Shares of Advanced Micro Devices Inc.(AMD) sank 15% after the chip maker cut its outlook late Monday (http://www.marketwatch.com/story/amd-warns-revenue-to-fall-short-on-weak-pc-demand-2015-07-06).

A. Schulman Inc.(SHLM) tumbled 6.4% after the plastic manufacturer late Monday said it swung to a loss in the third quarter (http://www.marketwatch.com/story/a-schulman-swings-to-a-loss-cuts-forecast-2015-07-06-174854739).

Utilities stocks rallied, with the S&P 500 Utilities sub sector gaining 2.5%. Recent 10% correction in the sector drove the valuations to attractive levels. Duke Energy Corp (DUK) jumped 3.3%, Public Service Enterprise Group Inc. (PEG) also rose 3.3%.

For more on today's notable movers read Movers & Shakers column (http://www.marketwatch.com/story/amd-a-schulman-advanced-auto-parts-shares-in-focus-2015-07-07).

Other markets: Chinese stock indexes moved sharply lower (http://www.marketwatch.com/storyno-meta-for-guid), continuing the recent downbeat trend in the country's financial markets. Trading was halted in shares (http://www.marketwatch.com/story/over-20-of-listed-china-stocks-now-in-trading-halt-2015-07-07) in more than 200 mainland-traded China-traded companies during the selloff. The rest of Asian markets closed mixed. European stocks struggled for direction (http://www.marketwatch.com/storyno-meta-for-guid), with investors waiting for the latest word on Greece.

Gold fell 1.5% to $1,155, while the dollar rose against most major currencies, rising 0.2% to 96.50.

Subscribe to WSJ: http://online.wsj.com?mod=djnwires