After a weak 2015 that saw Royal Bank of Canada (TSX:RY)(NYSE:RY) shares end slightly lower than they started (a rare event for a Canadian bank), Royal Bank started 2016 with a precipitous decline of almost 15% before bottoming on January 20. Since then shares have rallied by 23% to current levels.

This rally has been largely driven by crude oil prices. Recently, the correlation between Canadian banks and crude prices exploded to an all-time high, and this correlation is especially strong for RBC. Since the January lows, RBC has outperformed its peer group, rallying 23.3% versus the Big Six average of 21.25% (outperforming every bank except Bank of Nova Scotia).

This strong performance may have investors wondering whether or not the current price is too rich and if waiting for a pullback in the share price would be a more reasonable approach. The answer largely depends on the outlook for oil prices as well as the ongoing impact of the oil rout on the bank’s energy and retail loan book.

RBC’s current valuation

Where does RBC stand now? The current consensus earnings prediction for RBC in 2017 is $7.11 per share. This means RBC would be trading at about 11.1 times its 2017 earnings.

This is significantly below RBC’s 10-year historical forward price-to-earnings ratio (for two years forward) of 11.6. RBC’s peer group is currently trading around 11 times 2017 earnings on average (with Toronto-Dominion Bank trading up near 11.5 times earnings). This puts Royal Bank at a premium of only about 1% to its peer group.

This is low by RBC standards. Just over the past year, RBC has traded at a premium of close to 3% to its peer group, according to analysts at Bank of Nova Scotia, and historically the bank typically trades at a 3-4% premium to its peer group. In other words, comparing both RBC to its 10-year average and to its peers, the stock looks fairly affordable at current levels.

It is important to note that seeing the stock trade up to its 10-year average of 11.6 is probably unlikely for now. Concerns about oil and gas, housing, rising loan losses due to the current stage in the credit cycle, and below-average earnings-growth projections should leave the bank trading at a discount to its long-term average.

There are risks

While the bank does seem affordable at current prices, waiting for a pullback in shares before buying is likely wise for two reasons.

First, the bank is extremely correlated to oil prices, which means a short-term pullback in oil prices will lead to pressure on the shares (and with oil prices struggling to break the $50/bbl mark convincingly, this is a strong possibility).

Second, the bank is likely due for further pressure from its energy portfolio, which could lead to earnings pressure as the year progresses. While oil prices may be recovering, the effects of weak oil prices on both the energy portfolio of the bank and its retail portfolio is still playing out and will continue to do so.

There is evidence of this happening now. In the bank’s recent Q2 2016 earnings release, it reported that its overall gross impaired loans surged by 19% from the previous quarter from $3.12 billion to $3.70 billion. Much of this growth was from the energy book with energy gross impaired loans increasing from $310 million in Q1 to $1.039 billion this quarter–a 235% increase.

Despite the large jump, provision for credit losses in the energy book (or how much the bank puts away to cover bad loans) only increased 8%; the bank stated that strong collateral reduced the need to set aside provisions.

The bank expects that provisions going forward, however, may stay at levels seen this quarter (which are still high) and could result in the bank’s overall provisions being at the high end of its historical range, which would put a decent amount of pressure on earnings and lead to weaker earnings than expected by analysts.

Are you looking for more investing ideas for 2016? Consider renewable energy

Renewable energy is predicted to be the largest source of electricity growth over the next five years. A trend like that is simply too hard for us Fools to ignore. Luckily, we've identified 1 Top Renewable Energy Stock for 2016 - And Beyond that we think Canadian investors should take a much closer look at. If you'd like our full analyst report sent directly to your inbox FOR FREE, then click here right now..."

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.