There are plenty of reasons to like Goldman Sachs (GS -0.23%). The company has done a great job of reducing its exposure to risky assets, the investment banking division is firing on all cylinders, and the stock is trading at an extremely cheap valuation.

Source: Company website

However, some situations could be very bad for Goldman's profits and its shareholders. While I don't foresee any of these things happening in the near future, it's good to be prepared for all possibilities. With that in mind, here are three things that could cause Goldman to go down.

IPOs and M&A activity could cool off
As of the most recent quarterly report, Goldman's investment banking revenue was up by 15% year over year on both strong equity underwriting revenue and merger and acquisition activity.

This makes a lot of sense, since the market is just under its all-time high. Companies can get top dollar for their IPO, and are more inclined to accept buyout offers as they generally fetch a premium over an already high share price when the market is hot.

However, what if the market cools off? Goldman depends on its investment banking division for about 20% of its revenue, so a hit to this revenue stream could easily cause a pullback in the share price.

Continued legal drama
One of the big headlines involving Goldman Sachs recently was a recent legal settlement with the Federal Housing Finance Agency to buy back shoddy mortgage securities, which should cost the company about $1.2 billion.

Shareholders breathed a sigh of relief, as experts were projecting a cost of between $800 million and $1.25 billion, so there was no big surprise. But what if Goldman faces another unexpected legal expense?

The company is not likely to be hit with another billion-dollar charge anytime soon, but it doesn't seem too far-fetched to imagine it happening. After all, it seems like Goldman is always under scrutiny for something. Just last month, it was reported that the New York Federal Reserve might have too close of a relationship with Goldman,, and U.S. authorities are probing several other of Goldman's actions.

Trading revenue could stop pleasantly surprising the market
When Goldman reported its second-quarter earnings in July, the company's fixed-income, currency, and commodity, or FICC, trading revenue of $2.22 billion handily beat expectations of less than $1.8 billion. This has been one of the catalysts pushing shares higher since then. Even so, Goldman's extremely high dependence on trading revenue creates perhaps the biggest risk of owning the stock.

Investors should bear in mind that trading is still relatively weak, as the company's trading revenue was the lowest for the first half of a year since the financial crisis in 2008. Goldman is particularly vulnerable, as FICC revenue makes up about one-fourth of the company's total; when you add in equities trading, the exposure accounts for 42% of the total.

If comments by other institutions are any indication, the third-quarter numbers could be quite dismal. Citigroup's CFO said that while he is optimistic that the slump in trading revenue will rebound, he also said July was weak and August was even weaker.

New federal regulations are also not working in Goldman's favor. New rules require banks that hold risky assets to maintain a buffer of funding that cannot be withdrawn in a crisis. The rules affect fixed-income the most, but have definitely impacted all trading volume, since banks must now hold capital for every trade they make.

The combination of a high dependence of trading and those new regulations could mean a big dip in profits if trading revenue were to take a hit.

How likely are these to happen?
It depends on what both the overall economy and the rest of the market are doing.

As long as the major indices stay at or near record-high levels, there is no reason to believe M&A or IPO activity will cool off. And while Goldman has always faced a high level of legal scrutiny, the chances of a huge, unforeseen litigation expense are small. Finally, while the third quarter will likely be weak, I believe trading activity will rebound and Goldman will adapt to the new regulations, just as it has adapted to changes in the past.

While these aren't the most likely scenarios, investors should realize that an investment in Goldman is not without risk.