Well Fargo’s (WFC) chairman and new CEO have dug deep into their own pockets to display their faith in the struggling bank’s turnaround. The pair bought $5 million worth of Well Fargo’s downtrodden stock, capitalizing on share price weakness and injecting some much needed confidence in the company, just several days after it released underwhelming first-quarter earnings results.

Timothy Sloan, a longtime veteran of the bank who was appointed CEO last October, forked out $2 million on 39,000 shares priced at $51.65 each, according to a filing with the Securities and Exchange Commission. Chairman Stephen Sanger was even more generous, buying 58,342 shares at the same price to take his total spend up to $3 million. The news was first reported by CNBC who confirmed that these were new purchases and not compensation.

The decision by two top Wells Fargo executives to buy so many shares surprised Wall Street, particularly as both are likely to receive stock-based compensation as part of their pay packages. That recognition appeared to impress investors, who responded to the announcement by bidding the bank’s shares up 3 percent.

Arresting The Slump

This positive reaction provided some much needed respite in what has been a difficult period for Wells Fargo. The bank’s shares have been in freefall of late, driven mainly by news that it opened fake accounts and other products in customer names without consulting them. (See also: Wells Fargo Draws $185M Fine for Fake Accounts.)

Those messy troubles led the company to post a $29 million year-over-year drop in quarterly earnings. Even though investors saw this coming, the shares still fell on results day. (See also: Wells Fargo's Profit Flat as Costs, Mortgages Weigh.)

One of the biggest concerns was the bank’s efficiency ratio. This closely watched number, which reflects non-interest expenses as a percentage of revenue, came in at 62.7 percent, compared with 58.7 percent the prior year.

To make matters worse, Warren Buffett was forced to offload nearly 2 million shares in the retail bank after the Federal Reserve claimed that his large holding was breaching regulations. Despite not wanting to, Berkshire Hathaway was left with little choice but to bring its stake below 10 percent. (See also: Berkshire Sells Wells Fargo Shares.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.