The S&P 500 and the Nasdaq advanced to record levels on Friday, lifted by advances in technology stocks, while each of the major indexes closed out the quarter with solid gains.

The technology index was the best performing of the major S&P sectors, up 0.75 percent, its fourth straight day of gains to recover from a selloff earlier in the week.

The S&P and Nasdaq closed at records for the third straight day and the benchmark S&P index posted its sixth straight month of gains.

For September, the Dow Jones Industrial Average gained 2.1 percent, the S&P 500 index rose 1.9 percent and the Nasdaq was up 1.05 percent.

Facebook’s 1.23-percent gain provided the largest boost to both the Nasdaq and the S&P to help pace the advance.

Financials received a brief lift and hit their session high after reports President Donald Trump’s met with former Federal Reserve Governor Kevin Warsh to discuss his potential nomination as Fed chairman. The sector was up 0.34 percent.

Trump later said he has had four meetings in his search for a new chairman of the Federal Reserve Board and will decide in two or three weeks.

Rising expectations for another interest rate hike by the year-end and Trump’s tax-cut plan have dominated markets for most of the week.

Data on Friday indicated that consumer spending barely rose in August but the report did little to change expectations that the central bank would raise interest rates again in December.

Another report showed the Chicago purchasing management index, which gauges factory activity, came in better than expected for September.

The S&P and the Dow recorded eight straight quarters of gains, the Nasdaq five. The Dow climbed 4.9 percent for the third quarter, the S&P advanced 4 percent and the Nasdaq gained 5.8 percent.

Tyson Foods rose 7.64 percent after the company raised its full-year earnings forecast. The stock was the best performer on the S&P 500.

Approximately 6.01 billion shares changed hands on the major domestic equity exchanges, as compared to the 6.25 billion share daily average over the past 20 trading sessions.

The Day’s Economic Data

Consumer spending was virtually unchanged during August as Hurricane Harvey weighed on auto sales, while annual inflation increased at its slowest pace in nearly two years, pointing to a moderation in economic growth in the third quarter.

The weak report from the Commerce Department on Friday did little to change expectations that the Federal Reserve would raise interest rates in December. Fed Chair Janet Yellen said this week the Fed needed to continue gradual rate hikes despite uncertainty about the path of inflation.

Consumer spending, which accounts for more than two-thirds of all domestic economic activity, showed a gain of 0.1 percent last month as unseasonably mild temperatures in some parts of the country reduced demand for utilities. The gain, which followed a 0.3 percent increase in July, was in line with economists’ expectations. The government said the data reflected the effects of Hurricane Harvey.

However, it could not separately quantify the total impact of Harvey on the data. The government adjusted estimates where source data were not yet available or did not fully reflect the effects of the storm.

The report was the latest suggestion that Harvey, together with Hurricane Irma, would dent economic growth in the third quarter. The economy grew at a brisk 3.1 percent annualized rate in the second quarter, with consumers doing the heavy lifting.

Harvey, which tore through Texas in late August, has undercut industrial production, homebuilding and home sales. Further declines are expected after Irma slammed Florida in early September.

Inflation remained muted in August, with the personal consumption expenditures (PCE) price index excluding food and energy rising 0.1 percent. The so-called core PCE has advanced by the same margin for four straight months.

As a result, the annual increase in the core PCE price index slowed to 1.3 percent in August after advancing 1.4 percent in July. That was the smallest year-on-year increase since November 2015. The core PCE is the Fed’s preferred inflation measure and has been undershooting its 2 percent target since 2012.

The financial markets are pricing a roughly 76 percent probability of an interest rate hike in December, according to the CME FedWatch tool.

When adjusted for inflation, consumer spending slipped 0.1 percent in August, the first drop since January.

The storms could slice off as much as six-tenths of a percentage point from third-quarter GDP growth. The Atlanta Fed is forecasting the economy growing at a 2.3 percent rate in the July-September quarter. At the same time there will be an increase in output during the fourth quarter as communities ravaged by the hurricanes rebuild.

Segments of the economy not impacted by the storms are pulling ahead. In a separate report on Friday, the Institute for Supply Management Chicago said its MNI Chicago business barometer rose to a reading of 65.2 this month from 58.9 in August. The second-highest reading in more than three years partly reflected a jump in order backlogs to a 29-year high.

A third report showed consumer sentiment holding at lofty levels this month. That offers hope that consumer spending will accelerate in the coming months, though sluggish wage growth remains a concern.

Consumer spending in August was held back by a 1.1 percent decline in outlays on long-lasting manufactured goods. The Commerce Department said spending on new motor vehicles was the leading contributor to the drop in the so-called durable goods.

Auto manufacturers reported that Hurricane Harvey had impacted on sales in the last week of August.

Healthcare spending increased services outlays, which rose 0.3 percent in August.

Harvey also probably impacted on income in August. Personal income rose 0.2 percent last month after increasing 0.3 percent in July. Wages were unchanged after climbing 0.5 percent in July.

With wages stagnant, consumers dipped into savings to fund spending. Savings fell to an eight-month low of $522.9 billion in August from $524.8 billion in the prior month.