Goldman Sachs (NYSE:GS) can be thought of as an attractive company for a few reasons. For instance, Goldman's investment banking business is growing at an incredible pace, and the company has a reputation for recruiting the smartest employees on Wall Street. Despite all that, shares are still pretty cheap any way you look at them.

Source: Goldman Sachs

Now that Goldman has accepted an expensive settlement with the Federal Housing Finance Agency (FHFA) over the sale of inferior mortgage bonds, a great deal of uncertainty has been lifted off the company's shoulders. Maybe now is an excellent time to get in, since Goldman's stock isn't likely to be on sale forever.

The legal drama is in the past
Goldman's big headline recently was the announcement that it had agreed to the $3.15 billion repurchase of mortgage-backed securities it sold to Fannie Mae and Freddie Mac between 2005 and 2007.

Source: flickr/ steakpinball.

Although this figure sounds like a lot more than the $800 million-$1.25 billion experts were predicting, the net effect on Goldman is actually right in that range. The securities Goldman is buying back have some value, so the actual cost to the company is the difference between the agreed-upon repurchase price and the current value of the securities, which FHFA estimates at about $1.2 billion.

However, the important thing here is not the money involved, but the closure it brings to Goldman. Without the uncertainty of the lawsuit hanging over its head, the company can breathe a sigh of relief.

Also, even though the settlement amount is quite high, a Goldman press release indicates the costs are covered by the company's reserves.

Still very cheap, even after the post-news rally
After the news of the settlement was released on Aug. 22, Goldman shares immediately popped about 2.5% before retreating slightly. This makes sense, as anytime you remove some uncertainty from a company, the perceived risk in owning shares decreases.

Still, even after the recent rally, shares are very cheap relative to the company's current growth and earnings.

The consensus calls for Goldman to earn $16.53 per share for 2014, meaning that shares trade for just 10.7 times the current year's earnings. According to Standard & Poor's, Goldman is expected to grow its revenue by about 6% annually for the next three years; if the fixed-income industry rebounds, the actual growth rate could be much higher.

Goldman is also very cheap in a historical context. The company trades for just 1.15 times its tangible book value, which is pretty low, even by Goldman's post-crisis valuation history. While the 2007 spike in valuation to more than three times tangible book was probably inflated just like the rest of the sector at that time, price to tangible book value multiples of 1.75 to 2.25 seen steadily before the crisis could today be a realistic target again, now that the mortgage crisis drama is mostly in the past.

GS Price to Tangible Book Value Chart

Why Goldman and not the rest?
Perhaps the most compelling reason to buy Goldman is that there is simply no company that can capitalize on the strongest areas of the investment banking business better than it does.

Just look at the banking industry's most recent quarterly results. Investment banking revenue was up across most of the sector despite a lag in fixed-income trading, mainly thanks to a strong IPO market and a lot of merger and acquisition activity.

However, Goldman's performance is simply in another league. Rivals JPMorgan Chase and Bank of America, the two largest investment banks by fee revenue, grew their revenues by 3% and 2%, respectively, on extremely strong IPO and M&A activity. JPMorgan's 31% gain in advisory fees helped to offset a 6% decline in its largest investment banking fee revenue stream: fixed-income underwriting.

Goldman, on the other hand, grew its total investment banking revenue by 15%, led by a staggering 47% rise in equity underwriting revenue. It is always a good sign when a company is growing in an area others are not, and Goldman's fixed-income underwriting revenue actually rose year over year, in contrast with its peers.

Basically, Goldman is the best at what it does, and it has some of the sharpest minds on Wall Street. In fact, the average Goldman Sachs employee is responsible for more than $1.2 million in annual revenue, well above the industry average of $980,000.

In the wake of the financial crisis, Warren Buffett referred to his investment in Goldman Sachs as "a bet on brains," and the same reasoning holds true today.