The Dow Jones Industrial Average finished up 6.66 points (0.05 percent) at 12,890.61. The broad-based S&P 500 edged up 2.00 points (0.15 percent) to 1,351.96, while the Nasdaq Composite gained 11.37 (0.39 percent) to 2,927.23. Greek government leaders reached agreement on austerity measures expected to pave the way for a massive second EU-IMF bailout and help the country avoid an overt default on its debt. Meanwhile, US justice officials announced a $25 billion settlement between US states and five leading banks and mortgage lenders to resolve complaints that they abused millions of borrowers in home loan foreclosures.