By Dion Rabouin

NEW YORK (Reuters) - The dollar rose to a three-week high against the yen on Friday and posted its largest weekly gain against the Japanese currency in 17 years after strong U.S. and Chinese economic data diminished the appetite for the yen as a haven from risk.

U.S. retail sales rose 0.6 percent in June, strongly outpacing the 0.1 percent rise expected by economists. It was the third straight month of gains and lifted sales 2.7 percent from a year ago.

Dean Popplewell, chief currency strategist at Oanda in Toronto, said the data's surprise to the upside was a big positive for the dollar. "That’s leading the market to consider re-pricing potential (interest rate) hikes again."

Fed funds futures showed investors see an increased likelihood that the U.S. Federal Reserve will raise the nation's overnight interest rates this year. Chances for a rate increase by December rose to 46 percent on Friday, according to CME Group's FedWatch tool. Traders had priced in less than a 20-percent chance as recently as late June.

Data from China overnight also showed growth. Industrial output and retail sales all beat forecasts, indicating there was some resilience in the economy.

The dollar rose to 106.30 yen <JPY=>, its strongest level since June 24, in Asian trade. It vacillated between positive and negative territory throughout the U.S. session, and was last up 0.25 percent at 105.53 yen.

The yen's moves largely followed those of equities, analysts said, with the yen moving in the opposite direction of U.S. stocks throughout much of the day.

For the week, the dollar rallied 5 percent against the yen, its largest weekly rise since February 1999, as expectations of significant stimulus from Japan weighed on the yen.

Speculation has grown since Prime Minister Shinzo Abe's ruling coalition won elections over the weekend and were fanned when former Federal Reserve Chairman Ben Bernanke visited the Bank of Japan earlier this week.

The British pound fell 1 percent against the dollar <GBP=D4>, slipping from a two-week high of $.13481 after the Bank of England's chief economist said Britain needed "muscular" stimulus to boost the economy.

Still, sterling rose nearly 2 percent for the week against the greenback thanks to a surprise decision by the BOE on Thursday to keep rates on hold. Investors had largely expected a rate cut following Britain's vote to leave the European Union.

It was sterling's biggest weekly rise against the dollar since early March.

(Reporting by Dion Rabouin; Additional reporting by Anirban Nag and Alden Bentley; Editing by Sandra Maler)