The stock market was strong on Friday, and the Dow Jones Industrials and S&P 500 both closed at record high levels. Major benchmarks finished higher by roughly 0.5% to 0.75% as investors felt more upbeat about the economy as a whole. Even though bank stocks fell after major financial institutions reported second-quarter results that didn’t quite live up to investors’ hopes, gains in technology, healthcare, and energy reflected greater enthusiasm about their future prospects.