Both the S&P 500 (SNPINDEX:^GSPC) and the Dow Jones Industrial Average (DJINDICES:^DJI) ended the trading day in the black, rising 0.4%. That close was high enough to mark the third straight week of gains for stocks.

Markets are now up a strong 6% since the beginning of October.

^INX Chart

^INX data by YCharts

The odds of an interest rate hike by the Federal Reserve in 2015 are falling, which has Wall Street in a good mood. But surprisingly strong corporate earnings are also contributing to the optimism. With just over 10% of the S&P 500 having posted third-quarter results, profits are on pace to fall by 4.6%, year over year. That might sound bad, but it's better than the 5.1% decline that Wall Street was expecting before earnings season kicked off last week .

General Electric raises cash
Industrial conglomerate General Electric (NYSE:GE) contributed to that positive trend today. Its shares reached a new high, closing up 3.5% after it posted third-quarter earnings results this morning. GE announced $2.9 billion of quarterly profit, or $0.29 per share, beating analyst expectations by $0.03 per share. It reported a surprisingly weak $27.9 billion of revenue, though, as sales were held back by "slow growth and a volatile environment," management said in a press release. The industrial business clocked 4% growth -- below last quarter's 5% gain .

While sales growth remains weak, profitability is headed in the right direction. Cost cuts and price increases combined to push GE's operating margin higher by a full percentage point to 17.3% of sales.

G

Source: GE investor presentation.

Still, investors seemed most interested in GE's dramatically shifting credit portfolio, and what it means for its ability to return cash to shareholders. GE Capital has found buyers for $126 billion worth of its commercial lending portfolio, ahead of management's $100 billion goal. Meanwhile, CEO Jeff Immelt and his executive team expect to launch a massive share exchange program with its spun-off consumer finance business starting next week. That initiative will raise as much as $21 billion over the next month. The proceeds will help management fund an expected $30 billion of cash returns to shareholders in 2015.

Twitter gets a new shareholder
Meanwhile, social media giant Twitter (NYSE:TWTR) ended the day up 4.9%, capping a four-day period over which its shares rose 9%. Fittingly, today's stock bounce catalyst appears to have been a single tweet :

Billionaire and former Microsoft CEO Steve Ballmer made a surprising announcement that he has accumulated 4% of Twitter's stock, which makes him one of its largest shareholders. In explaining his $800 million investment, Ballmer mentioned product innovations like the new "moments" feature, and his optimism about recently appointed CEO Jack Dorsey.

Twitter's shares were already rising earlier in the week after it announced plans to slice 8% of its workforce and reinvest the savings into speeding up its product development pace. At the same time, management said that its third-quarter revenue and profit should come in "at or above" the high end of their July forecast. That means sales will be at least $560 million, or up 55%, when the tech company posts earnings after the market closes on Oct. 27.

But investors will likely focus on user growth in that report. That figure was a disappointing 12% last quarter. "Our results show good progress in monetization, but we are not satisfied with our growth in audience," Dorsey admitted in July. We'll learn in less than two weeks whether the company has been able to improve on that dynamic in the intervening three months.

Demitrios Kalogeropoulos has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Twitter. The Motley Fool owns shares of General Electric Company and Microsoft. 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.