The S&P 500 and the Nasdaq extended a rally on Thursday as strong earnings from Facebook Inc added to optimism after the Federal Reserve's dovish remarks, while investors waited for the outcome of U.S.-China trade talks. Facebook jumped 11.58 percent, on track for its best day since January 2016 after its quarterly profit topped expectations and showed that advertisers were still flocking to the social network even after a series of high profile embarrassments. General Electric Co soared 12.97 percent after the industrial conglomerate beat estimates for quarterly sales and cash flow and said it sees industrial revenue rising modestly in 2019. Investors took heart from the Fed's pledge on Wednesday that it would be patient in raising interest rates further this year, easing concerns about tightening financial conditions crimping economic growth. Up nearly 8 percent year to date, the S&P 500 is on track to post its best monthly performance since October 2015. Of the 210 S&P 500 companies that have reported fourth-quarter results, 71 percent have topped profit estimates, according to Refinitiv data. Investors were awaiting the conclusion of the high-level talks between the United States and China, aimed at easing a six-month-old trade war that has battered financial markets. U.S. President Donald Trump expressed optimism about the trade talks, but said no final deal would be made until he meets with Chinese President Xi Jinping in the near future. At 2:18 p.m. ET, the Dow Jones Industrial Average was down 0.22 percent at 24,958.58 points, while the S&P 500 had gained 0.72 percent to 2,700.5. The Nasdaq Composite added 1.31 percent to 7,277.26. The S&P communications services sector surged 3.76 percent, leading gains among the 11 major S&P sectors, thanks to Facebook, Alphabet and Charter Communications Inc . Charter jumped 14 percent after topping quarterly revenue estimates as the cable operator attracted more customers for its internet services. The Dow was dragged down by losses in DowDuPont Inc , which fell 8.43 percent after the chemical maker's revenue fell short of expectations. The S&P materials sector dropped 1.53 percent. Microsoft Corp declined 1.65 percent after its Azure cloud computing sales grew at a slower pace than a year earlier, although its quarterly results and forecast topped Wall Street estimates. Intel Corp slipped 1.12 percent after the chipmaker named interim Chief Executive Officer Robert Swan to the role on a permanent basis. Advancing issues outnumbered declining ones on the NYSE by a 2.42-to-1 ratio; on Nasdaq, a 1.77-to-1 ratio favored advancers. The S&P 500 posted 24 new 52-week highs and no new lows; the Nasdaq Composite recorded 40 new highs and 19 new lows.