A heavy change of hands is happening at Argentine oil giant YPF (YPF 4.56%). Last week, Repsol (REPYY 0.59%) sold its remaining 12% stake in YPF for $1.25 billion, and YPF's stock price jumped 10%. This marks the definitive exit of Repsol from its position in YPF. The Spanish oil company used to own control of the company after it was privatized in the late '90s and before the Argentine government nationalized 51% of YPF two years ago (seizing a big chunk of Repsol's stock in the process).

Morgan Stanley performed the purchase for investment funds at an average price of $27.80 per stock.

Why is Repsol selling?
The Spanish company is progressively stepping out of Latin America, divesting its assets in the region. However, it's worth noting that Mexican oil company Pemex recently commissioned Credit Agricole to sell its 9.4% stake in Repsol, valued at about $3.3 billion. Pemex had disagreements with Repsol's management and was showing interest in YPF's Vaca Muerta massive shale oil and gas formation.

Now that Repsol has cashed out of YPF (and recently received a $5 billion settlement from the Argentine government for YPF's expropriation), it will pursue acquisition opportunities in OECD countries -- including, analysts say, the U.S., Canada, and Norway.

The state of things at YPF
After the nationalization, YPF began a steady comeback. YPF's production, which used to account for over half of Repsol's production, started showing increases, along with profitability. In 2013, YPF's oil production increased by 2.2%, while gas production grew 1.5% year over year. More growth is expected for this year. Why?

The company is rejuvenating its mature fields and pursuing an intensive development of its unconventional reservoirs in Vaca Muerta. With 168 working wells in the area, daily nonconventional oil production is at 19,000 barrels now and will probably increase. YPF plans to hold more than 300 operative wells in the area by the end of this year.

Regarding profitability, the market is expecting the company to report a profit of around $302 million for the first quarter of 2014, almost doubling the results of Q1 2013. The better performance owes primarily to a higher pricing policy and solid domestic demand. In February, YPF sold 282.2 million liters of gasoline, up 7.6% year over year. Premium gasoline sales volume grew 9% alone.

Retail fuel prices also jumped. Over the past year, gasoline prices were raised four times for a total increase of 55%. The incremental price hikes have become stronger and more frequent in 2014, starting with a 7% increase in January, followed by a 6% boost in February and a 6.1% increase in March. No wonder analysts expect better results for this quarter! 

Liquidity risks
Moody's issued ratings most nonfinancial corporations in Argentina last week, concluding that there's high liquidity risk due to "high and rising inflation, potential currency devaluations, and slowing economic growth." The rating agency finds YPF among the companies with the most liquidity risks. "These companies have significant debt coming due in the short term, limited cash in relation to upcoming maturities, sizable negative free cash flow and a lack of access to committed bank credit facilities, or some combination of these factors," said Moody's senior analyst Veronica Amendola. However, YPF's growing sales volume and pricing should bring good cash flow this quarter, and the company's funding does not entirely depend on national banks, as it can access the international markets. This last resort, though, increases currency exposure, as the company generates cash flow in pesos, and January's steep devaluation of the peso would increase repayment costs. 

New associations
Extracting hydrocarbons from the third-largest shale oil and gas formation in the world is not easy nor cheap. In order to reinforce exploration, YPF invested $2.1 billion last year -- that's 62% more than it invested in 2011, when it was owned by Repsol. Now the company holds a portfolio of more than 1,400 projects to develop proved, probable, and possible reserves.

Partnerships have been crucial, however, and the government's conflict with Repsol made partners hard to come by. Nonetheless, YPF managed to make two big agreements with other multinational companies, benefiting from their resources and know-how. The first shale oil cluster development in Loma Campana field was launched in association with Chevron (CVX -0.30%), and the first shale gas pilot program in the El Orejano field was in association with Dow Chemical.

In the beginning of this year, Pemex flirted with making an agreement with YPF. The Mexican company in fact sent a technical team to evaluate Vaca Muerta's potential and geological characteristics. Now that Pemex is no longer involved with Repsol and has some cash from the sale of that stake, perhaps it will make a move.

Final thoughts
Investing in YPF requires a long-term perspective. The company still carries risks, and most have to do with Argentina's fiscal and monetary policies. The rising inflation and interest rates, as well as devaluation risks, will have a major influence on the short-term performance of the company. Any sudden moves in these variables will affect YPF's position.

However, the size and value of YPF's nonconventional assets is important and could make the company a regional leader in a few years. The Repsol era of YPF is over, and this new period has been positive for YPF overall. Production will continue to rise, and local demand is still increasing along with prices. In addition, now that all international conflicts have been settled and respectable foreign companies are working with YPF, others might join. This would accelerate the company's development of unconventional oil and gas.