Stocks advanced for a third straight day on Wednesday, once again helped by higher oil prices, which lifted shares in oil and gas companies.

Trading was light as Wall Street and the rest of the country heads into Christmas and the New Year. U.S. markets will be open for only a half day on Thursday.

advertisement | advertise on newsday

The Dow Jones industrial average rose 185.34 points, or 1.1 percent, to 17,602.61. The Standard & Poor’s 500 index rose 1.2 percent, to 2,064.29 and the Nasdaq composite rose 0.9 percent, to 5,045.93.

With the gains in the last three days, U.S. markets have recovered most of the losses incurred late last week. The S&P 500 is back in the black for 2015, albeit slightly.

Investors took their cues from the energy markets once again. Oil prices rose for a third day, bouncing back from lows hit earlier in the week, which helped lift the battered energy sector. U.S. crude futures jumped $1.36, or 3.8 percent, to $37.50 a barrel on the New York Mercantile Exchange. Brent crude, which is used to price international oils, added $1.25, or 3.5 percent, to $37.36 a barrel in London. — AP