SAN FRANCISCO (AP) -- Yahoo's (NASDAQ: YHOO) shares have touched $19 Monday, marking the first time they have traded that high in more than two and half years.

The latest gains extend a rally that has been gaining momentum in recent weeks as Yahoo buys back its own stock and more investors bet on CEO Marissa Mayer's ability to turn around the long-struggling company.

Mayer, a former top executive at Internet search leader Google (GOOGL 0.30%), became Yahoo's fifth CEO in less than a year when the company hired her in July. Since her arrival, Mayer has vowed to make the Sunnyvale, Calif., company a better place to work, refine its online services, and roll out more products tailored for smartphones and tablet computers.