Energy companies led U.S. stocks to modest gains Wednesday as the market recouped some of its hefty losses from the day before.
Big retailers and health care companies also helped lift the market, which was coming off its worst day in almost three weeks. Utilities and phone companies were the biggest laggards. Some travel booking companies and airlines also fell.
The Standard & Poor’s 500 index rose 7.69 points, or 0.3 percent, to 2,465.54. The Dow Jones industrial average added 54.33 points, or 0.3 percent, to 21,807.64. The Nasdaq composite gained 17.74 points, or 0.3 percent, to 6,393.31. The Russell 2000 index of smaller-company stocks picked up 2 points, or 0.2 percent, to 1,402.20.
The stock indexes are on pace to end the week lower, but are holding on to gains for the year. The S&P 500 and Dow are up just over 10 percent. The Nasdaq is up 18.8 percent, while the Russell 2000 has gained 3.3 percent.
The market veered higher from the start of regular trading Wednesday and held its course through much of the day bolstered by news that President Trump has agreed to a plan to fund the government and raise the nation’s debt limit for three months.
A day after spiking more than 20 percent, the VIX, a measure of how much volatility investors expect in stocks, fell nearly 5 percent on Wednesday. And bond yields, which fell sharply a day earlier, rebounded modestly. The yield on the 10-year Treasury note rose to 2.10 percent from 2.06 percent late Tuesday.
Gold, which climbed Tuesday to the highest level in more than a year, fell $5.50 to $1,339 an ounce Wednesday.
Rising oil prices helped boost energy stocks. Helmerich & Payne rose $2.58, or 5.9 percent, to $46.35. Marathon Oil added 44 cents, or 3.9 percent, to $11.73.
All told, benchmark U.S. crude gained 50 cents, or 1 percent, to settle at $49.16 a barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, rose 82 cents, or 1.5 percent, to $54.20 a barrel in London.
Investors also bid up shares in several big retailers.
Gap shares surged 7.4 percent after the apparel retailer said it will shift its focus to its growing brands Old Navy and Athleta, and away from the Gap and Banana Republic. The company said that it will close about 200 Gap and Banana Republic stores in the next three years and open about 270 Old Navy and Athleta stores during the same period. The stock added $1.79 to $25.82. Macy’s shares also got a boost, adding $1.16, or 5.5 percent, to $22.17.
Kohl’s climbed 4.9 percent after the chain said it will open Amazon shops in 10 of its stores. Kohl’s shares gained $1.98 to $42.37.
The dollar rose to 109.37 yen from 108.66 yen Tuesday. The euro fell to $1.1913 from $1.1918.
In other energy trading, wholesale gasoline dipped 3 cents to $1.67 a gallon. Heating oil rose a penny to $1.76 a gallon. Natural added 3 cents to $3 per 1,000 cubic feet.
Among other metals, silver shed 3 cents to $17.91 an ounce, while copper gained 2 cents to $3.15 a pound.
Global stock markets were mixed. In Europe, Germany’s DAX gained 0.7 percent, while France’s CAC 40 rose 0.3 percent. The FTSE 100 index of leading British shares fell 0.3 percent.
Earlier in Asia, Japan’s Nikkei 225 slipped 0.1 percent and South Korea’s Kospi lost 0.3 percent. Hong Kong’s Hang Seng index fell 0.5 percent.