By Anora Mahmudova and Barbara Kollmeyer, MarketWatch

NEW YORK (MarketWatch) -- The U.S. stock market closed lower, dragged down by sharp declines in momentum stocks after the Federal Reserve suggested valuations on biotech and Internet stocks may be stretched.

A positive start early in the session on better-than-expected results from J.P. Morgan Chase & Co. and Goldman Sachs Group Inc. and generally positive economic data fizzled out when Fed Chairwoman Janet Yellen began her two-day congressional testimony.

The S&P 500 (SPX) recovered some of the losses, but closed 4 points, or 0.2%, lower at 1,973.04. The Dow Jones Industrial Average (DJI) ended the day flat at 17,057.94, after setting an intraday record in the morning. The Nasdaq Composite (RIXF) dropped 26 points, or 0.6%, to 4,413.50. The Russell 2000 (RUT) fell 12 points, or 1%, to 1,150.29.

The iShares Nasdaq Biotechnology ETF (IBB) was hit hard, falling 2.3%, while the Global X Social Media Index ETF (SOCL) gave up 1.2%.

Follow MarketWatch's live blog of today's stock-market action.

"Investors are particularly interested to see proof that earnings did bounce back in the second quarter. If we do not see solid growth and positive outlook for the rest of the year, we might see some repricing, as current multiples without growth are not sustainable," said Drew Wilson, investment analyst at Fenimore Asset Management

Federal Reserve Chairwoman Janet Yellen told Congress the Fed could act sooner on interest rates if the labor market keeps surprising. But, she added, that time is not yet here.

Yellen never mentioned the stock values of social media and biotech companies in either her prepared remarks or answers to the questions from the senators. That reference to valuations, which hit the Nasdaq, was in a separate Fed monetary policy report submitted to Congress along with Yellen's testimony.

Read: Live blog and video of Janet Yellen's appearance before Senate.

Among the day's economic news, Empire State manufacturing activity picked up in July to its highest reading in four years. While retail sales in June rose less than expected, most stores except for auto dealers and home-improvement outlets boasted an improvement in revenue.

In earnings news, J.P. Morgan Chase (JPM) reported better-than-expected earnings. Shares rose 3.8%. Read the recap of the earnings call with analysts.

Goldman Sachs(GS) reported second-quarter earnings of $4.10 a share and revenue of $9.13 billion, beating Wall Street estimates. Goldman shares rose 0.8%. Recap: Goldman Sachs CFO says environment mixed with historically low volatility levels.

As high-growth momentum stocks were hit, Tesla Motors, Inc. (TSLA) shares dropped 3.1%, Twitter, Inc. (TWTR) and Facebook Inc. (FB) fell 1.2%.

Yahoo Inc. (YHOO) and Intel Corp. (INTC) are both due to report after the close. Read more about the day's notable movers here.

Gold recovers, pound rallies

Asian markets did build on those gains, with the Nikkei 225 index settling at a more than one-week high. Gold(GCU4) fell for a third session on Tuesday on the back of dovish comments from Federal Reserve Chairwoman Janet Yellen. Crude oil futures(CLQ4) futures succumbed to renewed selling pressure Tuesday, pushing the U.S. benchmark back below $100 a barrel for the first time since May.

The German ZEW economic-sentiment reading on Tuesday fell far short of expectations, which weighed on Europe stocks and the euro (EURUSD). The British pound(GBPUSD) rallied after U.K. inflation inched closer to the Bank of England's 2% target.

More must-reads from MarketWatch:

Yellen: Fed may move sooner on rates if the labor market keeps surprising

3 ways to avoid the next Cynk

Will the S&P 500 see 2,000 this week?

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

JP Morgan Chase (NYSE:JPM)
Historical Stock Chart
From Feb 2024 to Mar 2024 Click Here for more JP Morgan Chase Charts.
JP Morgan Chase (NYSE:JPM)
Historical Stock Chart
From Mar 2023 to Mar 2024 Click Here for more JP Morgan Chase Charts.