The Dow Jones Industrial Average's rocked triple-digit gains on Tuesday for the first time in three weeks, settling within 90 points of its 20,000 milestone.

The Dow rose 0.57%, or by 112 points, to 19,912 on Tuesday. The S&P 500 and Nasdaq closed at fresh records after rising 0.66% and 0.86%, respectively. The S&P 500 finished at 2,280 and the Nasdaq ended the day at 5,600.

Positive earnings from the likes of DuPont (DD) - Get Report and Alibaba (BABA) - Get Report  were the main drivers of gains for Wall Street on Tuesday. So far, less than one-fifth of S&P 500 companies have reported earnings. Average earnings for the S&P 500 in the fourth quarter are expected to increase 6.3% from the same period a year earlier, according to Thomson Reuters.

DuPont beat fourth-quarter earnings Tuesday but cautioned that its merger with Dow Chemical (DOW) - Get Report would hit earnings in the first three months of the year. Adjusted earnings for its December-ended quarter came in at 51 cents a share, far better than a loss of 26 cents in the year-ago quarter and above forecasts of 41 cents a share in profit. Revenue fell 2% to $5.2 billion on lower volumes.

DuPont said it anticipates its merger with Dow to close in the first half of 2017, though regulatory approval is still required. First-quarter earnings will likely include a charge of 15 cents a share for "transaction costs associated with the planned merger with Dow," the company said.

DuPont shares rose 4% on Tuesday.

Dow Chemical is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells DOW? Learn more now.

Alibaba topped analysts' estimates in its third quarter on strength in its digital media and entertainment units. The Chinese e-commerce giant reported a 54% surge in sales to $7.7 billion in its third quarter, better than an anticipated $7.3 billion in sales. Adjusted earnings of $1.30 a share were as expected. Digital media and entertainment revenue rocketed 273% higher, while cloud-computing revenue climbed 115%.

Basic materials and industrials stocks rallied after DuPont's better-than-expected quarter. BHP Billiton (BHP) - Get Report , Rio Tinto (RIO) - Get Report , Dow Chemical, and Vale (VALE) - Get Report led materials stocks higher. The Materials Select Sector SPDR ETF (XLB) - Get Report rose more than 2%, while the Industrial Select Sector SPDR ETF (XLI) - Get Report added 1%.

In tech, Intel (INTC) - Get Report , IBM (IBM) - Get Report , Taiwan Semiconductor (TSM) - Get Report , Cisco (CSCO) - Get Report and Broadcom (AVGO) - Get Report each climbed. The Technology Select Sector SPDR ETF (XLK) - Get Report inched 0.64% higher.

Lockheed Martin (LMT) - Get Report declined nearly 2% after issuing a weaker-than-forecast outlook for profit over fiscal 2017. The defense company targets full-year earnings of $12.25 to $12.55 a share, below estimates of $12.88 a share. A sales range of $49.4 billion to $50.6 billion was in line with estimates of $49.5 billion. Lockheed did manage to top profit and sales estimates over its fourth quarter.

3M (MMM) - Get Report reported better-than-expected profit and sales over its recent quarter, thanks to growth in its industrial segment. Profit of $1.88 a share compared to $1.66 a share in the year-ago quarter and beat estimates by a penny. Revenue increased 0.4% to $7.33 billion, in line with estimates. Sales in its industrial segment rose 3% to $2.5 billion.

Yahoo! (YHOO) rose 3% Tuesday after the Internet company posted stronger-than-expected fourth-quarter earnings and sales. Adjusted earnings of 25 cents a share beat estimates by 4 cents. Revenue of $1.47 billion exceeded estimates of $1.3 billion. Yahoo! also provided an update on its pending $4.8 billion acquisition by Verizon (VZ) - Get Report , noting that it now expects the deal to close in the second quarter of 2017, rather than the first quarter of this year. The deal has hung in the balance since a string of recent account breaches which are estimated to have affected more than 1 billion user accounts.

Meanwhile, Verizon missed fourth-quarter earnings forecasts in its recent quarter, the first reporting period under new Chief Financial Officer Matthew Ellis, who took the role in November. The telecom earned 86 cents a share over the quarter, 3 cents below estimates. Revenue of $32.34 billion came in above consensus of $32.11 billion. Verizon sees little sales growth over this year, noting that revenue will stay "fairly consistent" with 2016.

Kimberly-Clark (KMB) - Get Report missed fourth-quarter estimates, while sales growth plateaued. The consumer goods company earned $1.40 a share, up from 91 cents in the year-ago quarter but 2 cents short of estimates. Sales of $4.5 billion were unchanged and missed consensus of $4.6 billion. Kimberly-Clark said it sees sales growth in 2017 similar to 2016 and warned that it expected a "continued difficult environment" this year. Multinationals such as Kimberly-Clark have struggled with a strong U.S. dollar, which makes sales accrued overseas less profitable when exchanging currency.

Another multinational, Johnson& Johnson (JNJ) - Get Report , also guided for a weaker full year than anticipated. Earnings for the full year are expected to come in between $6.93 and $7.08 a share on revenue of $74.1 billion to $74.8 billion. Analysts anticipated earnings of $7.11 a share on $75.1 billion in sales. For its December quarter, adjusted earnings of $1.58 a share came in 2 cents above estimates. Revenue increased 1.7% to $18.12 billion, driven by growth in its pharmaceutical unit.

Travelers (TRV) - Get Report fell despite beating estimates on its top- and bottom-lines. The company earned an adjusted $3.20 a share over the recent quarter, breezing past estimates of $2.80. Revenue climbed to $7.19 billion from $6.68 billion and beat forecasts of $6.07 billion.

Automakers moved higher on Tuesday after top CEOs met with President Donald Trump. Trump told General Motors (GM) - Get Report CEO Mary Barra, Ford (F) - Get Report CEO Mark Fields and Fiat Chrysler (FCAU) - Get Report CEO Sergio Marchionne he intended to boost production in the industry to secure higher U.S. employment. During his election campaign, Trump criticized Ford for its plans to move production to Mexico, and since winning the election has threatened on Twitter to impose significant tariffs on imported vehicles. He also promised tax advantages to companies that produce products domestically.

Also on Tuesday, Trump signed executive orders on the Keystone and Dakota Access pipelines, unraveling progress former President Barack Obama had made on the issue. Obama denied a State Department permit on the Keystone pipeline in November 2015. Protests in late 2016 also brought the contentious issue back into the spotlight.

Existing home sales in December fell, though closed out the best year in a decade, the National Association of Realtors said Tuesday. Sales of previously owned homes in December fell 2.8% from November, resting at a seasonally adjusted annual pace of 5.49 million. Existing home sales in November sat at a nine-year high. Inventory continued to tighten in December, ending the month with 1.65 million homes available for sales, its lowest since 1999.