The US dollar fell to a more than three-year low against the euro on Friday, extending recent losses on expectations European Central Bank policymakers are preparing to reduce stimulus, while US stocks continued to rally and marked record closing highs. Optimism about fourth-quarter earnings boosted stocks. Bank shares climbed following quarterly results from JPMorgan Chase & Co and Wells Fargo. A global stock index registered an eighth straight week of gains. The euro's rise weighed on the dollar index, which measures the greenback against six rival currencies. The index was down 1 percent, after slipping to a four-month low of 90.954. For the year, the dollar index was down 1.28 percent, its worst performance over a year's first nine trading days since 2010, according to Reuters data. "The latest ECB comments were a bit on the hawkish side, so that's giving more life to the euro," said Minh Trang, senior currency trader at Silicon Valley Bank in Santa Clara, California. Sterling rocketed to its highest level against the dollar since the Brexit vote to leave the European Union after a report that the Netherlands and Spain were open to a deal for Britain to remain as close as possible to the trading bloc. Sterling was last trading at $1.3731, up 0.03 percent. The S&P 500 and Nasdaq both registered an eighth record closing high out of the first nine trading days of 2018, while the Dow boasted its sixth closing high of the year. Data showing robust US retail sales drove investor optimism about economic growth, also boosting sentiment in the stock market. "It seems like the economy is going OK, inflation is kind of nonexistent right now, wage growth is not an issue for most income statements, so what's not to like here?" said Stephen Massocca, senior vice president at Wedbush Securities in San Francisco. The Dow Jones Industrial Average rose 228.46 points, or 0.89 percent, to 25,803.19, the S&P 500 gained 18.68 points, or 0.67 percent, to 2,786.24, and the Nasdaq Composite added 49.29 points, or 0.68 percent, to 7,261.06. The pan-European FTSEurofirst 300 index rose 0.23 percent, and MSCI's gauge of stocks across the globe gained 0.66 percent. A robust US inflation report boosted Treasury yields. The two-year yield, sensitive to traders' views on interest rates, rose to more than 2 percent for the first time since the financial crisis. In commodities, oil prices rose for a sixth day after Russia's oil minister said global crude supplies were "not balanced yet," alleviating market concerns about a wind-down of the OPEC-led deal to reduce production. U.S crude oil rose 50 cents to settle at $64.30 a barrel, while Brent rose 61 cents to settle at $69.87.