Original JP Morgan building at 23 Wall, New York. Source: JPMorgan Chase.

Stock markets continued their record-setting ways Tuesday, as the Dow Jones Industrials (^DJI 0.06%) climbed into all-time high territory for the second time this year. Just before the close, the Dow was up almost 100 points, and the S&P 500 (^GSPC -0.22%) also moved higher into record territory of its own. Some market participants were nervous about Federal Reserve Chair Janet Yellen's semiannual testimony to Congress Tuesday morning, with Yellen's comments including what she termed as a "meeting-by-meeting basis" for considering increases to short-term interest rates. Yet investors chose to focus on good news from Dow components JPMorgan Chase (JPM 0.65%) and Home Depot (HD 0.02%), both of which helped contribute toward the record push.

JPMorgan Chase climbed about 2.5% after the Wall Street bank announced a variety of cost-saving initiatives designed to boost profits, reduce the need for capital, and simplify its business. Among the initiatives were plans to start charging large customers for some of their deposits, because new regulation makes it much harder for JPMorgan to hold money for large institutional clients in a cost-effective manner. By cutting these deposits by as much as $100 billion, JPMorgan can keep itself in a lower capital-requirement tier. Further moves, such as reducing its exposure to derivatives and cutting how much proprietary trading it does, should further cut capital needs at JPMorgan. Even as the bank said that returns for its investment banking business would suffer, investors applauded the moves to try to rein in costs and maximize what profit opportunities JPMorgan still has.

Home Depot gets it done. Source: Home Depot.

Meanwhile, Home Depot led the Dow's gainers, rising almost 4% after releasing its latest financial report. The home-improvement retailer saw net income soar 36% on an 8% gain in sales, with same-store sales growth of 7.9% showing how well Home Depot has done in capitalizing on the housing recovery. At the same time, Home Depot raised its dividend by 26% and announced a massive $18 billion stock repurchase program, demonstrating the company's confidence in its future. Even though the retailer cited the potential negative impact of a strong U.S. dollar on its 2015 results, Home Depot continues to power forward by taking advantage of improving consumer confidence and spending capacity.

For the most part, macroeconomic considerations like the Fed's monetary policy are proceeding in line with investor expectations. As a result, when companies like Home Depot and JPMorgan give positive views of their respective individual businesses, they'll play an increasingly vital role in sustaining the bull market's sizable gains over the past six years.