By Anora Mahmudova, MarketWatch

NEW YORK (MarketWatch) -- U.S. stocks ended Wednesday's choppy trading session generally higher, though selling of shares in Internet companies and high-growth companies resulted in a loss on the Nasdaq Composite.

Markets recovered early morning losses after Federal Reserve Chairwoman Janet Yellen reiterated that the central bank anticipates keeping interest rates very low, even after employment and inflation return to healthy levels. Also read: Yellen stays upbeat but is watching housing.

The Nasdaq Composite(RIXF) recovered most of the steep losses and finished the day 13.09 points, or 0.3%, lower at 4,067.67.

The S&P 500 (SPX) ended the day at up 10.49 points, or 0.6%, at 1,878.21. The Dow Jones Industrial Average (DJI) gained 117.52, or 0.7%, to 16,518.54 by the end of the session.

Read the recap of MarketWatch's live blog of today's stock-market action.

Commenting on volatile trading, Paul Mangus, head of equity research and strategy at Wells Fargo Private Bank, said now that the earnings season is almost over, markets are sensitive to macro news.

"We have seen a change in sentiment among investors, a shift from momentum stocks whose earnings disappointed and no longer justify lofty valuations," he added.

Investors generally liked Federal Reserve Chairwoman Janet Yellen's testimony before the Joint Economic Committee, when she reiterated that the central bank anticipates keeping overnight interest rates very low, even after employment and inflation return to healthy levels. Also read: Yellen stays upbeat but is watching housing.

A report ahead of the opening bell showed that slower economic growth caused in part by brutal winter weather led to a sharp decline in U.S. productivity in the first quarter.

The productivity of American businesses fell at a 1.7% annual rate from January through March, the Labor Department said Wednesday. It was more than expected by economists polled by MarketWatch.

Yahoo shares lower, Electronic Arts rallies

Tesla Motors Inc.(TSLA) shares dropped more than 5% in afterhours trading after the car maker reported a surprise loss in the first quarter. Tesla shares closed 2.9% lower ahead of the results. Also read: Tesla live blog: first-quarter results.

Coffee company Keurig Green Mountain Inc. (GMCR), shares rallied 5% after quarterly profits topped expectations. Shares closed down 3.2% ahead of the results.

SolarCity (SCTY) shares rallied 8% in aftermarket trade, after reporting a smaller loss than expected. Shares closed 9% lower ahead of results.

Shares of Yahoo Inc. (YHOO) fell 6.6% after Chinese Internet heavyweight Alibaba Group Holding Ltd. filed plans to list shares in the U.S.

Yahoo has a 24% stake in Alibaba, and its initial public offering is poised to be one of the biggest listings on record. Read: Yahoo's Alibaba moment has finally arrived.

Electronic Arts Inc. shares (EA) rallied 21%. Late Tuesday, the videogame maker reported fourth-quarter results that outstripped Wall Street's projections.

In contrast, King Digital Entertainment PLC (KING), maker of Candy Crush Sage hit game, slumped 13% after profit fell 20%.

Shares in Whole Foods Market Inc. (WFM) dived 19%, still suffering after the upscale grocer late Tuesday cut its full-year profit and sales forecasts.

AOL Inc. (AOL) shares plummeted 21% after the Internet company's first-quarter profit dropped more than 60%, hurt by restructuring and asset impairment charges, even as revenue topped expectations.

Gold prices fall, oil rises

European markets ended a volatile day on a mixed note, while Asian stock markets closed sharply lower. Russia's MICEX index rallied 3.4%, after president Putin said he was ready to talk over the crisis in Ukraine.

The U.S. dollar (DXY) pared its gain against the Japanese yen Wednesday as Fed Chairwoman Janet Yellen emphasized that easy monetary policy remains necessary because of slack in the economy.

Among commodities, June gold (GCM4) prices fell sharply, while crude for June delivery (CLM4) rose to regain the $100 a barrel level.

More must-reads from MarketWatch:

Michael O'Rourke: U.S. stocks may be the walking dead

Jim O'Neill: Short the euro, watch Apple, sell in May

Investors get bearish, suggesting stocks will rise

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

Keurig Green Mountain, Inc. (NASDAQ:GMCR)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more Keurig Green Mountain, Inc. Charts.
Keurig Green Mountain, Inc. (NASDAQ:GMCR)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more Keurig Green Mountain, Inc. Charts.