When it comes to investing, it's crucial to recognize that even robust companies with promising long-term growth prospects can experience setbacks. While many investors often wait for the perfect moment, attempting to time the market at its lowest point or during a crash, history has shown that a more consistent approach can be highly effective.

This strategy involves investing in undervalued companies while challenges from economic conditions persist. Rather than sitting on the sidelines, you can capture long-term gains by positioning yourself wisely in anticipation of an eventual economic rebound. Today, we'll delve into two prime examples that fit this mold: PayPal (PYPL -2.62%) and Tesla (TSLA -1.80%).

A shop window display with text Sale on red poster.

Image source: Getty Images.

A resilient payment solution

For the greater part of the past year, PayPal has faced a challenging path. Its shares have declined significantly from their peak at $308 in July 2021 to just above $50 today. The primary reason for this downturn is the tightening economic conditions that consumers face, which directly affect PayPal's revenue.

Despite these hurdles, PayPal has remained resilient, boasting a profitable business model that is producing even in a challenging economy. In its fiscal Q3 2023, the company reported profits exceeding $1.2 billion, continuing its upward trend -- and a significant improvement from Q2 2022 when it posted a $341 million loss.

Furthermore, it achieved an 8% year-over-year increase in net revenue, reaching an all-time high of $7.4 billion. In a less-than-ideal economic landscape, this kind of production is impressive and suggests that when conditions become more favorable, increased profits will follow.

Adding to the attractiveness of PayPal, investors should consider its position as a dominant leader in the growing online payment solutions industry. Notably, over 80% of the world's top 1,000 retailers offer PayPal as a payment choice, according to DigitalCommerce360.

Moreover, PayPal operates one of the most extensive online payment networks, providing a unique advantage in a landscape where online shopping continues to expand. A study by Precedence Research projects a compound annual growth rate of 7.6% for retail e-commerce sales in the coming years. This growth trend positions PayPal favorably to capitalize on evolving consumer behavior.

Today, its price-to-earnings (P/E) ratio is at its lowest point ever at just 14.4, highlighting the attractive valuation of PayPal's stock, especially considering its resilience and leadership in a burgeoning industry. This low valuation signifies an opportune moment for investors to consider PayPal while the company weathers economic challenges yet continues to generate substantial profits.

The EV champion is evolving

In a climate marked by elevated inflation and higher interest rates, consumer preferences have shifted away from luxury items like new electric vehicles. In response, Tesla initiated a strategic series of price cuts on some of its most popular models. While this helped to maintain revenue near all-time highs, it has put pressure on the company's profit margins.

Declining in five of the last six quarters and reaching their lowest levels in years at just under 18%, Tesla's gross profit margins have been an area of concern for investors. Consequently, Tesla's stock has experienced a drop of over 20% in the past month and currently trades nearly 50% below its all-time high.

However, there are compelling reasons to be optimistic about Tesla's future performance. First and foremost, its global presence and expertise in mass-producing electric vehicles at low costs positions the company to meet ever-growing demand.

Additionally, over recent quarters, Tesla has fortified its finances, boasting over $26 billion in cash and equivalents while holding a minuscule $2 billion in debt. This solid financial standing equips Tesla to navigate turbulent economic environments while also investing in extensive research and development (R&D) efforts that should bolster its competitive edge for years to come.

With that $26 billion, Tesla plans on investing in R&D efforts related to autonomous driving and its supercomputer, Dojo. R&D spending has exceeded $1 billion, and Tesla's ultimate objective is to achieve Level 4 or 5 autonomous driving and introduce a robotaxi service. CEO Elon Musk views this endeavor as having "quasi-infinite demand" and believes it could be the driving force propelling Tesla toward a $10 trillion valuation.

Despite the current emphasis on declining profit margins, Musk remains confident. He candidly explained in a recent earnings call that achievement of full autonomy will make any short-term turbulence irrelevant and make "these numbers [profit margins] look silly."

Yet despite these promising endeavors, Tesla's P/E ratio is trading at its lowest level since 2020. Although the road ahead may have its share of challenges as the economy seeks its footing, Tesla exhibits nearly all the characteristics that investors aim for in a growth stock.