By Andrew Torchia

DUBAI, Jan 12 (Reuters) - Markets are cheering Saudi Arabia's progress in cutting a huge state budget deficit, but details of the kingdom's financial plans show it will remain hostage to swings in oil prices for many years.

The cost of insuring against a Saudi sovereign debt default SAGV5YUSAC=MG fell this week to its lowest since September 2015. Saudi money rates are edging down, indicating bankers think financing the deficit will be less of a strain this year.

Behind these moves is the announcement late last month of the 2017 state budget. Riyadh said it had cut its deficit from a record 367 billion riyals ($98 billion) in 2015 to 297 billion in 2016, and projected 198 billion for this year.

Those figures, combined with austerity plans which Riyadh laid out for the next few years, are allowing authorities to say they are well down the road towards eliminating the deficit by 2020, even at current low oil prices.

"Gauging the macroeconomic risks through the debt level, adequacy of reserves and financial stability reveals that Saudi is well poised to encounter possible future shocks," state-owned National Commercial Bank said in a report on the budget.

Details of Riyadh's announcement, however, suggest it remains vulnerable. The 297 billion riyal figure for last year's deficit excluded 105 billion spent in 2016 to clear debts from previous years. If that is taken into account, the deficit worsened last year.

Finance Minister Mohammed al-Jadaan said the government had now essentially settled all its arrears and was committed in future to pay all creditors within 60 days of the due date.

But this pledge did not entirely eliminate the risk of more unpleasant surprises in coming years that could drain state coffers even as the government insists the deficit is falling. For example, there may be costs associated with closing or converting moribund state projects launched in past years.



REVENUES

Another area of concern is the extent to which Riyadh can increase non-oil revenues to make it less exposed to oil price swings.

Non-oil revenues rose 33.1 billion riyals last year to 199.0 billion. But all of that rise was provided by two items that did not appear linked to reforms expanding the permanent revenue base: returns from the central bank, which soared 76 percent to 62.2 billion riyals, and unspecified "returns from other sources", which totalled 15 billion riyals versus zero in 2015.

This year, the government projects total revenues will jump by 164 billion riyals to 692 billion, but 92 percent of that increase is to come from higher oil revenues.

A small fraction of the oil revenue rise - about 25 billion riyals, an official document shows - will come from further cuts in state subsidies for gasoline and electricity prices later this year.

That means oil export income may need to rise over 35 percent to hit the 2017 revenue target. Even including higher Saudi exports of refined oil products, this may be hard; at $55 a barrel, the Brent crude price is only 22 percent above last year's average, while a global producers' deal commits Saudi Arabia to cutting its oil output by about 5 percent.

"We believe the oil revenue assumption in the 2017 budget is optimistic," said Abu Dhabi Commercial Bank chief economist Monica Malik. "Further increases in the oil price are required if Saudi Arabia is to meet its medium-term fiscal objectives."

From 2018, Riyadh plans a string of revenue-raising steps. Energy and water price reforms are to raise a further 142 billion riyals annually by 2020; new taxes and fees, including a value-added tax, would bring in 110 billion riyals.

Those figures suggest, however, that recurring non-oil revenues in 2020 - excluding one-off items such as privatisation proceeds - would still be substantially less than oil revenues, leaving Riyadh vulnerable if oil prices stagnate or turn down.

"The variable that will determine the actual outcome over the medium term is the oil price," said Fabio Scacciavillani, chief economist at Oman Investment Fund. "A recovery is underway, but going forward it might not be a smooth ride." (Additional reporting by Davide Barbuscia; Editing by Janet Lawrence) ((andrew.torchia@thomsonreuters.com; +9715 6681 7277; Reuters Messaging: andrew.torchia.thomsonreuters.com@reuters.net))