By Anora Mahmudova and Barbara Kollmeyer, MarketWatch

NEW YORK (MarketWatch) -- The Dow Jones Industrial Average pushed into record territory early Tuesday, but the market swung after Fed Chairwoman Janet Yellen began her congressional testimony.

Earlier, stocks were lifted by better-than-expected results from J.P. Morgan Chase & Co. and Goldman Sachs Group Inc. and generally positive economic data.

By mid-morning, the S&P 500 (SPX) was down less than a point at 1,977.01. The Dow Jones Industrial Average (DJI) pared gains to 16 points, or 0.1%, to 17,070.25, a day after ending less than 0.1% off its record close. The Nasdaq Composite (RIXF) slipped 11 points, or 0.2%, to 4,430.45.

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

The early gains were also supported by broadly positive economic reports. 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. U.S. import prices edged up less than expected.

Federal Reserve Chairwoman Janet Yellen's two-day congressional testimony began Tuesday at 10 a.m. Eastern and is the reason behind market swings. Read: Live blog and video of Janet Yellen's appearance before Senate.

In earnings news, J.P. Morgan Chase(JPM) reported net income of $1.46 a share, which included 13 cents a share in legal expenses. Shares rose 3.5%.

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 1.5%.

Johnson & Johnson (JNJ) boosted its outlook and earnings topped forecasts. However, the stock fell 1%.

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

Economic data: broadly positive

* The Empire State manufacturing survey: 25.6 in July, up from 19.3 in June

* Sales at U.S. retailers rose to a seasonally adjusted 0.2% in June, or by 0.4% excluding the auto sector.

* The prices paid for goods imported into the U.S. edged up 0.1% in June, largely because of higher fuel costs by the smallest amount since.

* Fed Chairwoman Janet Yellen gives testimony to Congress on the economy and monetary policy on Tuesday and Wednesday.

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) was also higher after Monday's heavy losses, gaining $6.10, while oil(CLQ4) was pushing lower.

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:

Marc Faber, aka Dr. Doom, sticks to stock-swoon call

Are stock-crash conditions now growing or fading?

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 Mar 2024 to Apr 2024 Click Here for more JP Morgan Chase Charts.
JP Morgan Chase (NYSE:JPM)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more JP Morgan Chase Charts.