The major domestic equity indexes chalked up some nice gains on Monday, as they ended the day near session highs due in part to sustained optimism on the prospects for U.S.-China trade relations.

The S&P 500 index and the Nasdaq both closed above their 100-day moving averages for the first time since October. Shares of Apple Inc and Microsoft Corp each rose 2.7 percent and were the top boosts to the benchmark S&P 500 index and the Nasdaq. Apple and Microsoft’s gains helped S&P 500 technology stocks gain 1.6 percent, the greatest rise among the benchmark index’s major sectors.

High expectations for Alphabet’s quarterly results were likely a contributor to tech and internet stocks’ advance during market hours. Yet in after-hours trading, Alphabet fell more than 2 percent. While its fourth-quarter revenue and profit exceeded consensus projections, spending grew more than expected.

FAANG earnings have been a mixed bag. Shares of Apple and Facebook Inc rose after those companies’ quarterly results, while downbeat forecasts from Netflix and Amazon dragged down the share prices of those companies.

S&P 500 industrial stocks, another trade-sensitive group, posted the second-highest percentage gain among sectors, advancing 1.3 percent.

After having dropped nearly 20 percent below its record Sept. 20 close, the S&P 500 index is now less than 8 percent away from reaching that level. The reasons for the increases include the Fed’s resolve to be “patient” with further interest rate hikes in addition to signs of progress in U.S.-China trade talks.

Earnings season has also been relatively positive. About 71 percent of the S&P 500 companies that have reported so far have exceeded consensus estimates, according to IBES data from Refinitiv.

Analyst estimates for fourth-quarter earnings growth are now at 15.4 percent. The profit growth forecast for the first quarter of 2019, however, is 0.5 percent.

Allergan was down 3.8 percent after the FDA approved Evolus’s cheaper version of Botox. Evolus was up 11.8 percent.

Shares of Ultimate Software Group rose 19.7 percent after the HR software company announced that it had agreed to be acquired in a deal valued at about $11 billion.

Approximately 6.52 billion shares changed hands on the major domestic equity exchanges on Monday, as compared to the 7.62 billion share average over the past 20 trading days.

Factory Orders Fall

New orders for factory goods fell unexpectedly in November, amid sharp declines in demand for machinery and electrical equipment, suggesting a slowdown in manufacturing as 2018 ended.

According to a report by the Commerce Department, orders fell 0.6 percent, the after an unrevised 2.1 percent decline last October. The release of the report was delayed by a recently ended five-week partial shutdown of the federal government.

A survey from the Institute for Supply Management published last Friday suggested manufacturing activity picked up at the start of the year, driven by a sharp rebound in orders in January. However, some manufacturers continued to complain that tariffs on steel imports were pushing up prices of raw materials.

In November orders for machinery fell 1.7 percent after gaining 0.2 percent in October. There were large declines in orders for industrial and metalworking machinery, as well as ventilation, heating, air-conditioning and refrigeration equipment.

Orders for electrical equipment, appliances and components dropped 1.1 percent after rising 1.0 percent in October. But orders for transportation equipment rebounded 3.0 percent after plunging 12.4 percent in October.

Orders for civilian aircraft and parts rose 6.9 percent in November. Motor vehicles and parts orders edged up 0.1 percent.

The Commerce Department reported that November orders for non-defense capital goods excluding aircraft, which are a measure of business spending plans on equipment, fell 0.6 percent as reported in December. Orders for these so-called core capital goods increased 0.5 percent in October.

Shipments of core capital goods, which are used to calculate business equipment spending in the gross domestic product report, slipped 0.2 percent in November instead of the previously reported 0.1 percent dip. Core capital goods shipments jumped 0.8 percent in October.