EghtesadOnline: Oil prices extended gains in Asia on Thursday, boosting stock markets, after OPEC members agreed to curb output in a surprise deal, though investors were wary of chasing markets higher as the U.S. presidential election nears.

MSCI's broadest index of Asia-Pacific shares outside Japan was up 0.8 percent by mid-morning, thanks to a bounce in energy shares, but other markets such as Hong Kong were starting to cede some of their initial gains, reports Reuters.

"Despite the favorable oil deal, foreign institutional investors are sticking to their favorite counters before the U.S. elections results as there is simply too much market uncertainty," said Andrew Sullivan, managing director, sales trading at Haitong International Securities Group in Hong Kong.

It was OPEC's first agreement to cut production since 2008, though details on specific country quotes won't be decided until the next formal OPEC meeting in November. [O/R]

While markets were broadly optimistic about the deal, some analysts pointed out that a further rise in crude prices may be difficult as U.S. shale producers who have been cutting production in recent months may start increasing output.

Brent crude was up 0.02 percent at $48.70 a barrel, adding to overnight gains of 5.9 percent. U.S. crude added 0.3 percent to $47.17 a barrel after rising 5.3 percent on Wednesday, when it hit its highest since Sept. 9

"With profits being squeezed the battle for market share can't go on and this deal ushers in a new period of cooperation between OPEC nations and specifically between Saudi Arabia and Iran," wrote Kathy Lien, managing director of FX strategy for BK Asset Management.

"While we wouldn't be surprised by some back-pedaling between now and November, this is a historic moment and one that should have a lasting impact on the Canadian dollar."

Commodity currencies such as the Australian and Canadian dollars firmed on the OPEC news.

The Canadian dollar traded at C$1.3064 to the dollar after gaining nearly one percent overnight. The loonie had seen a six-month low of C$1.3281 early on Tuesday.

The Australian dollar hit a three-week high of $0.7699, while the Norwegian crown touched a five-month high against the dollar.

The euro inched up 0.1 percent to $1.12260, while the dollar climbed 0.7 percent to 101.35 against the safe-haven yen as broader risk sentiment improved.