What happened

Shares of digital ad leaders Alphabet (GOOG -1.10%) (GOOGL -1.23%), The Trade Desk (TTD -4.34%), and Roku (ROKU -3.05%) were falling today, declining as much as mid single digits before recovering to a 1.8%, 2.8%, and 3% decline as of 1 p.m. ET, respectively.

There wasn't much company-specific news today, although one prominent analyst made a year-end prediction that 2023 would continue to see a struggling digital ad market, as higher interest rates strain the economy.

Of course, this isn't exactly a new revelation, as investors are increasingly in agreement that some sort of weak economy or recession will occur in 2023. In addition, given the large declines in these stocks this year, investors may be engaging in end-of-year tax-loss selling to mitigate their tax bills for 2022.

So what

On Monday, analyst Brian White of Monness, Crespi, Hardt & Co. wrote about Alphabet's outlook heading into next year. On the downside, White sees the difficult digital ad market continuing in 2023, although comparisons will be easier. White wrote:

In 2022, a combination of a weakened economy, some post-lockdown hiatuses and Apple's privacy initiatives, particularly app tracking transparency, will have a negative impact on the digital advertising market. ... For 2023, we expect further weakening of the economy to weigh on digital ad spending. [Year-over-year] Comparisons become easier as the year progresses.

The headwinds would be difficult for Alphabet, although White also believes Alphabet is a bit better positioned than peers, especially social media companies that formerly depended heavily on tracking users on the internet prior to Apple's privacy controls.

Some may conclude Alphabet's weaker "peers" may include The Trade Desk and Roku, but those thinking these two are necessarily less well positioned may want to think twice. The connected TV advertising segment seems to be the most attractive subsector of the digital advertising market. For instance, The Trade Desk grew revenue 31% last quarter, and Roku grew its platform revenue 15%, compared with just 4.3% growth for Google Search and a 1.9% decline for Alphabet's YouTube platform.

Yet despite that, The Trade Desk and Roku have fallen much harder this year, down 51% and 82%, respectively, compared with Alphabet's 37% decline.

TTD Year to Date Total Returns (Daily) Chart

TTD Year to Date Total Returns (Daily) data by YCharts

The discrepancy comes down to a question of valuation, as The Trade Desk trades at 39 times next year's earnings estimates, compared with Alphabet at just 17 times earnings, while Roku isn't expected to make any profits this year or next year. That being said, Roku trades at just 1.8 times sales, which is not demanding at all on that basis.

The Trade Desk is also leading the way in Unified ID 2.0, which is a new and growing alternative to third-party cookies that track users across the internet, and aims for a middle ground between targeting users while also concealing private information. If Unified ID 2.0 continues to get more industry buy-in, those using Unified ID 2.0 ad targeting could get a boost next year, even considering Apple's new privacy regulations.

In addition to fears over an economic downturn, investors may also be tax-loss selling some stocks with significant declines this year. Taking losses on stocks can help offset capital gains. Moreover, taking short-term losses on stocks can even offset up to $3,000 of income.

Given the large declines in many stocks this year, it may be an unusually active time for end-of-year tax-loss selling.

Now what

When the market is focused on the short term, it may be a good idea to lengthen your time horizon. Ask yourself, do you see these businesses as having a moat, or competitive advantage? Are they likely to be much bigger in terms of revenue and profits five years from now? Is the stock reasonably priced? 

If these boxes are checked, investors may want to think about buying into this tough news flow and unique end-of-year tax selling period. It could end up being a great long-term opportunity.