The S&P 500 (SNPINDEX: ^GSPC) is trading near all-time highs. The index's dividend yield is a downright disappointing 1.3% or so.

If you are a fan of high-yield stocks, don't despair. You just need to do a little more digging and be selective. If you like to buy and hold forever, companies like Toronto-Dominion Bank (TD 0.58%) and Federal Realty (FRT 0.10%) both are high-yield stocks worth buying. Here's what you need to know.

Toronto-Dominion Bank caused its own problems

Toronto-Dominion Bank, usually just referred to as TD Bank, has an attractive 4.1% dividend yield. That compares to the average U.S. bank's yield of around 2.6%.

The reason for that disproportionately high yield is that TD Bank messed up. Its internal controls were too weak in the U.S. market, and its U.S. division ended up getting used to launder money for criminals. U.S. regulators were not pleased, hitting the bank with a big fine and placing the bank's U.S. division under an asset cap.

A parent and a child making muscles together.

Image source: Getty Images.

That basically means that TD Bank's U.S. business won't be allowed to grow until regulators are comfortable with its internal controls, which the bank is upgrading. This is a problem for TD Bank, because the U.S. market was supposed to be its growth engine. It could be a banking industry laggard for a little while.

However, it is important to note that TD Bank is a Canadian bank. It has an entrenched industry position north of the border, and its business there remains unaffected by U.S. regulator actions. So growth isn't off the table, it will just be slower than Wall Street might like. This is why putting some money to work here makes a lot of sense for dividend investors.

A $1,000 investment would buy around 13 shares. There's one more interesting fact to consider: TD Bank just increased its dividend despite the headwinds, which hints that management (and the board of directors) believes the bank's future remains bright.

Federal Realty has achieved something no other REIT has

Federal Realty's dividend yield is around 4.4%. The average real estate investment trust (REIT) has a yield of roughly 4.1%. That, however, isn't the biggest selling point for Federal Realty. The big story is that this REIT is the only REIT to have achieved Dividend King status, with over five decades of annual dividend increases behind it. It is a highly reliable income stock.

Another interesting thing about Federal Realty is that it has focused on quality over quantity, owning only about 100 or so properties in the strip mall and mixed-use spaces. What it owns, however, tends to have larger and wealthier nearby populations than the properties its peers own. Where this REIT attempts to differentiate itself is on quality, but that isn't always so apparent when it buys an asset.

Federal Realty tends to be a very active portfolio manager. When it feels it can get a good price for a property, it will sell it. And the proceeds will be used to buy assets where management believes it can increase the value through redevelopment. This creates a cycle, where the company buys, redevelops, and then sells after increasing the rent capacity and value of an asset. The REIT has been running this same, highly successful playbook for years, using it to reward investors with a steadily growing dividend.

To be fair, Federal Realty is actually kind of boring, but in perhaps the best way for dividend investors. A $1,000 investment will buy around 10 shares of the REIT.

You can still find yield -- just be picky

Just because the S&P 500's yield is paltry doesn't mean you can't find attractive yields on Wall Street. You just want to be extra careful about what you are buying to make sure you aren't getting into too risky an investment situation. TD Bank and Federal Realty are both rock-solid dividend stocks. If you have $1,000 or $100,000 to invest, they are worth a close look right now.