Charles Schwab (SCHW  ) shares were 18% higher following the company's better-than-expected Q3 earnings report which showed a beat on the top and bottom line. The major factor in the company's earnings beat was the rise in short-term rates which means it earns a higher return on the cash held in customers' accounts.

This makes Schwab an intriguing stock as it's one of the few companies that see higher earnings in an environment of raising rates. The company has also been able to overcome the headwind of the decline in retail trading volumes which have proven too cumbersome for less established players like Robinhood (HOOD  ) and Coinbase (COIN  ).

Overall, Schwab shares are down only 4.5% YTD which is significantly better than the S&P 500's (SPY  ) 18% YTD loss. The share price is off by about 21% from it's all-time high early this year, but the company's earnings are expected to be about 65% higher in the interim. This has led to shares becoming quite cheap and attractive on a valuation basis with a forward P/E of 16.8, especially if investors see the higher rate environment persisting.

Inside the Numbers

In Q3, Schwab reported $1.10 in earnings per share which topped analysts' expectations and were a 31% improvement over last year. Revenue also topped expectations at $5.5 billion vs $5.4 billion and was 19.6% higher than last year.

As noted above, the biggest driver of the revenue increase was net interest revenue coming in at $2.9 billion, a 44% increase from last year. In total, net interest margin increased by 35 basis points to 1.97%.

Another surprise and contrary to the prevailing recession narrative are that the company's core net new assets also increased by 7% to $115 billion as it had a record in Q3 inflows from retail investors.

Overall, it was a notable quarter as the company set new records in terms of the top and bottom lines. Schwab's core business is also growing at a slower rate in an adverse environment but the company's stock price will likely be more influenced by the direction of short-term rates. Thus, it's a bet on the current environment continuing - an economy that is resilient enough to ensure continued asset growth but strong enough inflationary pressures that rates remain elevated.