Treasury yields rose Tuesday, and the Standard & Poor's 500 index slid to its first loss in four days after the head of the Federal Reserve said that he's feeling more optimistic about the economy.

The testimony by Fed Chairman Jerome Powell before Congress was highly anticipated, and he gave encouraging words about the economic data that have arrived in recent weeks. But some investors speculated they could mean the central bank will get more aggressive in raising interest rates than the market has prepared for.

On Tuesday:

The Standard & Poor's 500 index fell 35.32 points, or 1.3 percent, to 2,744.28.

The Dow Jones industrial average lost 299.24, or 1.2 percent, to 25,410.03.

The Nasdaq composite fell 91.11, or 1.2 percent, to 7,330.35.

The Russell 2000 index of smaller-company stocks dropped 22.86, or 1.5 percent, to 1,536.47.

For the week:

The S&P 500 is down 3.02 points, or 0.1 percent.

The Dow is up 100.04 points, or 0.4 percent.

The Nasdaq is down 7.04 points, or 0.1 percent.

The Russell 2000 is down 12.71 points, or 0.8 percent.

For the year:

The S&P 500 is up 70.67 points, or 2.6 percent.

The Dow is up 690.81 points, or 2.8 percent.

The Nasdaq is up 426.96 points, or 6.2 percent.

The Russell 2000 is up 0.96 points, or 0.1 percent.