The S&P 500 has been doing well recently, as stocks are rallying since March's crash and investors shrug off the COVID-19 pandemic and the current economic recession. That makes it difficult to find stocks to buy on the dip, especially ones that aren't speculative investments. But there are still deals out there.

For investors looking for discounted but resilient stocks, here are two that are down more than 10% in the past month that are also attractive buys right now.

Sale sign

Image source: Getty Images.

1. Barrick Gold

Barrick Gold (NYSE:GOLD) is a top mining company that, as its ticker symbol suggests, mines for gold. It also generates revenue from copper, but that's a relatively small part of its business. In the company's first-quarter results of 2020, which Barrick released on May 6, copper-related revenue made up just 3.6% of its total sales. And that's par for the course, as this is primarily a gold stock.

The downside of being a gold stock is that Barrick's share price is at the mercy of gold prices. It's no coincidence that as the price of gold has been dropping over the past month, so too has Barrick's share price -- it's down almost 13% while the S&P 500 is up nearly 6%. Generally, when investors are bullish about the markets, as they've been in recent weeks, demand for gold starts to soften.

For long-term investors, the stock can serve two purposes. The first is that it can provide stability and balance out other stocks in their portfolios that are struggling. Since the stock isn't volatile and typically runs in the opposite direction of the broader market, it's a good way to add diversification to your portfolio and to provide balance.

Second, the stock also pays a dividend. The Canadian miner pays its dividend payments in U.S. dollars, so American investors won't see fluctuations in their payouts from foreign exchange. And with quarterly payouts of $0.07, investors can earn a modest annual yield of around 1.2%. It's below the S&P 500 average dividend yield of 2%, but the dividend's grown in recent years. Dividend payments of $0.07 are more than double the $0.03 that Barrick was paying in 2018.

Although investors will see some volatility from this stock, it's still a fairly stable investment. In each of the company's past four quarters, Barrick's reported a positive profit margin, and only once during that time has it been below 10%.

2. Moderna

Moderna (NASDAQ:MRNA) has taken investors on a bumpy ride this year. Although the biotech company is up more than 239% since the start of the year, it's been falling in recent weeks, and over the past month, it's down 19%. 

The stock surged in May after the company released Phase 1 data for its mRNA vaccine, which investors hope will be effective against the coronavirus. The problem is that there was a lot more hype than substance surrounding all that bullishness because the results were based on a small sample size.

Since then, the stock's cooled off, and it's given investors a chance to buy shares at a lower price. Admittedly, the stock's still not a cheap buy, given that investors are paying a mammoth 400 times sales for the stock and 14 times book value.

But the stock is among the top performers this year since there's hope it could hold the drug that's key to preventing the spread of COVID-19. If successful, it could make the stock's current $24 billion valuation look cheap, as there would be tremendous demand for the vaccine all over the world. There have been more than 8 million cases of COVID-19 around the world, and those numbers are only growing.

The danger for investors is that the healthcare stock could sink lower if the potential vaccine doesn't live up to expectations. With a lack of sales growth, $60 million in revenue in 2019, and losses totaling $514 million, investors would be hard-pressed to find a reason to invest in the Massachusetts-based business without the promise of a potential COVID-19 vaccine.

Unlike Barrick, Moderna doesn't pay investors a dividend.

Should you buy these stocks today?

Both of these stocks have soundly outperformed the S&P 500 this year, with a decisive edge going to Moderna:

Stock chart

Image source: YCharts.

While it may be tempting to climb on the Moderna bandwagon, the stock's also more likely to see a larger correction take place this year. If the company releases underwhelming results related to its mRNA vaccine or fears surrounding COVID-19 begin to fade, Moderna's stock could see a lot less bullishness.

Barrick, however, could be a good contrarian buy for investors who expect a slowdown in the markets. If there's another crash and the markets go into a tailspin, gold prices will likely back on their way up, driving Barrick's shares up in the process. After factoring in the potential risk, Barrick is the only one of these stocks I'd consider adding to my portfolio today.