Federal Reserve Chair Janet Yellen swooped in with dovish comments Wednesday that boosted morale in financial markets after a depressing start to the week.

In testimony to Congress, Yellen reiterated that the central bank would move gradually on interest-rate increases, particularly given the pain felt in financial markets recently. 

Upward momentum deflated in the final hour Wednesday, but the shift in sentiment that boosted markets throughout the session remained palpable. The S&P 500 was up more than 1% and the Nasdaq reached gains of 2% at session highs. 

"The idea of lower rates for a longer time added a modest bid to the market today," David Schiegoleit, managing director of investments at U.S. Bank Wealth Management, told TheStreet. "[It] is a bit of relief to hear that she is acknowledging market stresses that are happening right now, particularly in equity markets both here and overseas."

By the end of the session, the S&P 500 dropped 0.02%, the Dow Jones Industrial Average was down 0.6%, and the Nasdaq rose 0.35%.

The markets interpreted comments from the central bank's chair to...read more at The Street