* Shanghai shares, blue-chips curb losses after hitting YTD trough
* China vows to fight virus that kills 9, infects over 400
* Risk heightens as millions set to travel for Lunar New Year
* Yuan, Hong Kong stocks edge higher though still near week-lows
HONG KONG/SHANGHAI, Jan 22 (Reuters) - Shares fell and safe-haven assets surged in China on Wednesday as the death toll from a virus outbreak rose, knocking confidence, though officials vowed to step up efforts to contain the crisis.
The death toll from the new flu-like coronavirus rose to nine, with 440 confirmed cases. The virus spread from the central city of Wuhan to several Chinese cities and abroad, just as millions of people prepare to travel for the Lunar New Year between Jan. 24 and 31.
"If the pneumonia couldn't be contained in the short term, we expect China's retail sales, tourism, hotel and catering, travel activities likely to be hit, especially in Q1 and early Q2," analysts at UBS said in a note on Wednesday.
In early trade, the Shanghai Composite and the blue-chip CSI300 indexes slumped more than 1% to year-to-date lows, but later pared most of their losses. Yields on Chinese 10-year government bonds dipped to August lows and treasury futures climbed.
The equity benchmarks regained lost ground after National Health Commission vice-minister Li Bin said China is tightening containment measures in hospitals and stepping up co-operation with the World Health Organization.
The comments came after President Xi Jinping asked officials to make battling the virus a top priority.
Blue-chips reversed all intraday losses in early afternoon trade while Shanghai shares were close to flat. The Hong Kong market, which had its worst day in over five months on Tuesday, added more than 1%.
Linus Yip, chief strategist at First Shanghai Securities in Hong Kong, said investors believe the odds continue to favor Chinese equities as they bet on Beijing and Washington's trade agreement, signed earlier in January.
"From time to time we will see disruptions to that trend, such as the Middle East tensions this month. But the trend is still in good shape. China's economy is improving," he said.
Jefferies' analysts suggested in a note that markets were under-reacting to the person-to-person spread of the virus and "have been playing catch-up over the last two trading days."
Calm also returned to the Chinese currency market where traders usually close out large positions ahead of the Lunar New Year holiday, which begins on Friday.
The yuan was largely flat in the onshore market at midday and 0.1% stronger offshore, hovering near one-and-a-half week lows after clocking its largest daily losses since August on Tuesday.
"Nothing about the fundamentals has really changed. Everything was driven by sentiment," said a Shanghai-based trader in Shanghai. (Reporting by Noah Sin and Winni Zhou in Shanghai; Writing by Noah Sin; Editing by Jacqueline Wong)