US stocks rise; best August in 14 years for S&P 500

U.S. stocks rose on Friday, lifting the S&P 500 to another record finish, as investors welcomed a better-than-expected read on U.S. consumer confidence and bypassed geopolitical worries.

"The bullish sentiment continues to build; August started out as an ugly month, but will close out with real gains," said Peter Cardillo, chief market economist at Rockwell Global Capital.

"September may have a technical pullback, or a cooling off period," said Cardillo, referring to the market's oversold conditions.

Tesla Motors rose to a record after the electric-car maker said it would join Chinese mobile carrier China Unicom to construct charging stations across China; Apple advanced after the Financial Times reported the consumer technology company was working with Dutch chipmaker NXP to enable pay-by-touch capabilities to its smartphone; Google said it would develop drones to deliver goods, following, and The Wall Street Journal reported Johnson & Johnson would look for an acquirer for its medical-device making unit, valued at as much as $2 billion.

Read MoreMidday movers: Apple, Big Lots, Tesla Motors & more

The Thomson Reuters/University of Michigan's final take on consumer sentiment rose to 82.5 in August from 81.8 the month before.

Ahead of the open, stock-index futures trimmed gains after consumer spending unexpectedly declined in July, off 0.1 percent after rising 0.4 percent the month before, the Commerce Department said.

Data from overseas had euro-zone inflation declining to a five-year low this month, with consumer costs in the 18 nations that use the euro climbing 0.3 percent year-on-year last month, the European Union's statistics office Eurostat reported.

"The U.S. economy continues to show strength, and deflation in Europe is getting worse, and spreading through the euro zone, as we saw in CPI numbers today, which brings us back to the fact that sooner or later (European Central Bank President Mario) Draghi is going to have to use some sort of quantitative easing. That's a positive, also for U.S. stocks," said Cardillo.

"The drug effect of liquidity in the marketplace continues to be the positive factor," Cardillo added.

S&P 500

Trading in a 75-point range on either side of neutral, the Dow Jones Industrial Average rose 18.88 points, or 0.1 percent, to 17,098.45, gaining 0.6 percent for the week and 3.2 percent in August.

Up 0.8 percent from a week ago and 3.8 percent for the month, the S&P 500 rose 6.63 points, or 0.3 percent, to 2003.37, with financials the best performing and industrials faring the worst of its 10 major industry groups.

The CBOE Volatility Index, a measure of investor uncertainty, dropped 0.6 percent to 11.98.

The Nasdaq gained 22.58 points, or 0.5 percent, to 4,580.27, up 0.9 percent for the week and 4.8 percent for August.

For every stock that fell, more than two rose on the New York Stock Exchange, where almost 617 million shares traded. Composite volume neared 2.3 billion shares.

The light trading volume seen all week continued Friday.

NYSE New York Stock Exchange traders markets
Brendan McDermid | Reuters

U.K. Home Secretary Theresa May said the government was hiking the terror threat level to severe, based on intelligence from Iraq and Syria.

"A terrorist attack is highly likely, but there is no intelligence to suggest that an attack is imminent," May said in a statement.

Stocks briefly erased the bulk of their opening gains as British Prime Minister David Cameron made a televised statement about the situation.

"Sooner or later it will have an impact, but for now it doesn't seem investors are worried about the Ukraine-Russian situation, or the continuing Middle East problems," said Cardillo.

Wall Street also tracked the situation between Russia and Ukraine, with fighting between separatists and government forces reportedly intensifying and NATO releasing satellite images of Russian troop movements in eastern Ukraine, a claim dismissed by Russia.

The European Union and United States are warned of additional sanctions against Russia, even as the EU started discussions in Moscow on Friday targeting an interim agreement with Ukraine to restart natural-gas flows.

Read MoreRussia-Ukraine: Wall Street bets on limited impact

The yield on the 10-year Treasury note used in figuring mortgage rates and other consumer loans rose a basis point at 2.343 percent, and the dollar edged higher against the currencies of major U.S. trading partners.

On the New York Mercantile Exchange, dollar-denominated commodities were mixed, with crude-oil futures rising $1.41 cents to $95.96 a barrel; gold futures for December delivery lost $3.00, or 0.3 percent, to $1,287.40 an ounce.

U.S. stocks declined on Thursday, pulling the S&P 500 back below 2,000, as concerns about Ukraine overtook upbeat reports on the U.S. economy and the labor market.

Read MoreS&P 500 halts three-day win streak