The stock market continued to limp toward the end of the year, and it appeared increasingly unlikely that Wall Street would be able to mount a successful rally to build momentum into 2023. Gains from early Wednesday turned into losses across the board for major market benchmarks, with the Dow Jones Industrial Average (^DJI 0.34%) giving up a modest rise to fall nearly 200 points by midday.

For a long time, Apple (AAPL 0.02%) seemed impervious to the decline in high-growth technology stocks, as its consumer-favorite electronics products continued to draw strong demand even under tough economic conditions. Lately, though, Apple hasn't been able to avoid the drawdown in large-cap tech stocks, and its share price is now approaching levels not seen in nearly two years since early 2021.

Yet even as Apple faces pressures, fellow Dow component Travelers (TRV 0.22%) hit all-time highs on Wednesday. Here's a closer look at both stocks.

Apple shareholders fear economic pain

Shares of Apple were down 2.5% at noon ET on Wednesday. That brought the stock's decline for the year to more than 25%, and although that's actually better than many of its big-tech peers have performed, it nevertheless is a far cry from the single-digit percentage losses for the broader Dow Jones Industrials.

The immediate problem that Apple has faced in recent weeks is that its supply chain for producing various models of its new iPhone 14 product line has faced disruptions. In particular, customers ordering the Pro and Pro Max models of the iPhone 14 faced unusually long delays before they could expect to receive their smartphones. That has led to steady declines in expected iPhone unit sales in the key holiday quarter, potentially disappointing would-be gift givers who had hoped to have devices in hand as presents.

Longer term, even when Apple works through its supply chain woes, the tech giant will also face weakening macroeconomic conditions that could weigh on sales. That's particularly true with some of its higher-priced products, and even with discounting from distribution partners like wireless carriers, Apple could see a bigger sales slump that could weigh on growth and profits in 2023.

Apple still has plenty of compelling reasons for shareholders to own its stock for the long run. The realization that it isn't immune from bear-market pressures, though, has been a blow to the confidence of some investors.

Travelers stock hits a new record

Meanwhile, though, insurance giant Travelers traded briefly at an all-time high before giving back some ground. The stock was down about 1% near noon.

Interestingly, the same factors that have proved problematic for many tech stocks have helped boost Travelers to unprecedented heights. Rising interest rates have restricted access to capital for smaller high-growth companies, but because Travelers holds extensive income-producing investments, rising rates mean greater amounts of future interest income that in turn should boost expenses.

At the same time, the market environment for many insurance lines has been strong. Travelers saw growth in the third quarter across all three of its segments, including personal lines, commercial insurance, and various specialty products. Solid underwriting practices have also helped bolster the insurance giant against tough economic times.

Insurance is a cyclical business, and Travelers can expect to go through difficult conditions at times. But for now, shareholders are reaping the benefits of a strong period for Travelers, and those gains could continue into 2023.