Investors boosted stocks and sold safe-haven assets on Monday, betting that a last-minute deal in Washington meant the U.S. economy would avoid default.

There remained a widespread assumption, however, that credit ratings agencies could downgrade U.S. Treasuries from their vaunted triple-A status, a move that would impact the valuation of numerous other assets.

After a tense weekend spent in search of a compromise to allow the U.S. borrowing limit to be lifted, U.S. President Barack Obama said leaders from both parties reached a deal to cut the budget deficit by $1 trillion over 10 years, with additional savings of $1.4 trillion possible.

The plan must be passed by both houses of Congress and will still face some opposition. But it is expected to allow the debt ceiling to be raised, avoiding the prospect of Washington not being able to pay its bills and defaulting.

World stocks as measured by MSCI <.MIWD00000PUS> climbed 0.6 percent with emerging market shares <.MSCIEF> up 1.2 percent.

There were large gains in Japan, where the Nikkei <.N225> rose 1.3 percent. In Europe, the FTSEurofirst 300 <.FTEU3> rose 0.7 percent with banking shares enjoying a big boost.

But there remained a degree of skepticism about how long the rise in risk sentiment would last, given the likely U.S. downgrade, which some believed could come this week.

It is a relief rally on the back of the parties coming together, but it could only last for a couple of days as the United States could now face a ratings downgrade, Manoj Ladwa, senior trader at ETX Capital, said.

That would impact every part of the United States.

It would also raise issues for assets elsewhere. Some large pension funds, for example, will only hold triple-A debt, meaning they may have to sell Treasuries and buy elsewhere, crowding trades into German Bunds, for example.

The relative valuations of a number of assets, meanwhile, are based on their difference from supposedly risk-free Treasuries.

UNWINDING

The flip side of Monday's stock rally was the unwinding of investors positions taken to protect against U.S. default.

Gold fell more than 1 percent before recovering slightly. It was at $1,614 an ounce after hitting all-time nominal highs last week.

The dollar rose against the Swiss franc, which has seen intense interest from investors as the dual euro zone and U.S. debt crises have stirred markets this year.

Commodity currencies -- those tied to the prospect of large developing market growth -- climbed, with the Australian dollar nearing a 29-year peak against the greenback hit last week.

In the short term, there will be relief in market sentiment today and maybe this week, as the U.S. will avoid a default, but the problems are not fully solved so I think we will see a muted reaction, said Richard Falkenhall, currency strategist at SEB in Stockholm.

You have the risk of ratings agency downgrades, and no further fiscal stimulus in this deal, he said.

On bond markets, yields on U.S. Treasuries and core euro zone debt rose, reflecting some selling to release money parked in fixed income in the runup to the U.S. deal.

The premium investors demand to hold Italian and Spanish government bonds rather than benchmark German Bunds fell in line with the outperformance of riskier assets.

(Additional reporting by Naomi Tajitsu and Joanne Frearson; Editing by John Stonestreet)