One of the Fed chief's comments that markets latched on to was her view that the USA central bank would not need to raise rates "all that much further" to reach current low estimates of the "neutral" funds rate. Additionally, strong trade data out of China boosted the Australian dollar against its United States counterpart. The Russell 2000 index of smaller-company stocks inched up 1.34 points, or 0.1 percent, to 1,425.66. The data likely will keep the Fed on track for a third interest rate increase this year. The U.S. dollar strengthened against the yen on Thursday as the greenback turned higher after upbeat USA economic data, even as investors wagered that policy tightening in the United States would be glacial at best. Sterling was up 0.46 percent on the day at $1.2925.
The dollar was little changed against a group of peers early on Friday, as currency investors remained cautious ahead of US inflation data due later in the session, which is expected to set the greenback's near-term direction.
The Canadian dollar notched its biggest percentage gain since March 2016 and was last trading near one-year peaks at C$1.2726.
Yellen's comments have made tomorrow's release of monthly inflation data even more meaningful than before.
Oil prices wavered early Wednesday, but recovered after a report showing that USA crude-oil inventories declined sharply last week.
In what may be one of her last appearances before Congress, Ms. Yellen depicted an economy that, while growing slowly, continued to add jobs, benefited from steady household consumption and a recent jump in business investment, and was now being supported by stronger economic conditions overseas.More news: 'Spider-Man: Homecoming' Co-Stars Tom Holland and Zendaya Mock Reports They're Dating
In base metals, copper fell 0.8% to $2.6615 a pound.
Target rose 3.8 percent after the retailer said it expects a "modest" increase in second-quarter comparable sales, the first rise in five quarters.
The yield on the 10-year Treasury note fell to 2.32 percent from 2.37 percent late Tuesday.
Brent crude futures were off 20 cents at $47.52 a barrel, while USA crude eased 17 cents to $45.31.
ENERGY: Benchmark U.S. crude rose 3 cents to $45.52 per barrel in electronic trading on the New York Mercantile Exchange. South Korea's Kospi gained 1.2 percent to 2,419.18. The New Zealand dollar was up 0.83 percent on Thursday against the greenback and the Australian dollar gained 0.7 percent.
In Asia, Hong Kong's Hang Seng index jumped 1.2 percent after a report showed that Chinese trade growth accelerated for a second month in June.
Major stock indexes in Europe closed mostly higher.