Shares of Bank of New York Mellon (BK 0.89%) touched a 52-week high yesterday. Let's take a look at how it got here to find out if the company can soar to greater heights.

How it got here
Banks have been on an upswing these last few months of 2012, and BNY Mellon is no exception. Much of this, of course, has to do with results. The most recent quarter for the sector was one of its best in quite a long time, and BNY Mellon did well -- it saw a 11% year-over-year improvement in net income.

Those gains were minor compared to those posted by some of the sector's big boys. For Wells Fargo (WFC -0.56%), the above number was 22%, while JPMorgan Chase (JPM 0.49%) knocked it out of the park with 35%.

Even the messier banking giants struggling to be as successful as they were in the good old days -- yes, we're talking about you, Bank of America (BAC -0.13%) and Citigroup (C -0.32%) -- have been pulled up by the fortunes of the broader industry and the dramatically improved investor sentiment that has accompanied them. In fact, B of A and Citi are two of the best-performing financials so far this year. Go figure.

BK data by YCharts.

Other factors have contributed to brew up a perfect storm for banking stocks. Mortgages and seemingly anything related to them are showering money on any financial with an active home lending department. This particularly applies to Master of Mortgages Wells Fargo, but the energetic guys following behind (e.g., Morgan) are also raking in plenty. There's more than enough business to go around.

And let's not forget the power of the pundit. Early this week, star analyst Meredith Whitney made the rounds talking up the points she made in a new report cheerfully entitled "Shifting to a Positive Stance on Financials: Upgrading BAC, C, DFS." Positive might be an understatement; among other prognostications, Whitney estimated that B of A could quadruple its dividend early next year. "Pop!" went more than a few banking sector stocks.

A bank apart
BNY Mellon is a different sort of bank. It doesn't go the traditional take-deposit-and-make-loan route (like Wells Fargo these days) or marry an investment bank with retail/commercial operations (Morgan), or create a Frankenstein's monster from both of the above (Citi, B of A). Rather, it occupies a quieter niche as the world's top custodian of other companies' financial instruments. In other words, if you're a bank or a hedge fund, you've probably got BNY Mellon holding at least a few of your assets.

This shields the bank from some of the nasty headwinds rocking the banking sector. Although times are greatly improving for financials these days, their ugly actions in the recent past -- the spreading LIBOR scandal, for instance, or the various megalawsuits over the sale of crisis-era derivatives -- have a way of whacking the Citis and B of As and JPMorgans in the face. And let's not forget the trading catastrophes of the not-so-distant past... London Whale, anyone?

With BNY Mellon, investors don't have to worry as much about these whales and tornadoes wreaking chaos. The bank is the quiet guy in the back office locking share certificates away in the safe, not the loudmouth trader swapping pork belly futures for Treasury bills. The nature of its business insulates the bank from many of the sector's wildest swings. Although this means its upside is somewhat limited, so are the chances it'll get soaked by something big and scary.

What's next
BNY Mellon does well when the banking sector does well; it's prone to slumps when the opposite is true. This is why it had a spot of bother during the crisis, when it necessitated $3 billion in TARP money to stay liquid (which was extremely helpful to the entity loaning it the funds -- the bank was the master custodian keeping watch over $700 billion in government bailout money).

But it's characteristic that its largesse was far smaller than that doled out to its front-line peers; Citigroup and B of A both got $45 billion, to cite a pair of notorious examples. Where the banks go, so goes BNY Mellon, but with less volatility.

That's what the future holds for the company. Which is why it's fortunate that the sector is on an upswing and, barring a steep fall from the fiscal cliff due to political stalemate, poised to continue doing as well into 2013. If its customers keep raking in the dough and don't get hit too badly by those occasional storms, BNY Mellon -- and its stock price -- is probably going to be just fine.