The stock market is on a roll right now. The S&P 500 market index has gained 24% in three months as a mind-boggling 480 out of its 505 tickers posted positive returns over the same period. Now, surging COVID-19 infections could take the wind out of Wall Street's sails any day now, and I don't expect the good times to last much longer. Many of the recently surging stocks will come back to earth in a hurry if and when that happens.

A magnifying glass highlighting a golden dollar-sign key on a white keyboard.

Image source: Getty Images.

But a few companies did genuinely great in the earlier coronavirus downturn and are poised to keep winning in the next market panic. (AMZN -2.56%) and PayPal Holdings (PYPL 0.34%) have been crushing the market all year long, and both look like fantastic buys today -- with or without another game-changing health crisis.

The store

These two stocks are direct plays on the skyrocketing e-commerce sector. The smiling Amazon logo is virtually synonymous with "online retail," and the industry as a whole has been crushing traditional big-box stores and strip malls for a couple of decades. The coronavirus crisis only accelerated a clear market trend in 2020.

Mall stores such as Macy's (M -2.68%) and Gap (GPS -1.28%) saw their quarterly sales fall more than 40% year over year in their most recent earnings reports. At the same time, Amazon's revenues rushed 26% higher.

AMZN Revenue (Quarterly YoY Growth) Chart

AMZN Revenue (Quarterly YoY Growth) data by YCharts

Amazon's management expects another blockbuster revenue reading in the second quarter, scheduled near the end of July. The unseasonal windfall will not generate a ton of bottom-line profits, though. The company has pledged to invest $4 billion in coronavirus-fighting efforts in the second quarter.

In a prepared statement, CEO Jeff Bezos said:

This includes investments in personal protective equipment, enhanced cleaning of our facilities, less efficient process paths that better allow for effective social distancing, higher wages for hourly teams, and hundreds of millions to develop our own COVID-19 testing capabilities.

Bezos added: "I'm confident that our long-term oriented shareowners will understand and embrace our approach, and that in fact they would expect no less."

Amazon shares have gained 2,550% over the last decade, including a 56% surge in 2020 alone, but Jeff Bezos is not out to make a quick buck. He's busy building a business empire for the ages. This is one stock I don't mind buying at all-time highs, possibly on the verge of another drastic market drop.

The money manager

Digital payments processor PayPal follows in Amazon's footsteps in many ways. Both companies have close ties to the world of online shopping; both are highly effective cash machines; and both have been incredibly strong investments in both the long run and 2020 alone. Here's how investments of $10,000 in Amazon and PayPal have increased in value since PayPal's IPO in 2015. An equal-sized investment in the S&P 500 is included to give you a sense of scale:

AMZN Chart

AMZN data by YCharts

The world is waking up to online shopping in a big way, driving PayPal's growth trajectory up through the ceiling. CEO Dan Schulman described April as "probably the strongest month for PayPal since we became a public company."

The simple and secure online transactions offered by PayPal's eponymous service and the Venmo tool are here to stay. The company is also boosting its overseas growth by letting Venmo work as a basic consumer bank in areas of the world where credit cards and checking accounts are hard to find.

Yes, PayPal is trading at all-time highs right now. No, I don't mind paying a premium for a well-run company that would only benefit from another huge COVID-19 crash. PayPal is a strong buy.