Shares in both AOL and Yahoo shot up today after activist investor Starboard Value LP revealed it had taken a “substantial” stake in Yahoo and recommended that the two companies merge to achieve $1 billion cost savings.

Starboard, which invests in underperforming public companies, claims to have taken “a significant stake” in Yahoo, and in an open letter to CEO Marissa Mayer to explore a tie-up with AOL, “a company we know well,” and return the value of Yahoo’s Alibaba and Yahoo Japan stakes to shareholders.

Starboard Managing Partner Jeffrey C. Smith argues that Yahoo squandered $1.3 billion on acquisitions during Mayer’s tenure that had not added to the company’s revenue or profits.

Yahoo is no stranger to activist shareholders. In 2008 Carl Icahn waged a proxy fight to gain board seats and force a sale to Microsoft. It’s unclear how big a stake Starboard has taken in the company, but the Wall Street Journal reported that a 5 percent stake would have triggered a regulatory disclosure.

Starboard pursued a similar strategy with AOL just a few years ago. The firm waged a proxy war in 2012 to get CEO Smith and several other candidates named to AOL's board. Smith lost that shareholder vote but walked away claiming that AOL had adopted several suggested reforms. Now he's proposing AOL CEO Tim Armstrong would be a better choice to run a combined Yahoo/AOL.

Yahoo’s core business has been underperforming for years, but it sits on some very valuable assets including a 15 percent stake in Alibaba and a 36 percent stake in Yahoo Japan. Yahoo also has substantial cash, including $8.3 billion from part of its Alibaba stake sold in the IPO last week.

Yahoo has been downgraded three times since the IPO in part because analysts are concerned about Yahoo's core ad business and partly because they don't trust the funds will be deployed wisely.

Starboard is arguing that Yahoo should cut costs by $250 million to $500 million to stem losses in its display advertising business. Combining with AOL -- which has been investing substantially in advertising technology -- would create “synergies of $1 billion by significantly reducing the cost overlaps in their display advertising businesses.”

Starboard acknowledged that while Yahoo’s business performance has been poor, its stock has performed quite well, mostly due to its Alibaba stake. Yahoo shares popped nearly 5 percent Friday to $40.69 on news of Starboard’s letter; AOL was up more than 3 percent to $44.39 on the New York Stock Exchange.