The pieces of the puzzle are finally falling into place in order for the broad-based S&P 500 (^GSPC 1.20%) to stage a meaningful rally for a second-straight session.

Charging up the markets today was economic news that showed the consumer price index -- a measure of inflation -- advanced just 0.1% in September if you strip out food and energy. Furthermore, gasoline prices have been on the decline (just don't tell Californians this) as supplies normalize, oil prices fall, and states make the switch to the cheaper winter blend of fuel. Simply put, low inflation levels are great news for consumers dealing with minimal wage growth and tepid consumer spending.

The National Association of Home Builders/Wells Fargo builder sentiment index also rose to 41, its highest level in six years. This signals that low lending rates are indeed coercing buyers to finally pull the trigger on a new home.

Overall, the S&P 500 ended up 14.79 points (1.03%) to 1,454.92. Let's have a look at some of the companies most directly responsible for today's bullish tone.

Solar panel producer First Solar (FSLR 2.17%) led the pack higher today, up 8%, after announcing a deal with Indonesia's PT Pembangkitan Jawa Bali Services (say that three times fast!) to build 100 MW of utility-scale solar power plants in the country. With prices and competition in the U.S. and China constraining demand, and many European countries reducing solar subsidies, First Solar has focused on emerging markets to lock in deals in recent months, and this could be a continuing trend moving forward.

Toymaker Mattel (MAT 0.59%) brushed off yesterday's weakness in Hasbro and shot higher by 5% following a better-than-expected third-quarter earnings report. For the quarter, earnings jumped 22% and surpassed Wall Street's forecast by $0.05, thanks to a 16% rise in sales from its American Girl line and a 6% boost in Fisher-Price sales. The one weak spot: Barbie products, which saw sales dip by 4%. Mattel could have further to run, but that could depend entirely on the success of its trendy American Girl line of products.

The overall sector seeing the biggest boost today is refiners, boosted by news from Murphy Oil (MUR 0.24%) that it plans to spin off its downstream operations into a separate company. Murphy Oil shot 8% higher on the news as it's following in the footsteps of both ConocoPhillips, which spun off Phillips 66 (PSX 1.14%) earlier this year, and Marathon Oil, which spun off Marathon Petroleum last year. Splitting upstream from downstream operations often has shown to have a positive effect on earnings visibility for both the companies involved and for shareholders, and it also allows investors to align their investing strategy for either growth or income. Similar to the previous two examples, I see this as being a major positive for Murphy Oil. Phillips 66 also rose by a healthy 5% today.

The sun is shining on emerging markets
With few options available domestically, First Solar has been increasingly looking to emerging markets to land lucrative deals. In our latest premium research report on First Solar, our analysts dig deep to uncover the other opportunities and threats facing the company in order to give you the tools needed to make smart long-term investing decisions. Click here to get your copy, which comes with a year of regular updates.