The federal government's fiscal position continues to improve in the face of what appears to be a slowing economy and growing global risks.

The Finance Department said Friday that October's deficit was $2.2 billion, only about half its deficit in the same month last year.

The improvement was due to a $1.4-billion gain in tax revenues, 8.1 per cent higher than last October, and a $600-million decline in expenses, 3.2 per cent lower than 12 months ago.

Coincidentally, Statistics Canada reported Friday that Canada's economy was mostly flat in October, ending four consecutive months of healthy expansion.

And that may impact Ottawa's fiscal health going forward, said TD Bank economist Sonya Gulati.

"With the quarterly economic growth profile for Canada expected to temper in the fourth quarter of 2011 and heading into next year, we do not expect this revenue intake strength to continue," she said in an analysis of the report.

"If it does, the federal government's $31-billion deficit target would likely come in better than originally forecast."

On the plus side, Ottawa has built in a cushion in its projections of $3 billion.

It may need it. The government's projections assume a growth profile slightly stronger than the current consensus, mostly because November's economic update was based on a survey of economists conducted in September when the recovery looked on surer footing.

Since then, Europe's problems have deepened and even emerging economies such as China appear to have entered a period of more modest expansion, dampening demand for Canadian commodity exports.

Both the Bank of Canada and the International Monetary Fund now think the economy will advance by 1.9 per cent next year, two notches lower than the government's assumption, and some economists think it could be even softer.

That may impact tax revenues from individuals and companies, analysts say, although expenses are unlikely to be significantly affected unless Finance Minister Jim Flaherty opts for a second round of stimulus.

For the first seven months of the current period, Ottawa's deficit has reached $15.4 billion, $6.1 billion less than for the corresponding period last year.

From April through October, tax revenues rose by $5.7 billion, or 4.5 per cent, as higher personal income tax receipts offset lower GST revenues. Revenues from corporate taxes were up $1.5 billion.

Meanwhile, government outlays for such things as transfers to persons and other expenses fell by $1 billion, or 0.8 per cent, for the corresponding period.

Charges for servicing the national debt were about $600 million higher cumulative in the first seven months of the 2011-12 year than last year at the same point.