When you're in your 30s, it's time to start getting serious about investing for the long haul. You can still afford to ride out the ups and downs of the market, but you also don't have quite as much risk tolerance as you did in your 20s. With that in mind, here are three stocks that could be ideal components of any 30-something's portfolio, followed by a closer look at each one.

Company

Recent Stock Price

Dividend Yield

HCP, Inc. (DOC 0.98%)

$29.90

4.9%

AT&T Inc. (T 1.88%)

$38.29

5%

Vanguard High Dividend Yield ETF (VYM 0.24%)

$79.31

2.9%

Data source: TD Ameritrade. Stock prices and dividend yields current as of Aug. 2, 2017.

Profit from the aging population

For investors with about three decades to let their investments compound, it's tough to make the case against investing in healthcare real estate through a REIT like HCP.

30-something man sitting at a table in an office setting

Image source: Getty Images.

Why such a lengthy time horizon? In a nutshell, the baby boomer generation will continue to become senior citizens and Americans are living longer lives in general, which translates into a senior population that should grow rapidly through 2040 or so.

Chart showing projections for U.S. senior citizen population growth.

Image source: HCP investor presentation using data from the U.S. Census Bureau.

HCP specializes in property types that should especially benefit from this trend. 45% of its portfolio is senior housing, which should be a growing area of healthcare for obvious reasons. In addition, medical offices make up another 22% of the portfolio, and older Americans visit their doctors much more frequently than the rest of the population.

Over the past year, HCP has taken steps that should set itself up for the senior population boom. It spun off its riskier assets, reduced its reliance on its largest tenants, and significantly de-leveraged its balance sheet. All of this should result in greater financial flexibility to pursue attractive growth opportunities as they come up.

A telecom giant with some tricks up its sleeve

I recently suggested AT&T as a smart stock for retirees to buy, so it may seem odd that I'm also recommending it for 30-somethings. However, I think it works well for all age groups, so hear me out.

AT&T is a low-volatility stock, which means that it isn't as reactive to market moves as most other companies. And it pays a 5% dividend yield, and has increased the payout annually for more than three decades. These are qualities that older investors love.

For younger investors, the company has significant growth potential thanks to its 2015 acquisition of DIRECTV, which allows it to offer bundled packages of services that peers cannot. AT&T also plans to acquire Time Warner, which could give it another advantage when it comes to mobile content streaming.

In a nutshell, AT&T is a nice combination of safety, income, and growth potential. It is a stock that you could conceivably buy now and hold throughout your retirement.

An ETF that could be the backbone of your portfolio

To be precise, the Vanguard High Dividend Yield Index Fund ETF isn't technically a stock at all, but rather an exchange-traded fund, which is essentially a mutual fund that trades like a stock.

Buying individual stocks is great, if you have the time, knowledge, and desire to do it properly. Even if you choose to buy individual stocks, a low-cost index fund like this one could serve as an excellent backbone to your portfolio, adding diversification.

The Vanguard High Dividend Yield ETF invests in just over 400 different stocks, all of which pay above-average dividends, specifically excluding REITs (like HCP). Top holdings include rock-solid companies like Microsoft, Johnson & Johnson, ExxonMobil, and JPMorgan Chase. The best part is that the fund's largest holding (Microsoft) makes up just over 5.5% of the total assets, and there are just four stocks that make up more than 3%.

In other words, this ETF allows you to reap the benefits of high-dividend investing without relying too much on the performance of any single stock.