The U.S. dollar recorded its fourth consecutive weekly gain driven by expectations that the Federal Reserve will continue raising interest rates to combat inflation.