U.S. stocks closed higher Friday as investors felt optimistic ahead of the Greek elections this Sunday. The Dow Jones industrial average gained 115.26, or 0.91 percent, to 12,767.17. Twenty-six of the 30 components in the index showed gains. Microsoft, Chevron, and Bank of America were the biggest gainers. The broader Standard & Poor's 500 index rose 13.74, or 1.03 percent, to 1,342.84. The technology-heavy Nasdaq composite index increased 36.47, or 1.29 percent, to 2,872.80.