Investors looking at Canada’s banks may think there is considerable upside remaining: Toronto-Dominion Bank (TSX:TD)(NYSE:TD) and Royal Bank of Canada (TSX:RY)(NYSE:RY), for example, have staged 4.6% and 7.6% rallies, respectively, in 2016, underperforming the TSX’s performance of 11.5% this year.

Some may argue this relative underperformance may attract capital to bank stocks from more richly valued names in the TSX. This sounds even more viable since bank stocks have dividend yields of about 4% on average compared to 10-year Government of Canada bonds, which only yield 1.07%. This makes bank stocks a good stable option for yield for investors who can’t get it elsewhere, and should, in theory, support higher valuations.

Despite this, looking at bank earnings outlooks—a key driver of valuations—the banks seem fairly valued at best, and investors who are not very long-term holders and/or dividend-focused investors could consider taking profits and moving capital elsewhere.

1. Valuations are looking stretched

It is true.

With the TSX outperforming the Canadian banks on average this year, the banks are undervalued relative to the TSX when comparing historical averages. According to TD Bank analysts, Canada’s banks have a price-to-earnings ratio of 69%, which is below the long-term average of the TSX of about 76%.

Unfortunately, there is reason to suggest that the long-term average is not justified at the moment. Currently, Canada’s banks are trading at an average P/E of about 11. Over the past 10 years, 11.3 has been the median, but banks have spent extended periods near 12, briefly spiking to nearly 14 on occasion (although not since the mid-2000s).

With the banks currently about in line with historical values, the only way they will see continued upside is if valuations stretch above average or if earnings outlooks improve.

These two factors are connected, and TD Bank analysts note that the only time Canadian bank P/E ratios go above 11 is when there is growth in the earnings outlook. For example, in 2012 analysts were raising earnings estimates for 2013, which led to bank P/E ratios expanding above 11.

Unfortunately, this is not happening for Canadian banks currently. In fact, consensus earnings estimates for 2017 are down 2% since the start of the year, which means bank share prices are growing as future earnings expectations are falling. This makes banks seem expensive.

Going forward, Canada’s banks can only expect average earnings growth of 4% for the next two years compared to 8% for the past 10 years, which does not help share price growth prospects.

2. Oil and real estate will be headwinds going forward

Energy sector activity (controlled by oil prices) and a coming slowdown in the Canadian real estate market, which is driven by a pullback in record prices, will pressure bank earnings going forward and prevent upward earnings revisions for the banks.

While the energy sector is recovering, the current massive 20% pullback in oil prices since July shows the recovery in oil prices will be gradual. With a $10 change in oil prices expected to affect cash flow in Canadian oil companies by 28% on average, the current plunge will mean oil and gas firms may need to rely on credit more, which means more oil exposure for banks and potentially more impaired loans (which means banks may need to charge more against earnings to cover loan losses).

If the current pullback in oil prices persists, banks may see more weakness in projected earnings for 2016 and 2017.

Adding to this headwind is the risk that is coming from a real estate slowdown. With Vancouver recently implementing a tax on foreign buyers, home sales plunged by 75%, and a similar move by Toronto could lead to a plunge in home prices, which, according to Moody’s, would result in $18 billion of losses to Canada’s banks if the plunge in prices were to fall by 35%.

While banks may be overvalued, this name certainly isn't

Over the course of The Motley Fool U.S.'s 23-year history, this rare buy "signal" has generated massive wealth for those that have been smart enough to pay attention to it. It's so rare, that it's happened less than two dozen times... but when it doe, it's made investors undoubtedly rich. If you're interested in knowing the stock behind this rare buy "signal" - and you're excited to take advantage of this golden opportunity, then you're going to want to read this. Click here to unlock all the details behind this new recommendation from Stock Advisor Canada.

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Adam Mancini has no position in any stocks mentioned.