The S&P 500 index is off to its worst six-month start in 50 years, making it a challenging environment for investors. No one likes seeing their portfolio go down in value. However, you must remember that market downturns are a normal part of investing -- and they can present you with opportunities to buy great companies at discounted prices.

The capital markets industry has some high-quality companies with the potential to deliver excellent returns to patient, long-term investors. Here are three such companies you can buy before the market recovers.

1. Tradeweb Markets

Tradeweb Markets (TW 0.47%) provides the most prominent players on Wall Street, like hedge funds and central banks, with a platform to trade a range of assets. Tradeweb was founded in 1996 and brought U.S. Treasuries trading into the digital age. Tradeweb helps clients trade assets, including government debt, corporate debt, equities, and money markets.

The company is increasingly becoming the platform of choice for many traders and is grabbing market share rapidly. One way to examine its growth is by looking at Tradeweb's volume growth compared to the broader market. Since 2015, volume in these assets has increased at 8%, compounded annually. In comparison, Tradeweb's volume in these markets has increased by 23% on a compound annual basis.  

A chart shows Tradeweb's average daily volume growth.

Image source: Tradeweb.

In the first quarter, Tradeweb's total trading volume was at a record level, resulting in revenue and net income increasing by 14% and 22%.  

Tradeweb stock is down 31% year to date and trades at a forward price-to-earnings ratio (P/E) of 36 as of Monday's close. This valuation reflects strong growth expectations, with analysts projecting that Tradeweb's earnings per share (EPS) will grow 15% in 2022 and 12% in 2023.  

Tradeweb has done an excellent job of taking market share, making it an outstanding stock to buy before the market recovers.

2. Focus Financial Partners

Focus Financial Partners (FOCS) provides advisory services to high-net-worth families and individuals as a registered investment advisory (RIA).

The company sees its RIA business model as a distinct advantage over traditional brokerages. That's because RIAs have a fiduciary obligation to their clients, meaning they must put the interest of the clients above their own. This contrasts with broker-dealers who have to follow a less stringent suitability standard, meaning transactions must only be suitable for clients' needs. According to McKinsey & Co., RIA firms have been the fastest-growing category in the U.S. wealth management market since 2016.  

Focus Financial has grown aggressively through mergers and acquisitions and has added 80 partner firms to its network since 2006. Since 2019, Focus Financial has grown its revenue by a compound rate of 25% annually. Organic revenue growth -- which strips out the effects of acquisitions -- averaged 15% annually during this period.

FOCS Revenue (TTM) Chart

FOCS Revenue (TTM) data by YCharts.

Meanwhile, analysts expect sales to grow 20% in 2022 and another 16% in 2023.  

Even though Focus Financial is well positioned in a rapidly growing industry, the stock is down 36% year to date and trades at a one-year forward P/E ratio of just 8.7. It looks like another excellent stock to buy as investors seek trustworthy advice amid high inflation and rising interest rates.

3. Charles Schwab

Charles Schwab (SCHW -0.29%) provides financial advice, wealth management, asset management, and brokerage services through TD Ameritrade. It also provides banking services like checking and savings accounts; extends margin loans on its trading platform; and holds interest-earning assets, which generate net interest revenue for the firm.

Income from interest is a significant business driver for Schwab, accounting for 43% of the company's net revenue last year. For this reason, the firm benefits from rising interest rates; in the second quarter, net interest income was up over 30%. This has helped the firm hold up well despite market volatility. Schwab posted record revenue of $5.1 billion in the second quarter, an increase of 13% from last year. Meanwhile, net income was up 16%.

Owning a banking charter makes Charles Schwab subject to Federal Reserve stress tests, which evaluate how well a financial institution would hold up in a series of adverse scenarios. According to the Fed's latest round of testing, Schwab is fairly well insulated from credit risk -- in the worst-case scenario, the company would take a mere 1% loss on its loan books.

Charles Schwab is an excellent long-term performer, and its profit margins have hovered around 30% in recent years. The stock is down 24% year to date and trades at a one-year forward P/E ratio around 14. Its robust balance sheet benefits as the Fed continues raising rates, and it's better positioned than its peers to weather a market downturn, making it another excellent stock to consider buying before the market recovers.