Yellen gave her speech, titled "The Outlook, Uncertainty, and Monetary Policy," at the Economic Club of New York.
"One of the most important things she said is there's a recognition in the Fed that there were very turbulent times in January," said Alan Rechtschaffen, financial advisor and senior vice president at UBS Wealth Management Americas.
"I think she's uncertain," he said. "I think the fact they say they're uncertain means they're uncertain."
Recent policymaker comments have leaned more hawkish than what came out of the March 15-16 meeting, which was more dovish than many expected.
"No doubt Yellen is the clear leader of the Fed and her opinion weighs heavily," said Mike Arone, chief investment strategist for the U.S. intermediary business at State Street Global Advisors.
U.S. stocks opened lower as declines in oil prices weighed. U.S. crude oil futures settled down $1.11 at $38.28 a barrel.
The major averages pared losses and the Nasdaq composite turned higher after consumer confidence showed a rise in March to 96.2 from 94.0 in February.
"That's a good sign," said Peter Cardillo, chief market economist at First Standard Financial.
Apple, Microsoft, Amazon.com and Facebook closed more than 2 percent higher to support gains in the Nasdaq. The iShares Nasdaq Biotechnology ETF (IBB) turned higher to close up 1.8 percent.
With Tuesday's gains, Apple came within 20 percent of its 52-week intraday high, out of bear market territory.
Late Monday, the Justice Department said it no longer needs Apple's help after accessing data on the iPhone used by a shooter in last year's San Bernardino, California, attacks.
"We believe the resolution is a net positive for Apple. ... It alleviates a potential risk for Apple," said Angelo Zino of S&P Capital IQ, which maintained its "strong buy" recommendation on Apple stock in an early Tuesday note.
In other central bank news, Dallas Federal Reserve President Robert Kaplan said in a Reuters report he expects the U.S. economy to prove resilient this year but that the nation's central bank should proceed gradually and cautiously in raising rates.
In comments to reporters Kaplan declined to rule out a rate increase at the Fed's April meeting, Reuters said.
He was scheduled to speak again at 4 p.m. ET.
Earlier, in a speech at the National University of Singapore, San Francisco Fed President John Williams said the U.S. economy remains on track for a gradual path of interest rate hikes and fears over the impact of a slowing global economy and bouts of financial volatility are overdone.
Williams is a non-voting member of the Federal Open Market Committee this year, while Kaplan is an alternate member.
Separately, the S&P/Case-Shiller 20-City Composite Index for January showed a 5.7 percent rise from the previous year. The March jobs report is due Friday.