The S&P 500 and Dow Jones Industrial Average closed out the day on Thursday just over the line into negative territory as gains by Apple and Amazon were offset by losses in energy and financial shares. Shares of Apple rose 0.8 percent, while those of Amazon were up 0.6 percent.

Tesla shares also fell to a two-day low and wiped out all of the gains fueled by Chief Executive Elon Musk’s recent tweet announcing a plan to take the company private. The stock ended down 4.8 percent.

The S&P 500 was in slightly positive territory most of the day, putting it once again close to the record high it hit Jan. 26. The Nasdaq also neared its all-time high.

The technology sector has been at the center of a sharp recovery since a market rout in February.

Leading sector declines was the S&P energy index, which fell 0.9 percent. Occidental Petroleum fell 4.2 percent after it maintained a tepid production forecast for the year. The S&P financial index was down 0.6 percent.

The largest drag on the S&P 500 was Booking Holdings, which fell 5 percent after it forecast third-quarter profit below expectations.

Rite Aid closed out the day down 11.5 percent after the drug store chain and grocer Albertsons agreed to terminate their merger agreement.

Chip stocks fell after Morgan Stanley downgraded the semiconductor industry.

The latest data pointed to strength in the labor market, underscoring the health of the economy despite ongoing trade tensions. The number of Americans filing for unemployment benefits unexpectedly fell last week, a Labor Department report showed.

Approximately 5.9 billion shares changed hands on the major domestic equity exchanges, as compared to the 6.3 billion share daily average for the past 20 trading days, according to Thomson Reuters data.

Unemployment Claims Fall

For the week ending August 4, the advance figure for seasonally adjusted initial claims was 213,000 claims, a decrease of 6,000 claims from the previous week’s revised level.

The previous week’s level was revised up by 1,000 claims from 218,000 claims to 219,000 claims. The four-week moving average was 214,250 claims, a decrease of 500 claims from the previous week’s revised average. The previous week’s average was revised up by 250 claims from 214,500 claims to 214,750 claims.

The advance seasonally adjusted insured unemployment rate was 1.2 percent for the week ending July 28, unchanged from the previous week’s unrevised rate. The advance number for seasonally adjusted insured unemployment claims during the week ending July 28 was 1,755,000 claims, an increase of 29,000 claims from the previous week’s revised level.

The previous week’s level was revised up 2,000 claims from 1,724,000 claims to 1,726,000 claims. The 4-week moving average was 1,745,250 claims, an increase of 3,000 claims from the previous week’s revised average. The previous week’s average was revised up by 500 claims from 1,741,750 claims to 1,742,250 claims.

Comfort Index Rises To 17-Year High

Consumer sentiment advanced to a 17-year high, elevated by rosier views of the economy and personal finances, the Bloomberg Consumer Comfort Index indicated on Thursday.

The weekly index ended August 5, hit 59.3, its highest point since Feb. 2001, up from 58.6.

Gauge of current views of the economy climbed to a 17-year high of 61.9 from 60.3

Measure of personal finances rose to 66, matching a post-2001 high, from 65.6

Index tracking buying climate increased to 50.1 from 49.9

Confidence continues to strengthen amid a tight labor market and robust economic growth, with consumers also enjoying tailwinds from tax cuts and lower gas prices. Sentiment is strongly correlated to domestic equities, which have rallied back to near-record levels, according to the report.

Still, sentiment remains below late-2000 levels, the last time unemployment was this low, on tepid wage growth and lower labor force participation, responses through Aug. 5 showed.

Comfort among those with a high school degree reached a 17-year high, while sentiment among political independents reached the highest level since January 2001 and exceeded comfort levels among Democrats by 10 points.

Confidence among single Americans increased to a 17-year high but remained below those who are married.

Evans Sees Two More Rate Hikes

The economy is performing “very well” with continued growth clearing the way for one or two more interest rate hikes in 2018, Charles Evans, Chicago Federal Reserve Bank President, said on Thursday.

“It could be one or two more,” following rate increases in April and June, said Evans, who as recently as December dissented against a Fed policy-setting committee decision to raise rates.

He said the economy’s “extremely strong” performance has made him confident now that inflation will stay near or even move slightly above the Fed’s two percent target, while unemployment remains low and GDP growth continues in a range of 2.5 percent to 3 percent at least through next year.

“It is really a very good period of time for the economy and the setting of monetary policy,” Evans said, adding that the Fed was able to move rates slowly higher without evidence yet that it is either restraining growth and employment or risking a takeoff in price increases.

Evans is not a voter this year on the rate-setting committee, but he has been a steady voice against raising rates too high, too quickly, until it was clear inflation would meet the Fed’s goal. Doing so, he said, would risk curbing some business hiring and spending decisions at a time when the employment scars of the 2007-2009 recession were still healing.

Now, “inflation has moved up to two percent essentially. There is good reason to expect we will stay in that area,” neither slipping back as some policymakers have feared, or accelerating in a way that would force the Fed to raise rates more quickly, Evans said.

Evans said debate will intensify next year about a stopping point as the Fed feels its way toward a “neutral” interest rate that is neither encouraging or discouraging spending and investment decisions, and weighs whether inflation risks have become so great that it needs to move even higher and restrain businesses and households.

He said for now the Fed’s current plans seem well-aligned with where the economy is heading. Its employment and inflation goals are essentially met, and there are no imminent risks that appear likely to throw things off course.

“Labor markets are good. Household balance sheets seem like they are fine. Businesses are optimistic … The global economic environment seems to be really quite good,” Evans said.

Even the global trade dispute, which raises the specter of rising tariffs and disrupted world supply chains, has yet to become a big enough problem to change that rosy outlook.

Evans said the trade issue had added an element of uncertainty that may delay some business investment but added that it was being offset by corporate enthusiasm over tax cuts and deregulation, and the Trump administration’s new spending.

“You size up the tariffs, the increases in input costs … and you find that while it sounds like a big number … the actual effect on industry output and GDP is still measured in a few tenths” of a percentage point, Evans said.

“The magnitude still seems to be relatively small, uncertain, against a context where the economy is very strong, and we have just added quite a lot of fiscal stimulus.” “Are there a few headwinds? Yeah. But it feels more like tailwinds.”