OTTAWA—The economy's strong first half of the year is doing wonders for the federal government's balance sheet.

The Finance Department reported Friday that it recorded a tiny, $473-million shortfall in July after bleeding $5.8 billion of red ink in the same month last year.

As for the fiscal year so far — four months — Ottawa's deficit is only $7.7 billion, or 42 per cent of what it was in the first third of the previous year — $18.3 billion.

In the March budget, Finance Minister Jim Flaherty estimated this year's deficit would reach $49.2 billion.

Analysts say the government is well on its way to beating that projection, although not by as much as the current pace suggests.

"We caution market participants against extrapolating recent budget balance improvements," TD Bank economist Pascal Gauthier advised.

He noted that the government is benefiting from the extraordinary rebound from the recession that occurred at the end of 2009 and beginning of 2010, with growth rates of 4.9 per cent and 5.8 per cent.

But the economy has come crashing back to earth since. The second quarter of this year produced a mere two per cent gain, and the current third quarter, which ends Sept. 30, is now predicted to come in at about 1.5 per cent.

The prognosis is not much better for the rest of the year, or 2011.

"What is clear is that Canada's fiscal position, while better than most of its G7 counterparts, will not be balanced solely through economic growth in the years ahead," Gauthier said.

He believes the government will, however, beat the $49-billion target, by between $3 billion and $5 billion.

Part of the government's calculations for balancing the budget in five years involves fewer payouts and higher premiums for employment insurance.

A panel has recommended that premiums be raised by the maximum 15 cents per $100 of insurable earnings in January, a proposal that is being opposed by most business groups and unions.

July's fiscal accounting reflects both extraordinary measures and flow-through from the improved economy and job growth.

The department said tax revenues increased by $1.9 billion in July, a 10.5 per cent gain, while revenue for the first four months of the fiscal year was up $3.9 billion, or 5.5 per cent.

Meanwhile, program spending was down $3.6 billion in July compared with a year ago, primarily as a result of last year's one-time rescue package for the auto sector. Spending is down $6.8 billion year-to-date.

For the four months, EI benefits payouts fell 7.3 per cent or $509 million, a reflection of the 430,000 new jobs the economy created since last July.

But the higher debt load Ottawa has taken on in the past year and a half to finance the deficit is starting to register on its costs. The department said public debt charges were up about $210 million in July.