US stocks rally on earnings; Dow tops 17,000

Brendan McDermid | Reuters

U.S. stocks rose on Tuesday, with the Dow industrials extending gains into a fourth day and the S&P 500 and Nasdaq Composite higher on the month, as investors embraced corporate earnings, a rise in consumer sentiment and anticipated the end of the Federal Reserve's bond buys.

"We build ourselves a wall of worry and make assumptions about consumers, and they tend to come back and surprise us," said Art Hogan, chief market strategist at Wunderlich Securities.

"If you could pick a time in the year when you want a confident consumer, this is it," added Hogan, referring to the holiday shopping season.

"The consumer remains pretty strong, and large-cap, U.S. stocks are a good place to be," said Sean Lynch, an Omaha-based managing director of global equity strategy & research at Wells Fargo Private Bank.

Amgen (AMGN) jumped after hiking its full-year outlook; T-Mobile US (TMUS) climbed after the wireless carrier increased its estimate for subscribers; Twitter (TWTR) shares fell after the social network matched earnings estimates and beat revenue forecasts, but offered disappointing user metrics; Merck & Co. (MRK) weighed on the Dow, as cost-cutting allowed the pharmaceutical company to beat third-quarter earnings estimates but soft sales of major products hit shares, and International Business Machines (IBM) said its board had approved a $5 billion share buyback in addition to the $1.4 billion still in its existing program.

"Companies are redeploying their cash on share buybacks and dividends have increased 10 percent year-over-year on the S&P. Guidance has been more optimistic. There are a lot of excuses that could have come in this season, whether Ebola or the stronger dollar, yet we haven seen that so much, which is a good sign," said Lynch.

The Federal Open Market Committee concludes a two-day session on Wednesday, with Fed watchers expecting the central bank to remain on its tapering track.

"We're awaiting tomorrow's FOMC announcement, not in what they're going to do, but in terms of what they'll say. I think they'll stress in a big way that if Europe, or the global economy, weakens further, they'll perhaps rethink QE," said Peter Cardillo, chief market economist at Rockwell Global Capital..

The Dow Jones Industrial Average (Dow Jones Global Indexes: .DJI) rose 187.81 points, or 1.1 percent, to 17,005.75, with Caterpillar (CAT) leading blue-chip gains that extended to 27 of 30 components.

The S&P 500 (^GSPC) rose 23.42 points, or 1.1 percent, to 1,985.05, with energy and industrials the best performing and all 10 major sectors advancing.

"Those that missed their entry point of 1,905 on the S&P and then 1,925 are paying what? Just like on the downside when prices are sliding, price is not an object. This is especially so when you are in the last week of a quarter or in this case the last week of a fiscal year for some funds," Elliot Spar, market strategist at Stifel, Nicolaus & Co., emailed in afternoon commentary.

The Nasdaq (^IXIC) added 78.36 points, or 1.8 percent, to 4,564.29.

For every share falling, five gained on the New York Stock Exchange, where almost 798 million shares traded. Composite volume cleared 3.6 billion.

The CBOE Volatility Index (^VIX), one gauge of investor uncertainty, declined more than 10 percent to 14.39.

The U.S. dollar (Exchange:.DXY) declined against the currencies of major trading partners; the yield on the 10-year Treasury note (U.S.:US10Y) used to figure mortgage rates gained 3 basis points to 2.295 percent.

On the New York Mercantile Exchange, crude-oil futures (New York Mercantile Exchange: @CL14Z) for December delivery gained 42 cents, or 0.5 percent, to $81.42 a barrel, and gold futures for December (CEC:Commodities Exchange Centre: @GC14Z) rose 10 cents to $1,229.40 an ounce.

Tuesday's economic reports were mixed, with a gauge of consumer confidence hitting 94.5 in October, versus an 87 estimate, while orders for goods meant to last at least three years unexpectedly declined 1.3 percent in September . A third report had U.S. single-family home prices rising in August on a year-over-year basis but still falling short of expectations .

On Monday, U.S. stocks drifted little changed, after the market's best week of the year, as investors tracked the cost of crude as a proxy for the health of the global economy and sorted through quarterly earnings.

Read More Stocks end little moved as oil back above $80 a barrel

Coming Up This Week:

Wednesday

Earnings: Deutsche Bank, Visa, Kraft Foods, Fiat Chrysler, Allstate, Statoil, Total, Range Resources, Murphy Oil, Suncor, Ralph Lauren, Nintendo, Phillips 66, Questar, Akamai, Hyatt, McGraw-Hill Financial, Wellpoint Health, Hershey, Hess, Praxair, Agnico Eagle Mines, RF Micro,Dreamworks Animation, F5 Networks, MetLife, Baidu, Flextronics, Williams Cos, Shutterfly, Southern Co, Automatic Data, Carlyle Group, Boaz Allen

7:00 a.m.: Mortgage applications

10:30 a.m.: EIA oil inventories

1:00 p.m.: $35 billion 5-year auction

2:00 p.m.: FOMC statement

Thursday

Earnings: Royal Dutch Shell, Samsung Electronics, ConocoPhillips,Kellogg, Mosaic, Microchip Tech, Expedia, Crown Castle, Eastman Chemical, Boston Beer, Newmont Mining, Mohawk, Tesoro, Groupon,LinkedIn, Teva, Altria, Starbucks, Johnson Controls, New York Times, Eni, Fortress Investments, Starz, GNC Holdings, LPL Financial, Old Dominion Freight Line, CME Group, Public Storage, Time Warner Cable

8:30 a.m.: Weekly jobless claims

830 a.m.: Q3 real GDP

9:00 a.m.: Fed Chair Janet Yellen makes welcoming remarkets at Fed conference in Washington, No Q&A

1:00 p.m.: $29 billion 7-year note auction

Friday

Earnings: Exxon Mobil, Chevron, Sony, A-B InBev, AbbVie, Clorox, BNP Paribas, Madison Square Garden, Pinnacle West, Newell Rubbermaid, Rockwell Collins, NextEra Energy, Charter Communications, Legg Mason, CBOE Holdings, Weyerhaeuser, Teco Energy, Dominion

8:30 a.m.: Personal income and spending

8:30 a.m.: Employment cost index

9:45 a.m.: Chicago PMI

9:55 a.m.: Consumer sentiment

More From CNBC.com: