With the S&P 500 (SPY 0.14%) near all-time highs, yield looks more attractive than ever.

Prospect Capital (PSEC 0.89%) is one of the most popular plays for yields, placing its at 12%. However, in the last two quarters, Prospect Capital has failed to earn its dividend, paying out more in dividends than it earned from its investment portfolio.

Why the dividend isn't at risk... yet
Failing to earn your dividend is a big no-no in the high-yield space. In the past year, a number of high-yield stocks, including BDCs and mREITs, have failed to keep earnings in line with their large distributions to shareholders.

Dividend cuts ensued.

But a dividend cut at Prospect Capital looks unlikely. On the recent earnings call, management revealed the company had $0.26 per share in retained earnings -- earnings in excess of its dividend. This provides a safety net for investors. At the current pace, Prospect Capital could fail to earn its dividend for up to three years and yet continue to pay ever-increasing monthly distributions.

But wait, there's more!
Prospect Capital's second-quarter conference call also revealed a potential strategy for meeting or exceeding its dividend with earnings. An analyst from National Securities recommended Prospect Capital increase its leverage from about 0.56 times equity to 0.7 times equity with a low-cost funding source. Doing so would push earnings above Prospect's monthly dividend distributions.

Keep in mind that Prospect Capital has a very attractive credit facility priced at LIBOR plus 2.75%. Prospect can essentially borrow at less than 3% per year to displace capital from stock issuance, which effectively costs 12% per year due to the dividend.

Adding more leverage could add up to $0.08-$0.10 to Prospect Capital's annual net investment income. The math checks out; it's as easy as that. Besides, the company pays 1% per year on its unused credit line, so the marginal cost of borrowing is really LIBOR plus 1.75% -- practically nothing.

Will Prospect Capital take the advice?
Prospect Capital CEO John Barry responded positively to the idea of juicing the company's portfolio with its low-cost credit facility, stating:

When you get to $1 billion [in the credit facility], it's more prudent to be into the leverage of the credit facility in larger amounts and for larger periods of time, which I think is a point of your question and that's exactly the direction we wish to go.

While Prospect Capital has failed to earn its dividend, shareholders shouldn't be concerned. All it has to do is use the low-cost funding it has on hand. Shareholders should continue to watch Prospect's leverage, which is the most important variable in the company's dividend coverage.