The market's been testing investor patience lately, and while it's common to hear the advice to buy low, sticking to one's guns and taking advantage of Mr. Market's inevitable drops is tough to do when the chips are down and losses are mounting. 

So, given that backdrop, I thought it might be the perfect time to look back at three savvy buys made by companies in the depths of the great recession to reinforce why investors may want to keep a cool head and maintain a long-term focus in the face of a tumbling tape.

Source: Bank of America

Turning trash into treasure
Following the collapse of Lehman Brothers in September 2008,
Bank of America (NYSE:BAC) spent a rushed weekend working out a deal to acquire Merrill Lynch for $50 billion in stock.

In the months following the deal, worries that mounting losses tied to collateralized debt obligations at Merrill would imperil the bank caused Bank of America's share price to nosedive from north of $35 to about $10. In the face of Merrill's writedowns and shaky investor confidence, many felt walking away from the Merrill deal would have been the BofA's best bet. However, abandoning the chance to buy Merrill would have been a mistake. 

Although Merrill saddled Bank of America with billions of dollars in souring debt obligations and legal bills, Bank of America also got a storied Wall Street firm with roots dating back to 1914, a national investor distribution network of more than 15,000 brokers, and an investment banking footprint in more than three dozen countries.

That depth and breadth has led to billions in profit for Bank of America. In 2012, Merrill's wealth management business posted revenue of $13.8 billion and net income of $2.2 billion, and in 2013 the unit's sales grew 8% to $14.8 billion and net income jumped to $3 billion. Bank of America has also seen solid results from its global banking and global markets businesses and as a result, Merrill's legacy operations have become the most profitable part of Bank of America's business.

Taking advantage of stumbling competitors
During the financial crisis, Barclays had a problem on its hands. It had shunned help
 from the Bank of England to shore up its balance sheet, but it still needed to boost its liquidity. So in June 2009, it sold its wealth management business to BlackRock (NYSE:BLK) for $13.5 billion, including $6.6 billion in cash. In return, BlackRock landed iShares, one of the biggest players in exchange-traded funds, or ETFs.

At the time, there was little evidence that a market bottom was in or that asset values for equities would bounce back. The economic recovery was only in its earliest stages and sentiment toward stocks remained bearish. So it would have been an easy decision to forego buying iShares and avoid the risk of markets making new lows. 

However, that wouldn't have been the right choice. Demand for ETFs surged after the recession as investors sought out low-cost alternatives to mutual funds. According to the Investment Company Institute, assets under management in U.S. ETFs has grown from $531 billion in 2008 to more than $1.6 trillion last year.

Source: Investment Company Institute

As a result, assets under management at iShares have climbed from $570 billion in 2010 to $975 billion exiting the third quarter of this year, and that's boosted iShares revenue from $1.9 billion in 2010 to an annualized pace of about $3.3 billion today. Given iShares growth, BlackRock's bargain basement purchase has been money well spent.

Throwing a life line
Goldman Sachs 
(NYSE:GS) was on better footing than its investment banking peers when the bottom fell out of securitized mortgages, but that didn't mean that Goldman didn't take it on the chin.

In the wake of Lehman, Bear Stearns, and Merrill's demise, Goldman was desperate to sure up confidence and prove itself worthy of its best-in-breed status and that desperation gave Warren Buffett's Berkshire Hathaway (NYSE:BRK-B) the chance to make what is arguably the best deal of these three.

Buffett's Berkshire loaned Goldman Sachs $5 billion, giving Goldman's balance sheet much needed wiggle room and confidence inspiring media attention. In return, Berkshire got preferred stock with a 10% dividend yield and warrants allowing it to buy 43 million shares of Goldman for $115 per share.

In 2011, Goldman paid Berkshire $5.5 billion to redeem Berkshire's preferred shares and last year, Buffett and Goldman revised their agreement on the warrants to allow Berkshire to use its paper profit to buy a smaller number of shares than it would have had to buy if the deal hadn't been renegotiated. 

As a result, Buffett didn't pay a dime to get its hands on a 12.6 million share stake in Goldman that makes Berkshire Goldman's fifth largest shareholder. That stake is worth about $2.2 billion at current prices, but the total profit Buffett may earn on this deal could end up being significantly higher.

Following footsteps
The average Joe can't orchestrate a multibillion-dollar bargain like these three companies did, but investors can still profit by mimicking these buyers' blue-light mentality. After all, as these three deals show, overcoming fear to buy good companies when others are selling may end up making a big, profit-friendly impact on retirement nest eggs.

Todd Campbell has no position in any stocks mentioned. Todd owns E.B. Capital Markets, LLC. E.B. Capital's clients may or may not have positions in the companies mentioned. Todd owns Gundalow Advisors, LLC. Gundalow's clients do not have positions in the companies mentioned. The Motley Fool recommends Bank of America, Berkshire Hathaway, BlackRock, and Goldman Sachs. The Motley Fool owns shares of Bank of America and Berkshire Hathaway. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.