It has been nearly two years since Argentina nationalized its biggest company, oil producer YPF (NYSE:YPF). Events like this are infrequent and traumatic for the companies involved. The investment climate has been severely damaged, with strong repercussions for the country's reputation, stock market, and overall confidence. However, as you'll see, things are going well for YPF.

YPF's stock suffered a tremendous drop when the expropriation was officially announced on April 14, 2012. The share price dropped from about $23 to $10 in only eight weeks. Since then, the stock price has been on a steady upward trend that has taken it to about $30 -- higher than when the turbulence started.

YPF Chart

YPF data by YCharts.

YPF was privatized in 1993 when the Argentine government completed a worldwide offer of 160 million stocks while keeping a 20% stake for itself. Spanish oil company Repsol acquired control of YPF in 1999 and managed to hold 99% of YPF's capital stock until 2008, when, by the initiative of then-President Nestor Kirchner, Argentine company Petersen Energia bought 25% of the capital stock. Then, two years ago, Argentina issued the expropriation law and took 51% of Repsol's stock by declaring it of "public interest." Repsol still holds a 12% stake in the company.

The reason for the expropriation was never fully explained, but government officials claimed that Repsol's decision to reduce its investments and pay more in dividends led Argentina to lose its oil self-sufficiency. This situation created a major energy deficit, which forced the country to import fuel, adding pressure to its currency balance.

Is expropriation a good thing?
Absolutely -- if you are not the entity whose property is being expropriated. The Argentine government only took Repsol's stock, leaving other holder's positions untouched. Taking something valuable without paying has a direct economic advantage, but sooner or later Repsol would go to the international courts. Luckily, the Argentine government cut a nice deal with Repsol to end the dispute, handing the Spanish company $5 billion in Argentine-guaranteed bonds. That's a pretty good deal for the Argentine government, considering the assets of the company.

The expropriation law issued by the Argentine government is broad and strong, basically regulating everything involving national oil and gas production. By using the principle of "public interest," the Argentine government regulates the exploitation, industrialization, transportation, and sale of hydrocarbons. In practice, it determines quantities and prices.

When you're looking into a potential investment, management is a key consideration. YPF's CEO, Miguel Galuccio, is a former Schlumberger executive and was appointed by Argentina's president.

That last part means one thing: The government's interest guides YPF's actions. And that interest is to increase oil and gas production and to develop the shale oil and natural gas Vaca Muerta formation, which, according to U.S. Energy Information Administration estimates, holds recoverable reserves of 16.2 billion barrels of oil and 308 trillion cubic feet of natural gas.

The policies
After the expropriation, the first policy applied to YPF and the industry in general was to increase all prices, from upstream to downstream. The reasoning is simple: Better pricing helps bring profitability, increase production, and attract investments.

Retail gasoline prices have subsequently nearly doubled from 5.50 pesos per liter at the time of the expropriation to 10.6 pesos now. YPF's retail gasoline pricing is now in line with prevailing international and regional market prices.

Meanwhile, the price at which YPF sells natural gas in Argentina (particularly to the residential sector) is substantially lower than regional market prices for natural gas. However, prices are rising as the government progressively reduces subsidies and raises price caps.

Another goal was to draw international investments, and the company managed to do so despite the circumstances. YPF made its first deal in the midst of the Argentine government's dispute with Repsol. The $188 million agreement signed with Dow Chemical in September 2013 -- about five months after expropriation -- was relatively small, but it was the first shale-gas pilot program in Vaca Muerta. It also set a precedent for Chevron (NYSE:CVX) to come along next.

Chevron's participation was far more encouraging. It began with a $1.24 billion pilot project to develop the Vaca Muerta. That project was completed, and the companies recently entered a new agreement to invest another $1.6 billion in the development of the formation. If things progress along these lines, we will probably see other international oil companies joining YPF in new agreements.

Final thoughts
Despite the huge disruption in the stock price and the worries that followed expropriation, the overall impression is that the move was positive for YPF and Argentina. It is hard to imagine how things would have evolved without these events, but certainly YPF's position keeps on improving.

Is there a conflict of interest between what is best for YPF and what is best for the government? Absolutely, and the key element to analyze is the pricing policy. Given the high rate of inflation in Argentina and continuous pressure on the peso, fuel prices could work to contain overall price increases. However, since the expropriation, retail fuel prices have grown much faster than inflation. This is no minor thing, as Argentina will probably finish this year with an annual inflation rate of more than 35% -- this quarter alone, it reached 10%.

Populism remains strong in Latin America. Some politicians are simply unfair, and their main purpose is to win short-term votes. However, the case of YPF's nationalization seems more like a seized opportunity to execute a long-term energy policy, to which the public has responded well. Things have clearly worked out.

However, the current government will have to leave office in about 18 months with no possibility of a re-election. How will things change? Stay alert.