The U.S. dollar steamed to a level not seen since 2003 and yields on the 10-year Treasury note reached a high for the year Thursday, as Federal Reserve Chairwoman Janet Yellen confirmed investors’ view that the U.S. economy is strong enough to withstand an interest-rate rise soon.

Ms. Yellen told lawmakers in testimony Thursday that the Fed could move “relatively soon,” after the government released a grab bag of economic data all pointing to a stronger economy: an improving housing market, rising consumer prices and a more...