Revenue in the quarter totaled nearly $1.15 billion, an increase of 30%.
For the nine-month period, we generated record revenue of more than $3.4 billion, up 28% over the comparable period in 2020.
The growth in revenue and lower expense ratios resulted in non-GAAP earnings per share of $1.65, which is up 56% year-on-year, and $4.85 year-to-date, which is up 68%.
The strength of our results were driven by a combination of revenue growth and expense discipline, resulting in pre-tax margins of nearly 24%.
In addition, reflecting our focus on returns to investor capital, we earned nearly 28% annualized return on tangible common equity.
Tangible book value per share also increased 27% in the last year.
As we forecasted, compensation as a percentage of net revenue declined sequentially to 58.2%.
Our operating expense ratio was 17.9% and, excluding credit provision and investment banking gross-ups, totaled 16.9%, which was within the guidance range we gave on last quarter's call.
Taken together, Stifel's quarterly pre-tax income totaled $274 million, which increased 60% from the third quarter of 2020.
Last quarter, we updated our full year 2021 revenue guidance to be in a range of $4.5 billion to $4.7 billion.
Our annualized nine-months revenue is essentially in the middle of our guidance and would represent our 26th consecutive year of record net revenue and up over 20% from last year.
Since the end of 2015, this approach has enabled us to consistently grow our assets from $13 billion to over $30 billion, execute and integrate 11 acquisitions, add nearly 700 financial advisors, initiate and consistently grow our dividend and repurchase approximately 20 million shares.
We accomplished all of this while improving our pre-tax margins over that time period from 10% to nearly 24% and through the first nine months of 2021 generated an annualized return on tangible equity of nearly 30%.
Our analysis indicates that 70% of Vining Sparks' revenue is generated from depositories with less than $2 billion in assets, while nearly 75% of Stifel's depository revenue comes from clients with greater than $2 billion in assets.
Looking another way at the complementary profile of this combination, there exists only a 5% revenue overlap within end clients of the combined client base.
Third quarter revenue totaled $656 million, up 24% year-on-year, and year-to-date revenue was approximately $1.9 billion, an increase of 19%.
Despite muted growth in equity valuations during the third quarter, as measured by the S&P 500, we finished the quarter with record client assets of $407 billion and fee-based assets of approximately $150 billion.
I am pleased with both our loan growth and improvement in both net interest income, which increased 21% over last year, and a 10-basis point sequential improvement in our net interest margin.
For the quarter, we added 46 advisors, including 41 experienced advisors, with total trailing 12-month production of $35 million.
Our quarterly net revenue totaled $492 million, which was up 36% from the prior year.
nine-month revenue increased 39%, to over $1.5 billion.
Record quarterly advisory revenues of $208 million were up nearly 160%, while capital raising posted revenue of $153 million, up 18%.
As expected, trading revenue declined to $124 million, while year-to-date trading declined 10%, to $455 million.
Our Institutional pre-tax margin for the quarter was 25.4%, which was our second highest, trailing only the second quarter of this year.
For the first nine months, pre-tax margin was 25.3% and was up nearly 700 basis points, as we continue to generate substantial top line growth, which drives operating leverage.
Looking at the revenue components of the Institutional group, our equities business posted record nine-month results of $533 million, up 37%, while our third quarter revenue totaled $142 million, up 7% year-on-year.
Our fixed income business posted year-to-date revenue of $428 million and quarterly revenue of $135 million.
With respect to our trading businesses, quarterly equity revenue totaled $48 million, down 21% sequentially.
As I stated earlier, this was the result of lower market activity level, as volumes on the NYSE and NASDAQ declined 8% sequentially.
For the first nine months, equity trading revenue was $189 million, up 1% from 2020.
Fixed income trading revenue of $76 million was down 17% sequentially, as we saw lower activity levels in agencies, corporates and munis, as overall market activity declined a similar amount.
On slide nine, investment banking quarterly revenue increased 71%, to $372 million, which was just $5 million short of what would have amounted to our fourth consecutive quarterly record.
Year-to-date, investment banking revenue totals nearly $1.1 billion, up 77%, as both advisory and capital raising are having record years.
The $208 million of advisory revenue was our second consecutive record quarter, driven primarily by the strength of our U.S. business; notably, financials, diversified services and technology.
Moving on to capital raising, our equity underwriting business posted revenue of $104 million, up 22%.
Our fixed income underwriting business posted its second consecutive record quarter, with $61 million in revenue, up 6% sequentially.
Our municipal finance business posted another great quarter, as we lead-managed 257 municipal issues.
For the first nine months, our market share in terms of number of transactions increased year-on-year by 140 basis points, to 12.7% market share.
For the quarter, net interest income totaled $132 million, which was up 10% sequentially.
Our firmwide net interest margin increased to 210 basis points, primarily due to increases in leverage finance fee income and our stock loan business, while our bank NIM remained at 240 basis points.
The growth in our NII was driven by a 5% increase in our interest-earning assets as well as the aforementioned increased leverage finance fee income and security lending activity.
In terms of our fourth quarter expectations, we see net interest income in a range of $125 million to $135 million and with a similar NIM to the third quarter, as we expect lower activity levels in some of the more episodic fee income opportunities to -- growth in our balance sheet.
In our first quarter earnings call, we estimated that we'd generate an incremental $150 million to $175 million of pre-tax income as a result of a 100-basis point increase in rates.
However, given the nearly $3 billion increase in our balance sheet since the end of the first quarter, we are revising this forecast to a range of $175 million to $200 million, using the same market and deposit beta assumptions.
We ended the quarter with total net loans of $13.6 billion, which was up approximately $730 million from the prior quarter and was primarily driven by growth in our consumer channel.
Our mortgage portfolio increased by $390 million sequentially, as we continue to see demand for residential loans from our Wealth Management clients.
Our securities-based loan portfolio increased by approximately $250 million.
Our commercial portfolio increased by nearly $100 million sequentially, primarily due to a 5% increase in C&I loans, as increases in fund banking loans more than offset the expected reduction in PPP loans.
Moving to the investment portfolio, which increased by $330 million sequentially, the vast majority of the sequential growth was in our CLO portfolio, as we continue to see these securities as generating strong risk-adjusted returns.
We had a modest reserve release of approximately $700,000, as the improvement in our economic projections was essentially offset by the additional reserves tied to loan growth.
As a result of the reserve release and the composition of our loan growth during the quarter, our ratio of allowance to total loans declined to 91 basis points, excluding PPP loans.
At quarter-end, the consumer allowance to total loans was 36 basis points; for the commercial portfolio, it was 120 basis points.
Our risk-based and leveraged capital ratios increased to 20.6% and 12%, respectively.
The increase in our capital ratios was a result of continued strength in our operating results, an incremental $150 million of preferred equity and the decreasing impact of volatility associated with the pandemic on our trading portfolio.
We continued our share repurchase program in the third quarter by buying back 670,000 shares at an average price of $66.74.
Year-to-date, we've repurchased nearly 1.5 million shares, at an average cost of $66.34.
We have approximately 11.8 million shares remaining on our current share repurchase authorization.
In addition to the $6 billion available in our Sweep Program, the bank has access to off-balance sheet funding of more than $5 billion.
In the third quarter, our pre-tax margin improved 450 basis points year-on-year, to nearly 24%.
Our comp-to-revenue ratio of 58.2% was down 140 basis points from the prior year and was down 130 basis points from the prior quarter.
For the first nine months of this year, our comp ratio was 59.5%, which was down 120 basis points from 2020.
But I would note that our total year-to-date comp expense is more than $400 million above the comparable period in 2020.
Non-compensation operating expenses, excluding the credit loss provision and expenses related to investment banking transactions, totaled approximately $194 million and represented 16.9% of our net revenue.
In the quarter, our non-GAAP after-tax adjustments totaled $13 million, or $0.11 per share.
The effective tax rate during the quarter came in at 25%, which was at the midpoint of our guidance we gave for the second half of 2021 on our last earnings call.
In terms of our share count, our average fully diluted share count declined by 125,000 shares and was roughly in line with our guidance on last quarter's call.
Absent any assumption for additional share repurchases and assuming a stable stock price, we'd expect the fourth quarter fully diluted share count to be 119.5 million shares.
Through the first nine months, we're not only on pace to surpass our full year record revenue by more than 20%, but our earnings per share has already eclipsed last year's full year record, as our pre-tax margin is up more than 400 basis points despite the headwinds of a 0-interest rate environment.

Summary:
Revenue in the quarter totaled nearly $1.15 billion, an increase of 30%.
The growth in revenue and lower expense ratios resulted in non-GAAP earnings per share of $1.65, which is up 56% year-on-year, and $4.85 year-to-date, which is up 68%.