Goldman Sachs (GS -0.23%) posted its first-quarter earnings on Thursday, and the numbers look great. The company posted strong improvement in pretty much every aspect of its business, and it handily beat the market's expectations. However, after rising 30% in the past year already, does Goldman Sachs' stock have any more room to the upside?

GS Chart

Strong earnings numbers all around
Goldman Sachs produced $5.94 per share in earnings on $10.62 billion in net revenue, easily beating the market's expectation of $4.26 per share on $9.33 billion. And while the surprisingly good results were a product of Goldman's entire business, there were some things that stood out more than others.

For one thing, trading revenue increased dramatically. As I wrote recently, trading revenue was projected to rise somewhat, but even the most optimistic forecasts were calling for a 16% year-over-year increase. Instead, Goldman's Institutional Client Services division (which consists of the trading operations) saw revenues rise 23% year over year, and a staggering 73% from the fourth quarter.

This was mainly due to outstanding gains in equities, which produced 46% higher revenue than the same quarter last year thanks to higher global equity prices, favorable market-making conditions, and stronger client activity.

Another bright spot was investment banking, which produced a 7% year-over-year gain, including a 41% gain in financial advisory revenues due to stronger M&A activity than during the first quarter of last year.

Goldman's Investing & Lending division also saw its revenue rise, beating last year's results by 9%, which was the result of "company-specific events" in Goldman's private equity investments and solid performance from the company's public equity investments.

Finally, although the company's investment management business may look like a weak spot at first glance, with revenue unchanged year over year, one reason to be optimistic going forward is the fact that Goldman saw net inflows of $7 billion for the quarter. So, the company may not have increased revenue this quarter, but it took in more client assets that will generate revenue in the future.

Goldman kept expenses in check
Bear in mind that the revenue numbers are only one piece of the equation. Specifically, it doesn't matter how much revenues grow if expenses rise right along with them. Fortunately, this is not the case for Goldman.

Although revenue increased 14% year over year, total operating expenses only rose by 6%. Compensation expense increased by 11%, which makes sense. After all, in the financial industry, if your employees are generating more revenue, you have to pay them for their efforts.

However, non-compensation expenses (depreciation, regulatory expenses, clearing fees, and pretty much everything else other than employee salaries and benefits) actually decreased by 3% from the first quarter of last year.

In other words, Goldman is generating more revenue, but is paying less to do so.

Where could we go from here?
As I mentioned, Goldman's share price has risen by 30% over the past year. So, even though this quarter handily beat market expectations, it's only natural to be a little apprehensive about the stock's ability to keep on its upward trajectory.

However, on a price-to-book basis, Goldman still looks pretty cheap on a historical basis, and it trades for almost the exact same valuation as peers Morgan Stanley (MS 0.10%) and JPMorgan Chase (JPM 0.49%).

GS Price to Book Value Chart

Despite recent gains, Goldman Sachs still looks cheap compared to its historical valuation.

As long as the economy stays strong, conditions will remain favorable for Goldman to continue growing, especially in the lucrative trading and investment banking operations. And, if I were going to invest in one of the big investment banks, it would probably be in the one Warren Buffett once referred to as a "bet on brains."