The kids are back in school, every store smells of pumpkin spice, and the neighbors are putting up Halloween decorations already. October is here, kicking off the fourth quarter of 2023.

The stock market has repaired most of the damage from an inflation-burdened 2022, with double-digit gains in the S&P 500 (SNPINDEX: ^GSPC) and Nasdaq Composite (NASDAQINDEX: ^IXIC) market indices. But it hasn't been a smooth ride. The industry giants of the Dow Jones Industrial Average (DJINDICES: ^DJI) index have traded largely sideways this year, and all major index values are down by more than 5% over the past two months.

There must be many hidden gems tucked away in this bumpy market. So we asked a few of The Motley Fool's top analysts to share their best investment ideas for early October. They came back with consumer-goods giants, energy stocks, biotech experts, media leaders, and financial-service veterans. Read on for the full scoop on these five fantastic buys.

Hundred-dollar bills on top of autumnal maple leaves.

Image source: Getty Images.

Target is ready for an economic slowdown

Daniel Foelber (Target): Big-box retailer Target (TGT 0.18%) was a top pick for our monthly investing discussion in September. Not a lot has changed about the long-term investment thesis for Target. But what has changed is the price of the stock.

Target stock has nosedived. The sell-off has transitioned from painful to brutal, as Target is now trading at a three-year low, down more than 57% from its all-time high and over 8% in the past month alone.

The fear surrounding retailers like Target is that interest rates will stay higher for longer, consumer spending will weaken, and the economy will take a hit. All of those things could happen. But what investors may be missing is that Target was already expecting consumer spending to stay weak.

In its last earnings call, analysts unleashed an onslaught of questions regarding consumer spending. And Target didn't shy away from the reality that consumer discretionary spending is down and customers are shifting more toward consumer staples and essentials.

Target mismanaged its inventory over the past few years, over-ordering only to implement steep discounts to move products off the shelves. The company isn't making the same mistake twice.

The retailer is purposely entering the holiday season with a lean inventory slate. If consumer demand is better than expected, Target will probably end up leaving potential sales on the table. But if consumer demand is weak or even worse than expected, Target will be in a good position to not get caught off guard.

This cautiously pessimistic strategy is a great example of the measures a company can take to combat what it can't control. Aside from reducing inventory, Target continues to invest in its Target Circle rewards program and respond to other customer needs. In sum, the long-term future of the business remains intact.

Target recently raised its dividend to a record high. The raise, paired with the sell-off, gives Target a dividend yield of 3.8% and a price-to-earnings ratio of just 15.5. Target has value and income written all over it. The dividend gives investors a sizable incentive to wait for things to turn around.

Vertex sees blue skies ahead

Keith Speights (Vertex Pharmaceuticals): October doesn't have a great reputation with investors. Several of the biggest stock market sell-offs have occurred during the month. However, I think there's one stock you can buy in October that could have nothing but blue skies ahead: Biotech veteran Vertex Pharmaceuticals (VRTX -0.06%).

Vertex has a monopoly in treating the underlying cause of cystic fibrosis (CF). It won't face any competition over the next several years in the CF market, which means the company's revenue and profit should be highly reliable even if the economy declines or the stock market tanks.

Even better, Vertex could have its best CF drug yet on the way. The company expects to announce results from a late-stage clinical study of a triple-drug combo featuring vanzacaftor by the end of 2023. If those results are positive, Vertex is likely to quickly file for regulatory approvals in the U.S. and Europe. The combo CF therapy will have a "meaningfully lower royalty burden" than Vertex's other CF therapies, which should boost the biotech's profits. 

I'm especially enthusiastic about Vertex's efforts to expand beyond CF. The company could win U.S. approvals for exa-cel in curing the rare blood disorders sickle cell disease and transfusion-dependent beta-thalassemia over the next few months. It also appears to be on track for a potential near-term launch of the non-opioid pain drug VX-548 if the late-stage results announced later this year are positive. 

In my view, these programs would make Vertex attractive to investors. However, the biotech's pipeline features two other candidates that are icing on the cake. Vertex is evaluating inaxaplin in a pivotal clinical study targeting APOL1-mediated kidney disease, which affects more patients than CF does. It also has three promising early-stage therapies that hold the potential to cure type 1 diabetes. 

You might think that Vertex's valuation would be sky-high considering its tremendous prospects. That's not the case, though. The drugmaker's price-to-earnings-to-growth (PEG) ratio is only 0.5 -- a super-low level.

It's darkest before dawn at the House of Mouse

Anders Bylund (Walt Disney): Media powerhouse Walt Disney (DIS -0.04%) is trading at prices not seen since (checks notes) the summer of 2014. The COVID-19 shutdown plunge didn't go this deep. The stock sits nearly 60% below the all-time highs from early 2021.

That sounds like a company in financial freefall, but Disney is doing better than you'd think. It's true that the company's cash flows and bottom-line profits haven't recovered from the drastic haircuts of the coronavirus lockdown era, but even amid an economic crisis tinged with inflation, sales are reaching record highs. The robust revenues provide a springboard from which Disney can explore new paths to long-term profits.

And the turnaround started about a year ago, when legendary CEO Bob Iger came back from retirement to replace the controversial and ineffective leadership of Bob Chapek. Disney is still dealing with fallout from some of Chapek's mistakes.

So I understand if investors want to slap a risk-based discount on Disney's stock these days, but the price cut went too far. Iger will hold the reins in his capable hands at least until 2026, rebuilding the damaged brand and finding the right balance between digital streaming and traditional content publishing.

The sprawling Disney conglomerate is transforming into a tighter package with three core businesses: streaming, the film studios, and theme parks. These operations are all "inextricably linked to our brands and franchises," as Iger said in August's third-quarter earnings call. That's the right attitude to managing a global brand that was built on top-notch storytelling and creativity.

I have full confidence in Iger. Without him, Disney's plunging stock chart might make sense. But the right person is steering Disney through these rough waters, and I expect the limited earnings to bounce back over time.

And that's why Disney's low stock price excites me. We're looking at a world-class business relegated to Wall Street's bargain bin. Walt Disney is a fantastic buy right now.

Play higher oil prices with this stock

Neha Chamaria (Devon Energy): Oil prices have made a dramatic comeback in recent weeks, surging nearly 30% in just the past three months. It's an opportune time to consider buying a stock like Devon Energy (DVN 0.19%), whose dividends could surge alongside oil prices. Of course, Devon Energy has a lot to offer even if oil prices fail to sustain momentum.

Devon Energy's dividend policy can mean huge dividends in a rising oil-price environment like the one we're witnessing now. The oil and gas producer pays a fixed dividend every quarter like most oil companies do. But it also pays a variable dividend on top of it, equal to up to 50% of the free cash flows remaining after funding its fixed dividend.

Since cash flows rise with oil prices, that explains why Devon Energy could pay big variable dividends last year, and its total dividend payout rose to $5.17 per share from only $1.97 in 2021. Its dividends fell in recent quarters because of lower oil prices earlier this year, but we could see bigger dividends again.

Devon Energy is on strong footing as an oil stock. It has a low breakeven funding level of $40 West Texas Intermediate crude oil, which means this is the oil price the company needs to fund all its operating and capital expenditures this year. Anything above that can go toward dividends, share repurchases, and debt repayment. Dividends, though, are the company's top funding priority, and that makes Devon Energy an alluring stock now, more so since it's still down about 21% year to date and yielding a solid 7.3%.

This is one of the world's largest payments companies

Trevor Jennewine (Mastercard): Electronic payments are only becoming more prevalent, and Mastercard (MA 0.07%) operates one of the largest payments networks in the world. It ranked third behind Visa (NYSE: V) and UnionPay as measured by purchase transactions in 2022, and it's essentially tied with Visa in terms of acceptance locations. The upshot of that prodigious scale is a powerful network effect and a durable cost advantage that allows Mastercard to earn higher profit margins than smaller competitors such as American Express (NYSE: AXP) and PayPal (NASDAQ: PYPL).

In turn, Mastercard can afford to invest more aggressively in its business, and that has translated into solid financial results on a relatively consistent basis. That trend continued in the second quarter, helped along by resilient consumer spending. Revenue rose 14% to $6.3 billion on solid momentum in dollar volume and processed transactions, and earnings jumped 28% to $3.00 per diluted share.

Looking ahead, Boston Consulting Group projects that global payments revenue will increase at 6.2% annually through 2027, but investors can expect faster growth from Mastercard. The company has consistently outpaced the industry average in the past, and its scale should allow for similar outperformance in the future. For instance, Morgan Stanley (NYSE: MS) is forecasting annual revenue growth in the low to mid-teens through 2024.

However, Mastercard has consistently returned cash to shareholders through stock buybacks, and the continuation of that trend in the future means bottom-line growth should outpace top-line growth. Wall Street agrees. The consensus estimate calls for long-term annual earnings growth of 21% on a per-share basis. That makes its current valuation multiple of 37.4 times earnings seem reasonable, especially when the three-year average is 42.4 times earnings. That's why Mastercard stock is a buy in October.