I like stocks. I own plenty of them. I've made pretty good overall returns through the years from them. I even write about them for a living. 

Bonds, on the other hand, haven't played a big role in my investing strategy thus far. However, that changed recently. I deployed cash into the DoubleLine Yield Opportunities Fund (DLY 1.19%). Here's why I just bought this ultra-high-yield bond fund.

1. Bonds are back

In January, my Motley Fool colleague Dan Caplinger wrote an article about why bonds could be a better investment in 2023 than they were in 2022. The bar for achieving a better performance is really low, considering that 2022 was the worst year for U.S. bonds ever.

Dan isn't the only investment guru who's optimistic about bonds. Fidelity Investments wrote a couple of months ago, "Higher yields enable bonds to once again play their historical role as sources of reliable, low-risk income for investors who buy and hold them to maturity."

Vanguard weighed in as well, stating: "For 2023, we see a transition from pain to gain [with bonds]." Invesco agreed, writing to investors: "We believe that the rough year for bonds in 2022 may have set the stage for strong performance in fixed-income markets going forward."

The bottom line is that bonds are back. 

2. The track record of the "bond god"

As mentioned earlier, I don't have much experience with bonds. There are a lot of factors to consider when investing in bonds. Instead of attempting to master all of those things, I decided to look for a bond fund run by a manager with a great track record.

You won't find many better track records than that of Jeffrey Gundlach. In 2011, Barron's referred to him as "the new bond king." Others, including CNBC, call him the "bond god."

Gundlach successfully managed TCW Group's Total Return Bond Fund for years. In 2009, he co-founded DoubleLine Capital. Since then, DoubleLine has been one of the top bond fund companies on the market.

DoubleLine offers plenty of alternatives for investors interested in bonds. The options include mutual funds, closed-end funds (CEFs), and exchange-traded funds.

3. A real dilly

The DoubleLine Yield Opportunities Fund's nickname is "Dilly" after its DLY ticker. Merriam-Webster defines "dilly" as "one that is remarkable or outstanding." I think that's a good description of this fund.

Dilly's yield is certainly remarkable and outstanding. The closed-end fund's yield tops 10.2%. The bond fund doesn't have to deliver any price appreciation for me to enjoy an attractive total return.

However, I think that Dilly's price will increase over time. Why? The fund currently trades at a significant discount to its net asset value (NAV). I fully expect the gap will narrow considerably once interest rates stabilize.

CEFs typically use leverage to boost their yields. That increases their risk levels. However, I like that Dilly's leverage from borrowing is below 20%, which is lower than most bond CEFs.

Not for everyone

Please note that the DoubleLine Yield Opportunities Fund won't be a good pick for everyone. As mentioned, Dilly uses leverage. Also, over 60% of the bonds it owns are below investment grade. These assets provide higher yields but are riskier than investment-grade bonds.

However, I'm not as risk-averse as some investors are. My view is that Dilly will generate attractive returns over the near term. I'll reevaluate if the environment for bonds begins to deteriorate. I could also cash out and invest the money in stocks if prices become especially attractive again. While I expect this bond fund will make me money, I still think that stocks will be even bigger winners over the long run.