By Matt Jarzemsky 

U.S. stocks edged mostly lower as investors weighed remarks by Federal Reserve Chairwoman Janet Yellen and signs of escalating tension in Ukraine.

The Dow Jones Industrial Average slid 19 points, or 0.1%, to 17021 in midday trading, recovering from a drop of as much as 55 points.

The S&P 500 slipped three points, or 0.1%, to 1990, after closing at a record Thursday. The Nasdaq Composite Index gained six points, or 0.1%, to 4539.

Stocks wavered in a tight range after a transcript of Ms. Yellen's speech was released at 10 a.m. EDT. Investors are examining her remarks for hints as to when the Fed might raise interest rates, reversing an easy-money policy widely seen to have added fuel to stocks' rally, traders said.

The timing of an eventual rise in rates, which could dull the appeal of stocks' dividends versus bond yields, is among the biggest questions facing market participants.

Meanwhile, bulls are pointing to the latest round of corporate profits topping Wall Street's predictions and inflows of investor cash into funds holding U.S. stocks this year, particularly exchange-traded funds. U.S. stock funds, including ETFs, brought in a net $7.12 billion in the week ended Wednesday, according to Lipper.

"People have really taken Yellen as being not as dovish as expected," said Nick Lawson, global co-head of macro products and sales at Deutsche Bank AG. But he added, "the equity market is resilient. Unless there was something super hawkish or going against what she said before, there is a 'bid' " to buy stocks.

U.S. Treasury bonds, meanwhile, pulled back as analysts said the comments disappointed bond investors who had expected Ms. Yellen to highlight significant slack in the labor market. Selling in the U.S. 10-year Treasury note pushed its yield up to 2.419%. Bond yields move inversely to prices.

Ms. Yellen spoke at an annual Federal Reserve conference in Jackson Hole, Wyo. Others due to speak include European Central Bank President Mario Draghi, scheduled to appear at 2:30 EDT.

Meanwhile, simmering tension between Russia and Ukraine put traders on edge. Ukraine said Russian trucks crossed into Ukrainian rebel-held territory without being accompanied by the Red Cross in violation of an agreement between the two countries. Russia said the trucks were filled with humanitarian aid supplies.

Stocks briefly fell to session lows after the North Atlantic Treaty Organization condemned the convoy's entry into Ukraine.

Despite the central-bank and geopolitical drama, traders said it was a quiet day at the office. Stock-trading activity has been in the summer doldrums this week, with Thursday showing the lowest volume of any non-holiday session year-to-date.

"Low overall volumes have limited the ability for large institutional orders to be filled, hence the flat market," said J.T. Cacciabaudo, head of equity trading at brokerage firm Sterne Agee.

Elsewhere in global markets, the Stoxx Europe 600 dropped 0.3%.

Gold futures gained 0.5% to $1,281.30 an ounce and crude-oil futures slid 0.9% to $93.10 a barrel.

In corporate news, Dynegy jumped 8.6% after agreeing to a $6.25 billion purchase of coal and gas generation assets from Duke Energy and Energy Capital Partners, a deal that would nearly double the buyer's power generation capacity. Duke's shares edged down 0.4%.

Foot Locker added 3% after the company's quarterly earnings and sales topped analysts' forecasts

Min Zeng contributed to this article.

Write to Matt Jarzemsky at matthew.jarzemsky@wsj.com