Though indexes have rebounded, the first half of the year has been rocky for investors. The market had to digest a variety of uncertainties, from geopolitical problems to mixed economic data and the U.S. plan to tax imports. All of these factors -- particularly the import tariff announcements -- have weighed on investors' appetite for stocks.

But in recent weeks, trade talk progress has lifted investor optimism, and this, along with strong corporate earnings reports, has helped the S&P 500 return to positive territory for the year. Many great bargains still exist though, making now a fantastic time to invest. Here are my five dirt cheap favorites to buy before the second half, which starts next Tuesday.

A couple smiles as they sip coffee and look at the  screen of a laptop while in their living room.

Image source: Getty Images.

1. Alphabet

Alphabet (GOOG 1.07%) (GOOGL 0.97%) is the cheapest of the "Magnificent Seven" technology stocks that led market gains last year but tumbled this year amid concerns about tariffs and their impact on the economy. Today, the stock trades for 17 times forward earnings estimates, a steal considering the company's earnings track record, strong moat, and prospects across its main businesses.

This tech giant is the owner of something many people use every day: Google Search. It's the world's No. 1 search engine, and its presence in our daily routine and Alphabet's moves to use artificial intelligence (AI) to continually improve results should help it remain on top. This is key because Alphabet generates most of its revenue through advertisements across the Google platform.

Alphabet's Google Cloud also is proving to be a huge part of the revenue picture, generating double-digit quarterly growth in recent times. Again, AI is part of the story as Alphabet makes available a wide range of AI tools for customers. With AI growing in leaps and bounds and Alphabet's price low, now is the perfect time to invest.

2. Viking Therapeutics

Viking Therapeutics (VKTX 8.45%) doesn't yet have products on the market so we can't use traditional valuation metrics to assess the stock price. Instead, it's important to look at pipeline progress, the potential market for its products, and Viking's financial health.

This biotech is working on a variety of candidates for metabolic conditions but the one that's captured investors' attention is VK2735 for weight loss. An injectable candidate is set to start phase 3 trials, and the oral formulation has already started phase 2 trials. Earlier trials have produced strong results, and demand for weight loss drugs is booming -- the market is set to approach $100 billion by the end of the decade.

Though pharma giants Eli Lilly and Novo Nordisk already share the market, demand suggests there's room for additional companies to generate significant growth too. Viking is well positioned to be one of them thanks to its candidates and cash position of more than $800 million to support development. That's why it looks like a bargain today.

3. Target

Target's (TGT 1.04%) revenue growth has stumbled in recent years as shoppers favored essentials over discretionary spending, but this retailer is well positioned to excel over the long term for a few reasons.

Target has built up a strong online presence, and that's helping digital sales advance even if overall sales have stagnated. The company also has invested in its stores through remodels and new openings, and revamped stores generally have delivered higher sales. Target also is known for its owned brands, many of which generate billions of dollars in revenue annually, for example, the Cat & Jack children's clothing line. Owned brands are an important asset for Target as the company has more control over the cost structure and therefore is able to generate higher profits on sales.

On top of this, Target is making moves to focus on growth. In the recent quarter, it announced the creation of an "accleration office" to supercharge decision making and the development of its strategy.

Target stock is cheap, trading at 13 times forward earnings estimates, and could easily head higher with any progress in the coming quarters.

4. Pfizer

Pfizer (PFE 1.17%) is another company that's had a growth problem recently. This is as its top-selling products -- its blockbuster coronavirus vaccine and treatment -- saw declining demand and at the same time, some of Pfizer's older blockbusters headed for patent expiration.

But it's important to take a long-term view and imagine where Pfizer may be a few years from now. The company has brought several new products to market over the past couple of years, and it acquired oncology specialist Seagen as part of an effort to grow its presence in oncology. Importantly, Pfizer says its oncology products are generating high gross margin and operating margin.

Meanwhile, Pfizer also has been working to cut costs, a move to strengthen its business and prepare for a new wave of growth led by its newer products. In the recent quarter, Pfizer said it was on track to deliver $4.5 billion in cost savings by the end of this year. And it expects $500 million of research and development cost savings by next year, and will reinvest this to support pipeline growth.

All of this suggests Pfizer's growth could pick up at any moment, making the stock a bargain trading at about 8 times forward earnings estimates.

5. Carnival

Carnival (CCL 7.11%) (CUK 8.16%) suffered in the early days of the pandemic as it was forced to temporarily halt cruises, but over the past couple of years, the company has been recovering and returning to growth.

The world's biggest cruise operator has done this by focusing on efficiency -- for example, replacing fuel-intensive ships with ones that use less -- and the company also has prioritized paying down debt. It's made significant progress on that, as the chart below shows, and tackled variable-rate debt, a move that makes it less vulnerable to shifts in interest rates.

CCL Total Long Term Debt (Annual) Chart

CCL Total Long Term Debt (Annual) data by YCharts

As for revenue and demand for sailings, they've been on the rise and have reached records in recent quarters. And advanced bookings, even at higher price points, have climbed, too. This is thanks to Carnival's strength in the market as well as the general popularity of cruise vacations.

So, right now, trading at 12 times forward earnings estimates, down from nearly 20 times, Carnival looks like a bargain to get in on before the second half as it continues along its new growth path.