Alberta's debt situation was under the microscope last week, with two rating agencies taking a look at the province's fiscal situation and economy and not liking what they saw.

DBRS and Moody's both maintained Alberta's top credit rating, but downgraded the province's outlook. The reasons are clear — prolonged low oil prices, a sluggish economy, and deficit spending by the province.

Calgary at a Crossroads

Moody's also pointed out the unique position that Alberta is in, by owning ATB Financial, that lends to businesses small and large, as well as Albertans personally — and for the past several years has had more loans outstanding than it holds on deposit.

'It's a growing risk' - Michael Yake, senior analyst, Moody's

This prompted Moody's Investor Services to say that ATB's loan book is increasing the risk to Alberta's credit rating. 

"It's something that we've been watching for more than a year," said Michael Yake, a senior analyst at Moody's. "It's a relatively small risk, in terms of the financial resources of the province, but it's a growing risk."

ATB Financial has always been a curious creature.

Created in the depths of the Great Depression, when other banks stopped offering credit in the province, its mandate has always been partly about community building. 

It is supposed to lend when times are bad, something that it says it's doing now.

Keeping credit flowing

ATB said that in the last quarter of 2015, when oil prices were still falling and jobs were being shed every day, it increased its loans to small and medium-sized businesses by nearly 30 per cent.

While access to credit is clearly good for businesses, it does lend extra risk to the province in a time when the economy is faltering.

ATB's provision for loan losses increased by 500 per cent in the past year. It wrote off $30 million in bad energy loans in the most recent quarter.

All lenders to the energy sector in Alberta are facing the same pressures, but ATB is not diversified geographically.

It can't lend in B.C. to offset risk in Alberta, which is another reason why Moody's is watching the situation.

Bruce Edgelow is the vice president of strategic initiatives at ATB and he says that there's an upside to not pulling back on lending when times are tough.

"You find a way to lend through the cycles, find a way to support your clients, if you can find a way through it, you will be rewarded."

Edgelow points out that ATB was able to increase its market share in the province during the 2008-2009 downturn and through the BSE crisis in the cattle industry in the early 2000s.

"We didn't abandon the clients, in certain cases, we actually took more exposure on, as others were bailing on clients."

More lent out than on deposit

Until 2011, ATB typically had more deposits on its books than loans outstanding, but that changed as it's worked more aggressively to gain market share.

Its loan book more than doubled between 2007 and 2015.

"We are still looking at energy exposure as a mainstay of our business. Are we spending a bit more time? Are we sensitizing things carefully? Absolutely. And that's what we should be doing. We are not a lender of last resort, but we are here to stay the course," said Edgelow.

As of 2015, it had $37 billion outstanding in loans and $30 billion on deposit. In the fall budget, the province increased the size of ATB's credit line by $1.5 billion so that it didn't have to pull back on lending.

ATB's deposits are all backed by the province.

Edgelow said that money was provided so that ATB could keep lending — including to the energy sector.

Calgary at a Crossroads is CBC Calgary's special focus on life in our city during the downturn. A look at Calgary's culture, identity and what it means to be Calgarian. Read more stories from the series at Calgary at a Crossroads.