Stocks rallied Wednesday with the Dow Jones Industrial Average posting a triple-digit gain, boosted by gains in the industrial and financial sectors.

Continue Reading Below

The Dow added 346.41 points, or 1.4%, to 25,146.39. The S&P 500 rose 23.55 points, or 0.86%, to 2,772.35. The Nasdaq Composite climbed to another record high, gaining 51.38 points, or 0.67%, to 7,689.24.

Industrial names were climbing as investors shrugged off mixed reports on trade ahead of the G7 meeting, while financials were boosted by the 10-year Treasury yield approaching a two-week high.

Ticker Security Last Change Change % JPM JP MORGAN CHASE & CO. 92.74 -1.53 -1.62% CAT CATERPILLAR INC. 144.38 -2.77 -1.88% BA BOEING COMPANY 151.18 -5.62 -3.58%

The yield increased in anticipation that the Federal Reserve will hike rates when it meets next week.

Ticker Security Last Change Change % SP500 S&P 500 3236.92 -78.65 -2.37% I:DJI DOW JONES AVERAGES 26763.13 -525.05 -1.92% I:COMP NASDAQ COMPOSITE INDEX 10632.985307 -330.65 -3.02%

On Wednesday, both the Nasdaq and the Russell 2000 touched all-time highs while the Dow climbed back above 25,000. Dow components Microsoft, Visa and Nike touched record highs.

Economic data released Wednesday included the April trade deficit, which fell to a 7-month low as exports set a record. First-quarter productivity was revised to a 0.4% annual pace compared to the 0.7% originally reported.

Oil futures fell 1.2% to $64.73 a barrel, while gold futures were little changed.