Stocks rose on Friday as investors cheered strong quarterly earnings from Intel along with apparent progress on the U.S.-China trade front.
The S&P 500 climbed 0.4% to 3,022.53 and briefly traded above its record closing high. The broad index also came within inches of its intraday all-time high. The tech sector closed at a record high, rising more than 1% on Friday.
"If higher rates in 2018 and the worsening of the Trade War caused weaker economic data in 2019, so too should much lower rates and softening of rhetoric help the economy and EPS," Tony Dwyer, chief market strategist at Canaccord Genuity, wrote in a note.
Intel shares jumped 8.1% after the chipmaker's results topped analyst expectations. Intel also issued better-than-expected guidance for the fourth quarter.
Amazon, meanwhile, posted weaker-than-expected earnings. The e-commerce giant also issued disappointing guidance for the holiday season.
"Margin concerns have shifted from only around the 1-Day push previously, now to AWS, which posted its lowest OM in two years," Credit Suisse analyst Stephen Ju said in a note. "These moves will no doubt put Amazon in a tremendous competitive position, but we think waiting to later innings to buy the dip makes sense."
Amazon shares initially fell 4.8% but later recovered to close 1.1% lower, helping the broader market's rise.
Other companies reporting quarterly numbers this week included Visa and Verizon. Visa posted revenue and profit that topped estimates, lifting the stock by 1%. Verizon, meanwhile, dipped 0.4%.
Those results followed a mixed batch of reports from companies such as Microsoft, Tesla, 3M and Twitter. Microsoft and Tesla rose Thursday on better-than-expected results. However, 3M and Twitter slid on the back of their reports.
More than 38% of S&P 500 companies posted quarter earnings for the third quarter thus far, according to FactSet. Of those companies, 78% have beaten analyst expectations. This week was one of the busiest of the earnings season, with more than 120 companies reporting.
Markets also got a boost from trade optimism. The U.S. Trade Representative said China and the U.S. were close to finalizing parts of a phase one trade deal.
The major averages were headed for weekly gains. The Dow was up 0.8% for the week. Meanwhile, the S&P 500 and Nasdaq were up 1.3% and 1.8%, respectively.
"There hasn't been a lot of macro-related news. You've had earnings specific things and the Fed is next week," said Willie Delwiche, investment strategist at Baird. "But if you step back and look at what's happened to the S&P 500, earlier in the month it had a chance to break down, and it didn't. The first step of improving is not deteriorating, and that's what that was."
On the data front, consumer sentiment dipped slightly in October to 95.5, according to the University of Michigan's Surveys of Consumers. That's down from a preliminary reading of 96, but above a final September print of 93.2.
—CNBC's Silvia Amaro contributed to this report.