Sentiment in the stock market can turn on a dime, and investors saw another great example of that in this week's trading action. After a 200-plus point decline in the Dow Jones Industrials (DJINDICES:^DJI) on Monday, investors turned their attention to more favorable economic data as well as reacting favorably to reassurances from Federal Reserve Chair Ben Bernanke that the Fed's quantitative easing program was in no danger of ending anytime soon. All it took was two days of triple-digit advances, and now the Dow stands once again at another five-year high, less than 100 points below its closing record after gaining 175 points today.

Caterpillar (NYSE:CAT) was one of the biggest gainers in the Dow, rising 2.5% both on general optimism about the economy and good news from within the industry. Rival Joy Global (NYSE:JOY) reported favorable earnings in its report this morning, and even though it also saw orders fall for the fourth straight quarter, this time by 29%, the stock climbed 6%. Caterpillar is less dependent on the coal-mining industry than Joy Global is, and so Caterpillar's prospects should be less affected by continued low natural gas prices and their impact on coal-mining profitability.

Elsewhere, MAKO Surgical (UNKNOWN:MAKO.DL) soared 10% after announcing earnings last night. The surgical-device maker gave aggressive guidance for system sales growth this year, projecting growth from the 45 units sold in 2012 to between 56 and 62 units this year. Although projected procedure growth of 32% to 42% is below 2012's growth rate, it was enough to make investors satisfied with the results. If MAKO can deliver on its estimates, it stands to recover a decent amount of the ground its shares lost last year.

Finally, Dollar Tree (NASDAQ:DLTR) also got an earnings bump, rising more than 10% as it reported that its net income rose almost 22% on a better-than-15% gain in revenue. Even though the company's guidance for 2013 was on the low side of Wall Street expectations, investors may have feared even worse results given the disproportionate impact of higher payroll taxes on its customer base.

Fool contributor Dan Caplinger has no position in any stocks mentioned. You can follow him on Twitter @DanCaplinger. The Motley Fool recommends MAKO Surgical. 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.