U.S. stocks closed broadly higher Wednesday as gains in health care and technology companies helped power the market to its third straight gain.

A batch of economic reports helped drive the latest rally, giving investors more reason to have an upbeat view of the economy. Oil prices rose on new government data showing lower-than expected U.S. crude stockpiles last week.

On Wednesday:

The S&P 500 gained 19.40 points, or 0.7 percent, to 2,810.92.

The Dow Jones Industrial Average rose 148.23 points, or 0.6 percent, to 25,702.89.

The Nasdaq composite climbed 52.37 points, or 0.7 percent, to 7,643.41.

The Russell 2000 index of smaller companies picked up 6.05 points, or 0.4 percent, to 1,555.88.

For the week:

The S&P 500 is up 67.85 points, or 2.5 percent.

The Dow is up 252.65 points, or 1 percent.

The Nasdaq is up 235.26 points, or 3.2 percent.

The Russell 2000 is up 34 points, or 2.2 percent.

For the year:

The S&P 500 is up 304.07 points, or 12.1 percent.

The Dow is up 2,375.43 points, or 10.2 percent.

The Nasdaq is up 1,008.13 points, or 15.2 percent.

The Russell 2000 is up 207.32 points, or 15.4 percent.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.