Mattel (NASDAQ:MAT), which has seen its stock steadily fall all year largely because of declining sales, reversed that trend in the second half of October after it reported earnings for the third quarter.

The company posted a 16.7% stock gain for the period, according to S&P Capital IQ data.

Source: YCharts.

What: At first glance, the numbers look pretty bad and in line with the company's ongoing recent sales decline. Mattel reported a global drop in sales of 11%. Adjusted operating income fell to $321.6 million, compared to $434.5 million in the third quarter of 2014. In addition, earnings per share fell to $0.71 compared to prior year EPS of $0.98.

The company's board did elect to keep a fourth quarter cash dividend of $0.38 per share, which is flat compared to the fourth quarter of 2014.

So what: While those numbers appear fairly bleak, investors are clearly buying the company's story that it's in the midst of a turnaround. CEO Christopher Sinclair made it clear that he believed better days were ahead in his comments in the earnings release.

Our results for the quarter, excluding the significant impact from currency exchange rates, were broadly in line with our expectations at this stage of our turnaround. Importantly, we're very encouraged by the progress we are making on reenergizing the company, building momentum in our core brands, improving retail execution, reducing costs and building scale in key emerging markets. As we continue our turnaround efforts, we remain comfortable with our full-year outlook.

Now what: Investors are buying the company's message, but as it is for any toy brand, the fourth quarter is the most important. The company has to win back lost shelf space and find a way to get kids interested in classic brands including Fischer Price and American Girl. Changing consumer tastes have deeply hurt the company's Barbie franchise, which fell 14% globally in the third quarter, its eighth straight quarter of a drop over 10%, The Wall Street Journal reported.

Sinclair believes Barbie can be rescued, and that the company can win back lost sales. We'll find out whether that's true rather quickly over the next few months.

Daniel Kline has no position in any stocks mentioned. He used to run an independent toy store which did not carry Mattel. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.