The S&P 500 has had an impressive year, up 20% (as of July 27). The broader index is currently about 25% higher than it was at its recent low in October 2022, meaning some investors believe a new bull market is already here.

The renewed optimism is notable, especially after last year, which was a terrible 12 months for investors. Now could be a good time to look for attractive opportunities to boost your portfolio's long-term prospects. 

Here are two stocks the smartest investors are paying close attention to right now. 

1. Block 

Despite macro headwinds, Block (SQ -1.07%) continues posting stellar growth. Gross profit jumped 32% during the first three months of 2023 to total $1.7 billion, with both Square for merchants and Cash App for consumers generating strong gains. It's clear that Block is in a good spot to benefit from the growth of digital transactions. 

The Square segment, which has done a good job at bringing on larger merchants, processed $184 billion in annualized gross payment volume in the most recent quarter. Because Square offers a broad range of mission-critical services to its customers, like invoicing, working capital loans, and employee payroll, its economic moat is powered by switching costs, helping to keep these merchants locked in. 

Investors should also pay attention to Cash App, the Apple app store's No. 1 finance application. Cash App counts 53 million monthly active users, and it saw $61 billion of inflows onto the platform during the first quarter. For some people, this has the potential to completely replace a traditional bank account because one can buy and sell stocks, set up direct deposit, send money to friends, and get a debit card, all in an easy-to-use interface. 

Although Block's shares have climbed 25% in 2023, they are currently 72% below their all-time high from August 2021. The stock was hammered due to rapidly rising interest rates and their impact on the valuations of high-growth businesses. As a result, Block shares trade at a price-to-sales multiple of just 2.5 right now, which is less than half the historical average of 6.2. This looks like a great time to scoop up the stock. 

2. Mastercard 

Smart investors should also be watching Mastercard (MA -1.16%). The card payments giant, which is second only to Visa, registered revenue and diluted earnings per share of $6.3 billion and $3, respectively, in the second quarter. Both of these headline figures were up double digits year over year. 

Mastercard has been benefiting greatly from strong travel demand, which shows up in cross-border transactions. These occur when a merchant's bank and an issuing bank are from different countries, and they are more lucrative for the business. Cross-border volume jumped 24% in the latest quarter, now totaling 154% of pre-pandemic levels. 

Zooming out, it's easy to fall in love with Mastercard. The company boasts one of the best financial profiles around, with a net income margin of 45% in 2022. Add in minimal requirements for capital investments to grow the business, and it's no surprise that free cash flow generation is also through the roof. Mastercard uses this cash to buy back shares and pay dividends. 

With 3.2 billion cards in circulation and 100 million merchant acceptance points, Mastercard's economic moat consists of powerful network effects. Consumers have confidence in using these cards because they are accepted virtually everywhere. And merchants have no choice but to take them as a method of payment because the cards are so ubiquitous. 

Mastercard's stock trades at a price-to-earnings (P/E) ratio of 40, which is not cheap by any stretch of the imagination. This valuation is also more expensive than the stock's trailing 10-year P/E multiple, which makes sense given its strong historical performance. Nonetheless, investors might still want to consider buying shares in this outstanding business.