Soothing words from Federal Reserve Chairwoman Janet Yellen helped pull the stock market out of a morning slump Wednesday. But Internet companies and Whole Foods Market plunged, taking the tech-heavy Nasdaq down.

At the close on Wall Street, the Nasdaq composite lost 13.1 points, about 0.3 percent, to 4,067.7. The Standard & Poor's 500 index was up 10.5 points, about 0.6 percent, at 1,878.2, within striking distance of its April 2 record of 1,890. The Dow Jones industrial average gained 117.5 points, about 0.7 percent, to 16,518.5.

Traders dropped NetApp, and other tech companies for a second day running, sending their stocks down 2 percent or more. Whole Foods plunged 19 percent after cutting its profit forecast.

Yellen told the Joint Economic Committee of Congress that a tough job market and weak inflation mean that the Fed will likely keep borrowing rates low for a "considerable time."

Yellen's comments appeared to ease concerns that the Fed was going to remove more support. The stock market had wandered lower in morning trading, then turned from a loss to a gain before the lunch hour.

"I think the market breathed a sigh of relief that she wasn't going to unveil something new," said Jeff Kleintop, chief market strategist at LPL Financial.

Of the companies that have provided profit forecasts for the second quarter, nearly nine out of 10 have warned of weaker earnings.

advertisement | advertise on newsday

Whole Foods cut its profit outlook late Tuesday, saying it's facing increased competition as supermarkets, big-box stores and even online retailers step up their offerings of organic foods. It's the third time the grocery chain has reduced its profit forecast in the last six months. Whole Foods plunged $9.02, or 19 percent, to $38.93.