(Adds analyst comments, updates prices)
* Canadian dollar at C$1.2910, or 77.46 U.S. cents
* Bond prices slightly higher across flatter maturity curve
By Fergal Smith
TORONTO, Aug 23 (Reuters) - The commodity-linked Canadian dollar firmed against its U.S. counterpart on Tuesday as oil rallied and stocks edged higher.
Oil rallied after Reuters reported that Iran was sending positive signals that it may support joint OPEC action to prop up the market. U.S. crude oil futures CLc1 settled up 69 cents at $48.10 a barrel. O/R
The oil-related news helped push the Canadian dollar through resistance around C$1.2900, although it pared some gains as the market turned its attention to Federal Reserve Chair Janet Yellen's speech in Jackson Hole on Friday, said Jack Spitz, managing director of foreign exchange at National Bank Financial.
Doubts that Fed's Yellen will be able to convince financial markets that she can steer a divided U.S. central bank to raise interest rates at least once in 2016 weighed on the U.S. dollar .DXY . for stocks were supportive of the risk-sensitive Canadian dollar, Spitz said.
The Canadian dollar CAD=D4 ended at C$1.2910 to the greenback, or 77.46 U.S. cents, stronger than Monday's close of C$1.2950, or 77.22 U.S.
The currency's strongest level of the session was C$1.2859, while its weakest was C$1.2947.
On Monday, the loonie touched its weakest in one week at C$1.2965.
Gains for the Canadian dollar came after stronger-than-expected domestic wholesale trade data on Monday. recent retail sales data disappointed and Canada's economy is expected to contract in the second quarter after a wildfire in Alberta cut oil production. government bond prices were mixed across the maturity curve, with the two-year CA2YT=RR bond down 0.5 of a Canadian cent to yield 0.555 percent and the benchmark 10-year CA10YT=RR rising 3 Canadian cents to yield 1.022 percent.
The curve flattened, as the spread between the 2- and 10-year yields narrowed by 0.6 of a basis point to 46.7 basis points, its narrowest since June 2008, indicating outperformance for longer-dated maturities.