Wall Street moved slightly higher on gains in technology and energy shares, while oil rebounded from a steep sell-off as government data pointed to strong demand.

The S&P 500 index ended higher after falling 3.5 percent over the previous two sessions, but a strong rebound gave way to a selloff late in the session that left gains in modest territory. The Dow Industrials ended little changed in thin trading volume a day ahead of the U.S. Thanksgiving holiday.

Amazon, Alphabet and Facebook rose more than 1 percent. Energy advanced with a rise in oil prices.

Crude oil prices rose after data indicated strong demand for gasoline and diesel, though concerns over rising crude supply remained. Crude prices on Tuesday sank to one-year lows. Brent crude futures were up at 95 cents, or 1.52 percent, at $63.48 a barrel. Domestic West Texas Intermediate crude futures were up at $1.20, or 2.25 percent, at $54.63 a barrel.

The equity markets also found support on speculation that the Federal Reserve could ease up on its path of interest-rate hikes. In other words, the Fed may pause its rate increases as early as spring 2019.

U.S. stock and bond markets will be closed on Thursday for the Thanksgiving holiday and open for a half-day on Friday.

Day’s Economic Data

New orders for capital goods were unexpectedly unchanged in October and shipments rebounded modestly, which could temper expectations of an acceleration in business spending on equipment early in the fourth quarter.

While other data on Wednesday showed home resales rising last month after six straight monthly declines, home purchases remained sharply down this year. Sluggish business spending on equipment together with a lackluster housing market could stoke fears that higher interest rates are hurting the economy.

There was also disappointing news on the labor market. The number of Americans filing applications for unemployment benefits rose to more than a four-month high last week.

The Commerce Department said the flat reading in orders for non-defense capital goods excluding aircraft, a closely watched proxy for business spending plans, followed a downwardly revised 0.5 percent drop in September. These so-called core capital goods orders were previously reported to have dipped 0.1 percent in September.

Last month, there were declines in orders for primary metals and machinery. That offset increases in orders for fabricated metal products, computers and electronic products, as well as electrical equipment, appliances and components.

Core capital goods orders increased 6.4 percent on a year-on-year basis. Shipments of core capital goods rose 0.3 percent in October after a downwardly revised 0.2 percent drop in the prior month. Core capital goods shipments are used to calculate equipment spending in the government’s gross domestic product measurement.

They were previously reported to have slipped 0.1 percent in September. Business spending on equipment stalled in the third quarter and is faltering despite the Trump administration’s $1.5 trillion tax cut.

Some companies including Apple used their tax windfall to buy back shares on a massive scale. Spending on equipment could also be undercut by declining oil prices. Brent crude has dropped about 28 percent since early October amid rising concerns about slowing global growth.

In a separate report on Wednesday, the National Association of Realtors said existing home sales rose 1.4 percent to a seasonally adjusted annual rate of 5.22 million units last month. Sales, however, were 5.1 percent lower than in October 2017, the sharpest 12-month drop since July 2014.

The raft of tepid economic data, a sharp stock market selloff and signs of slowing global growth likely will put the Federal Reserve under the spotlight. Officials at the U.S. central bank have recently started talking about headwinds to domestic growth. The Fed is expected to raise interest rates in December for the fourth time this year.

Lack of growth in core capital goods orders in October suggests that shipments of these goods could drop in November, posing a downside risk to GDP estimates for the fourth quarter.

A third report on Wednesday from the Labor Department showed initial claims for state unemployment benefits increased 3,000 claims to a seasonally adjusted 224,000 claims for the week ended Nov. 17, the highest level since the end of June.

Data for the prior week was revised to show 5,000 more applications received than previously reported. Economists had forecast claims slipping to 215,000 in the latest week. The four-week moving average of initial claims, considered a better measure of labor market trends as it irons out week-to-week volatility, rose 2,000 to 218,500 last week.

The claims data covered the survey period for the nonfarm payroll component of November’s employment report. The four-week average of claims rose by 6,750 between the October and November survey weeks, suggesting some moderation in job growth this month.

Payrolls increased by 250,000 jobs in October, with the unemployment rate holding near a 49-year low of 3.7 percent.