TORONTO (Reuters) - The Canadian dollar steadied near a 12-week low against its U.S. counterpart on Thursday and posted its biggest monthly decline in more than two years, as the domestic economy stalled in August and investors globally grew risk averse.

The loonie was trading nearly unchanged at 1.3909 to the U.S. dollar, or 71.90 U.S. cents, after touching its weakest intraday level since Aug. 5 at 1.3945.

For the month of October, the currency was down 2.8%, its biggest monthly decline since September 2022.

"The Canadian dollar was looking like it might carve out another bottom this morning ... but Day Two of the gilt market panic following the latest UK budget then took hold, freaking out the stock market and risk-sensitive currencies like CAD," Erik Bregar, director, FX & precious metals risk management at Silver Gold Bull.

British government bond prices tumbled for a second straight day on Thursday as investors judged finance minister Rachel Reeves' first budget would boost inflation and cause the Bank of England to cut interest rates more slowly.

U.S. stocks slumped after Microsoft and Meta Platforms highlighted growing artificial intelligence costs that could affect their earnings, curbing enthusiasm for megacap stocks that have fueled the market rally this year.

Canada is a major producer of commodities such as oil so the loonie tends to be sensitive to shifts in risk appetite.

The Canadian economy is likely to miss the Bank of Canada's revised third-quarter forecast of annualized 1.5% growth after a slew of temporary factors led to a flat reading for gross domestic product in August.

Economic growth for July was revised downwards to 0.1% from 0.2%, while preliminary data showed growth rebounding to 0.3% in September.

Canadian government bond yields moved lower across the curve, with the 10-year down 3.4 basis points at 3.230%.

(Reporting by Fergal Smith; Editing by Richard Chang)

By Fergal Smith