The S&P closed at its 20th record high of the year and posted the biggest gain in four weeks on Wednesday after Federal Reserve Chairwoman Janet Yellen made upbeat comments about the U.S. economy.

The S&P 500 added 14.99 points, or 0.8%, to close at 1,956.98. During the day, it set a new intraday high of 1,957.81, beating out a June 9 record. With U.S. stocks rallying, the S&P 500 also compiled its fourth consecutive day of gains.

Meanwhile, the Dow Jones Industrial Average added 98.13 points, or 0.6%, to 16,906.62. The Nasdaq Composite Index also recorded gains, ending the day up 25.60 points higher for 4,362.84, which was its highest figure since April 2000.

In her talk, Yellen said that the U.S, economy is rebounding, and also delivered good news about interest rates, saying they’ll remain low.

Some stocks that saw gains on Wednesday included FedEx FDX , which posted fourth-quarter earnings that were better than analyst estimates; Adobe Systems ADBE also reported quarterly revenue that beat estimates; and Cisco Systems CSCO gained due to an upgrade by Morgan Stanley.

Amazon.com AMZN shares also rose following the unveiling of its new phone, Fire, at an event in Seattle.