What happened Twitter (NYSE: TWTR) stock outperformed the market by a wide margin last month as shares gained 17%, according to data provided by S&P Global Market Intelligence. ^SPX data by YCharts The surge helped shareholders finish the year up 47%, which wasn't far from the 53% increase that Facebook (NASDAQ: FB) enjoyed in 2017. Image source: Getty Images. So what Investors are growing more optimistic that Twitter will soon find answers to its struggles with audience size and monetization. In fact, the stock jumped last month in response to two bullish upgrades by Wall Street analysts, both of which believed shares could surge in the months ahead. Now what Twitter's most recent quarterly report showed a 4% decline in revenue and a net loss of $103 million, and those figures didn't hold a candle to Facebook's 49% revenue spike and 79% jump in earnings to $4.7 billion. Still, the results included good news for the micro blogging platform as user engagement grew in response to several improvements that executives made to the service. Twitter is hoping that the engagement uptick will be followed by faster growth in its audience size in the coming quarters, which is necessary if it wants to eventually rival Facebook's 2 billion user reach. Investors will also be watching for evidence that its data licensing business can lessen Twitter's dependence on the advertising market while pushing it closer to bottom line profitability -- perhaps as early as fiscal 2018. 10 stocks we like better than TwitterWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* David and Tom just revealed what they believe are the 10 best stocks for investors to buy right now... and Twitter wasn't one of them! That's right -- they think these 10 stocks are even better buys. Click here to learn about these picks! *Stock Advisor returns as of December 4, 2017Demitrios Kalogeropoulos owns shares of Facebook. The Motley Fool owns shares of and recommends Facebook and Twitter. The Motley Fool has a disclosure policy.