Finally, Europe has a deal

NEW YORK (CNNMoney) -- European Union leaders announced an agreement early Thursday on debt crisis measures, including a hard-fought deal with private sector investors to take a 50% loss on Greek bonds.

The agreement came at the end of marathon talks to finalize the policy response to the government debt and banking problems threatening the stability of the euro currency and global economy.

The response aims to resolve three related problems: the debt crisis in Greece, instability in the banking sector and a sorely outgunned bailout fund.

Under the new plan, Greek bondholders agreed to voluntarilay write down the value of Greek bonds by 50%, which translates into €100 billion and will reduce the nation's debt load to 120% of economic output by 2020.

The private sector agreed to the writedowns on the condition of a €30 billion contribution from the public sector, according to Charles Dallara, director of the Institute of International Finance, which represented the private sector in the talks.

"We look forward to work with the Greek and European authorities to translate this framework into a concrete agreement that can deliver an early reduction in Greece's debt and place it squarely on a path toward debt sustainability," Dallara said in a statement. (Read: Greece faces pushback in its austerity drive)

The agreement also calls for a new €100 billion financing program for Greece, which will be funded partly by the International Monetary Fund, according to an official EU statement.

Stronger bailout fund: The leaders agreed on two ways to increase the firepower of the EU bailout fund, known as the European Financial Stability Facility. The methods will each leverage the fund by four or five fold, the statement said, boosting its resources to about €1 trillion.

The fund will be used to partially insure new issues of government bonds. In addition, it will be supplemented by the creation of one or more special investment vehicles, which will be open to private sector players such as sovereign wealth funds.

China has already expressed interest in backing the special investment mechanism. The possibility that China could back the the rescue effort helped lift U.S. stock prices late Wednesday.

Bigger bank reserves: The EU government heads also agreed to raise capital requirements for banks vulnerable to losses on euro-area government bonds.

"The overarching goal of the exercise is to foster confidence in the European banking sector," said European Council president Herman Van Rompuy.