There's no need for a visit to a theme park when you're an investor in the stock market -- at least since this decade began. Over the previous four years, all three major stock indexes have traded off bear and bull markets in successive years. It's been a dizzying ride at times that demonstrates the unpredictability of short-term moves in the stock market.

But it's also an excellent reminder that Wall Street is a bona fide wealth-building machine over the long run. Even though the Dow Jones Industrial Average and S&P 500 have motored to fresh all-time highs in 2024, deals can always be found with some digging.

A person counting four one hundred dollar bills in a wallet.

Image source: Getty Images.

What's particularly great about putting your money to work in the stock market is that most online brokers have torn down barriers that previously kept retail investors on the sidelines. Minimum-deposit requirements and commission fees for common-stock transactions on major U.S. exchanges have largely been eliminated. This means any amount of money -- even $400 -- can be the perfect amount to put to work.

If you have $400 ready to invest, and you're absolutely certain you won't need this cash to pay your bills or cover emergency expenses as they arise, the following three stocks stand out as no-brainer buys right now.

Alphabet

The first amazing stock that investors can confidently put $400 to work in right now is FAANG component Alphabet (GOOGL 10.22%) (GOOG 9.96%). Alphabet is the parent of search engine Google, streaming platform YouTube, and burgeoning cloud-infrastructure service platform Google Cloud, among other ventures.

The biggest challenge a company like Alphabet faces is that it's cyclical and tied to the advertising industry. Last year, approximately 76% of its $86.3 billion in total sales came from ads via Google search, Google Network, and YouTube.

It's no secret that advertisers are quick to pare back their spending at the first hint of trouble with the U.S. and/or global economy. If certain money-based metrics prove accurate and a U.S. recession does take shape sometime in 2024, it wouldn't be a surprise to see Alphabet's ad segment struggle a bit.

The thing is, there's a big difference between recessions and an expanding economy. Whereas all 12 recessions since the end of World War II have lasted 18 months or less, two expansions alone have reached the decade mark. Patience tends to pay off handsomely with innovative ad-driven businesses.

Moreover, Alphabet has a clear-cut competitive advantage with Google. In January, it accounted for almost 91.5% of worldwide internet search share. Having a practical monopoly in internet search has ensured rock-solid ad-pricing power for the company and allowed this foundational segment to turn into a reliable cash cow.

But Alphabet's long-term growth story is more about what's going on with its ancillary operations. In particular, Google Cloud accounts for 10% of global spending for cloud infrastructure service, and the segment has delivered four consecutive quarters of operating income following multiple years of losses.

Cloud service margins tend to be considerably higher than advertising margins, which suggests this segment could be Alphabet's core cash-flow driver by the latter half of the decade.

The final puzzle piece is that Alphabet is historically cheap. Despite averaging a multiple of 18 times cash flow over the previous five years, investors can buy shares of Alphabet for just 12.6 times forecast cash flow in 2025.

Fiverr International

A second no-brainer stock that's begging to be bought with $400 right now is online-services marketplace Fiverr International (FVRR 3.74%).

Similar to Alphabet, Fiverr's stock and operating performance tend to be tied to the health of the U.S. economy. Since Fiverr's marketplace is designed to help businesses locate freelancers and purchase their services, a healthy labor market is needed. If the U.S. economy dips into a recession, the unemployment rate is likely to rise. This would be bad news for Fiverr over the short run.

But just as I pointed out with Alphabet, Fiverr benefits from extended periods of growth in the U.S. economy. While nine of the aforementioned 12 recessions since the end of World War II resolved in under a year, most periods of expansion have lasted multiple years. This is an environment where businesses focused on the job market can thrive over long periods.

Another macro factor working in Fiverr's favor is the shift we've witnessed in the labor market due to the pandemic. Though some workers have returned to the office, far more people are working remotely. This perfectly ties into Fiverr's long-term expansion and its freelancer-driven online services marketplace.

On a company-specific basis, the uniqueness of Fiverr's platform stands out. While most of its competition allows freelancers to price their services at an hourly rate, Fiverr freelancers are listing their tasks as an all-inclusive price. The price transparency offered by the company has clearly resonated with buyers, as evidenced by spend per buyer continuing to climb.

Yet the top selling point for Fiverr might just be its take rate -- i.e., the percentage of each deal, including fees, that it gets to keep. Whereas most of its peers have take rates in the mid to high teens, Fiverr's has expanded to 31.3%, as of Sept. 30, 2023.

It's been able to take a bigger piece of the pie, yet isn't losing freelancers or buyers. This is a recipe for sustained long-term growth and higher margins.

A smiling pharmacist holding a prescription bottle while with a customer.

Image source: Getty Images.

Walgreens Boots Alliance

The third no-brainer stock to buy with $400 right now is pharmacy chain Walgreens Boots Alliance (WBA 0.57%).

The problems at Walgreens are well documented. Increased pharmacy competition from online retailers, coupled with the high costs of horizontal expansion, weighed on results. Recently, the company nearly halved its dividend, which ended a 47-year streak of base annual payout increases.

Though Walgreens' turnaround isn't going to take shape overnight, it does have the tools and leadership to deliver in a big way for patient shareholders.

As with any turnaround, cost efficiency is important. After easily reaching its mark of $2 billion in annual cost savings a year ahead of schedule in fiscal 2021, the company is now targeting $4.1 billion in aggregate cost savings. It's also considering the sale of specialty pharmacy segment Shields Health Solutions, which would lower the company's costs and likely improve its operating cash flow.

However, shrinking costs is only part of the story. Although Walgreens Boots Alliance isn't the growth story it once was, there are needle-moving catalysts in place. For instance, the company is spending aggressively on various digitization initiatives to streamline its supply chain, as well as to promote direct-to-consumer purchases. Even though online sales represent only a small percentage of net sales, it's a segment that can lead to sustained, above-average organic growth.

Furthermore, it's finally focusing its efforts on vertical expansion. Specifically, it has made a big shift into healthcare services.

A major investment in VillageMD will see the duo open 1,000 full-service health clinics in Walgreens' stores in 30 U.S. markets by the end of 2027. Being physician-staffed is a differentiator that should lead to repeat visits and increase foot traffic into its stores.

Don't overlook the importance of Walgreens' new CEO, either. Tim Wentworth, who officially took the reins in October, has a long history of working in the healthcare field, which was something Walgreens' preceding CEO, Rosalind Brewer, lacked.

Lastly, the valuation makes sense. Investors right now would be paying just 6 times forward-year earnings for Walgreens Boots Alliance stock, and they're receiving a 4.5% yield. That's a heck of a deal for a time-tested and profitable company in the healthcare space.