JERUSALEM, Nov 7 (Reuters) - A month on from the Oct. 7 attack by Hamas gunmen that killed 1,400 Israelis, investors are gradually returning to country's financial markets, warily accepting the descent into its worst security crisis in decades.

Although a significant weakening of the dollar over the last week has helped, Israel's shekel marked a remarkable comeback on Tuesday as it recouped the last of the 5% it lost in the days after last month's atrocities.

The country's stocks and bond prices have been clawing back ground too, although they and the main market gauges of risk aversion such as credit default swaps (CDS) are still flashing warning signs.

"The fact that the fighting is only in Gaza (for now) and not in the north is helping local investors to focus on the (economic) fundamentals," said Yaniv Pagot, head of trading at the Tel Aviv Stock Exchange.

Israel's response to the attacks, which included the abduction of more than 240 Israelis, has been an unrelenting air bombardment of the Hamas-run Gaza Strip, followed by a ground offensive.

The initial fear of many analysts was of it spilling into a more incendiary regional conflict involving Iran-backed Hezbollah in Lebanon, but so far the group has not waded in.

Israel's central bank has played its part too with a flurry of support measures, and has stayed away from rate cuts. It has acknowledged the economy will slow, but points out it was in solid shape prior to the war and should bounce back, as in past conflicts, if it eases.

"We have known how to recover from difficult periods in the past and to return rapidly to prosperity. I have no doubt that it will do so this time as well," the bank's Governor Amir Yaron said.

At the outset of the war, markets were stunned. The shekel, which had already shed 10% in 2023 partly on the government's contested plan to overhaul Israel's judiciary, tumbled 5% and reached an 11-year low.

The tide changed last week after Hezbollah signalled it was likely to stay on the sidelines for now and the U.S. Federal Reserve flagged that it might not need to raise interest rates again. That caused the dollar to wilt significantly.

"Market sentiment has been stabilising, and more broadly this is a dollar move," said Geoff Yu a senior FX and Macro strategist at BNY Mellon, referring to the fall in the greenback.

At the same time, Israel's central bank "has been seen as putting together a credible package (in reaction to the war's escalation)", he added, which has helped ease concerns about a major dive in the currency creating financial instability and fueling inflation.

MONEY RETURNS

Just two days into the war, the bank said it would sell up to $30 billion of foreign currency to defend the shekel and provide $15 billion of liquidity to the market via swap transactions.

Data shows it spent less than a third - $8.2 billion - of that pledge during October. It still has more than $190 billion of foreign exchange reserves at its disposal, and has executed $400 million of dollar-shekel swaps.

The shekel appreciated another 0.7% versus the dollar to move back to a pre-war level of 3.86 to the greenback on Tuesday.

The government's cost of borrowing, measured by the benchmark 10-year bond yield, has also fallen back to 4.22%, almost where it was before the attack and well below the 4.67% it peaked at in the aftermath.

MSCI's dollar-denominated Israel share index has recovered more than half of its initial losses too, and is down 6.3% compared to 15% lower in late October.

"The Bank of Israel took very aggressive action," said Gil Moshe, the head of markets at the Israel unit of U.S. bank Citi.

"Whenever (market) players are seeing that the liquidity is there, and the Bank of Israel is on top of things and willing to intervene whenever it's necessary, then they get more confident."

He noted that local bid-offer spreads have come right back in after initially widening when the worries hit.

Pagot said Israeli institutional investors who had moved money abroad earlier this year due to concerns about the judiciary system changes have now increased exposure to local stocks and bonds.

"Institutions are bringing money back home," he said. "They think the low shekel is an opportunity for investment."

Looking to next year, Shmuel Katzavian, a strategist at Israel's Discount Bank, expects the shekel to continue to strengthen. It has been falling for roughly two years as sentiment has weakened generally.

(Reporting by Steven Scheer in Jerusalem and Marc Jones in London; Editing by Jan Harvey)