Hq yahoo
The Yahoo logo is displayed in front of the Yahoo headquarters on July 17, 2012 in Sunnyvale, Calif. Yahoo sold part of its stake in Chinese Internet company Alibaba and will honor a promise to reward shareholders instead of keeping the cash. - 

Yahoo is sitting on a pretty pile of cash this morning, after selling back part of its stake in Chinese Internet company Alibaba. Yahoo is pocketing some $4.3 billion in net cash proceeds.

The company also announced that it will return most of that money to shareholders, though it is yet to say how it will do so.

Most likely, it will buy back its own stock -- hopefully making remaining shares more valuable. Yahoo stock has lost half its value over five tumultuous years.

The deal is good news for the tech giant, which has hit a number of rough patches in recent years, points out Greg Sterling, an analyst at Opus Research.

"The CEO drama, declining advertising share," he notes. "This is a welcome infusion of cash." It also might be a good time to show a little love to the shareholders who stuck it out.

Still, the shareholders they might be better served if Yahoo invested this rare lump sum to expand. "In the long-term, if Yahoo does well, that’s going to benefit the shareholders, too," says Sterling.

Sure, everybody likes fast cash. But shareholders would probably have supported using more of those billions into turn the company around, says Tim Bajarin with Creative Strategies. "Most shareholders really want long-term, continual dividends."

Bajarin says this money would have been a golden opportunity for Yahoo to beef up social media and search. 

Follow Stacey Vanek Smith at @svaneksmith