Oil prices have crashed from highs of more than $100 a barrel in mid-2014 to as low as $27 in January, wiping out more than 70% of the commodity's value.

But prices have started to recover over the past month, this week passing above $40 a barrel for the first time in 2016.

The IEA says this slight recovery points to oil "bottoming out" and finally ending its run of long-term losses. "It is clear that the current direction of travel is the correct one, although with a long way to go," the Oil Market Report said.

The report attributes the slight price recovery to several factors, including the output freeze agreed by OPEC members in February and Iran's slower-than-expected reentry into the global market since international sanctions against the country were lifted in mid-January.

Before the lifting of sanctions, it was predicted that Iran could increase production by as much as 500,000 barrels a day, making the oil market more saturated than ever before. But that huge increase hasn't materialized, with the country increasing production by just 220,000 barrels a day in February. The IEA says Iran's return to the market will continue to be "gradual."

The amount of oil being produced worldwide also fell in February. "Global oil supplies eased by 180,000 barrels per day (180 kb/d) in February, to 96.5 million barrels per day (mb/d), on lower OPEC and non-OPEC output," the report said, though it also pointed out that production had increased by 1.8 million barrels a day year-over-year. The month-over-month fall, however, has been a big contributor to oil's gains in recent weeks. Here's how that looks:

Investing.com

While the IEA struck a reasonably optimistic tone in the report, it wasn't all smiles, and it urged caution on oil's potential recovery, saying the recent recovery shouldn't "be taken as a definitive sign that the worst is necessarily over" when it comes to oil.

The report also argued that there was still a long way to go before balance returns to the markets, but it said balance should return in 2017.

"The foundations for global demand growth are sound, but not rock-solid," the report said.

The IEA's guarded optimism flies in the face of the gloomy tone struck by many of the world's big banks. In the past week, numerous financial institutions have come out to argue that the recent recovery in the price of oil will not last and that the commodity will stay weak in the long term.

On Monday, Norbert Ruecker, the head of commodities research at the Swiss private bank Julius Baer, said the company "still believes that oil prices experience a short-term bounce but no long-term recovery," while analysts at Barclays said market optimism was "somewhat premature." Goldman Sachs also released a series of hugely pessimistic notes on the state of the whole commodities sector going forward.