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

Technology .SPLRCT 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.

“It really sums up kind of what we saw all month and all quarter, another calm day,” said Ryan Detrick, senior market strategist at LPL Financial in Charlotte, North Carolina.

“This is one of the least volatile Septembers in history, it is kind of a continuation of that real dull trading with a nice upward bias.”

For September, the Dow gained 2.1 percent, the S&P rose 1.9 percent and the Nasdaq advanced 1.05 percent.

Facebook's FB.O 1.23-percent gain provided the biggest lift 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.

Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., September 27, 2017. REUTERS/Brendan McDermid

“Rates and equities have priced in the current Fed regime continuing, which is a relatively sanguine path for the economy,” said Shehriyar Antia, chief market strategist at Macro Insight Group in New York.

“Any deviation from that path - or the suggestion that Yellen may not be re-appointed - causes the market to reconsider this presumption and reprice valuations.”

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 showed U.S. 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 Dow Jones Industrial Average .DJI rose 23.89 points, or 0.11 percent, to 22,405.09, the S&P 500 .SPX gained 9.3 points, or 0.37 percent, to 2,519.36 and the Nasdaq Composite .IXIC added 42.51 points, or 0.66 percent, to 6,495.96.

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.

Meat processor Tyson Foods TSN.N jumped 7.64 percent after the company raised its full-year profit forecast. The stock was the biggest gainer on the S&P.

Advancing issues outnumbered declining ones on the NYSE by a 1.50-to-1 ratio; on Nasdaq, a 1.35-to-1 ratio favored advancers.

About 6.01 billion shares changed hands in U.S. exchanges, compared with the 6.25 billion daily average over the last 20 sessions.