One of the major credit ratings agencies has been scrutinizing the banking sector again, but this time it's not Bank of America (NYSE: BAC) or Citigroup (NYSE: C) being put under the microscope. Standard & Poor's recently took a look at some of Canada's largest banks, taking note of the lousy global economy, cooling Canadian housing market, and high level of consumer debt.

The results weren't as bad as they could have been. S&P reduced its outlook from stable to negative for Toronto-Dominion Bank (NYSE: TD), Royal Bank of Canada (NYSE: RY), Bank of Nova Scotia (NYSE: BNS), as well as Central 1 Credit Union, Home Capital Group, Laurentian Bank of Canada and National Bank of Canada.

Canadian banks are some of the strongest in the world, coming through the financial crisis in enviable shape. Unlike B of A and Citi, both of whom were knocked down to two steps above junk status by Moody's several weeks ago, Canada's banks have kept their credit ratings intact and their capital cushions plump. These facts should put them in a better position than their American cousins when it comes to facing economic instability, both at home and in Europe, according to Canada's top regulator.

But S&P's announcement serves as a w arning that even well-run and well-capitalized banks can be stressed when faced with economic headwinds. Although Canada has enjoyed a bustling housing market while the U.S. real estate picture continues to sputter, there are signals that Canada's market is losing steam. A recent report by Capital Economics argues that the housing bubble is most certainly entering the bursting stage. Not everyone agrees with this assessment, but year-over-year sales declines of 7.9% and 27.7% in the once-hopping metro markets of Toronto and Vancouver present clear evidence that the end, if not near, is definitely on its way.

Other issues include high debt levels for Canadian consumers, as well as more stringent mortgage regulations that will bring banks' loan growth to a screeching halt. In addition, consumers are pulling back on credit, possibly as a prelude to hunkering down to pay off their massive debt.

Foolish takeaway
With the headwinds blowing at home, some say that Canadian banks with more of an international presence, like TD Bank and Bank of Nova Scotia, are apt to deliver better returns to investors. Other analysts think that investors will move over to American banks, since the U.S. economy is perceived as beginning to rebound, rather than starting to decline, like Canada's.

But don't discount the northern banks just yet. Chances are that Canada's housing market will have a much softer landing than the U.S. market did. Also, American banks are much more at risk of being embroiled in the burgeoning LIBOR scandal, which may make them a less attractive investment in the long run. Even with the recent dimming of this sector's outlook, I'll bet that these banks will continue to be a great long-term investment.

If you are concerned about shrinking dividends in the banking sector, I invite you to read The Motley Fool's special report on nine rock-solid dividend stocks. Interested? This report is free right now, so click here to start reading.