Calm before storm? Stocks rally as Greece in crisis

Global stock markets were eerily calm on Friday as Greece teetered on the brink of default that could end with it exiting the euro zone.

European stocks markets were broadly higher, Japan's blue-chip Nikkei closed up almost 1 percent and U.S. stock futures pointed to further gains on Wall Street where the Nasdaq Composite index hit a record intraday high on Thursday.

This comes against a deepening crisis in Greece. Euro zone officials hold an emergency meeting on Monday after failing to reach a cash-for-reforms deal, while talk of capital controls has grown amid reports of a massive outflow of funds from the country in recent days.

Read MoreGreece talks fail; emergency summit called

"We're beyond the point of just talking and it looks like capital controls will have to be put in place," Craig Erlam, senior market analyst at currency trading firm OANDA, told CNBC.

"We have reached a tipping point and this is not a time to be optimistic in markets."

Analysts said the market resilience may be explained by a view that contagion risks from Greece are seen as lower than a few years ago thanks to measures taken by the European Central Bank as well as smaller countries such as Spain that have strengthened their banking systems.

"It could be that markets think there will be a deal at the last minute or that even if things were to tip over, contagion to the rest of system would be weaker than it was three years ago," Lutfey Siddiqi, global head of emerging markets at UBS, said on CNBC.

The second reason for the gains could be explained by the fact that Friday is a triple witching day, said analysts. This means that contracts for stock index futures, stock index options and stock options all expire on the same day and can lead to market volatility.

Read MoreLive Blog: Fears over Greece mount as talks collapse

"The fact that it is a triple witching day and we have the expiry of options is causing some strange moves in the markets," said OANDA's Erlam.

What's the big deal?

Athens is widely expected to default on a 1.5 billion euro debt payment to the International Monetary Fund on June 30 if it is unable to unlock further aid from its global lenders.

Christian Gattiker, chief strategist and head of research at Julius Baer told CNBC that Greek woes were priced into markets already as seen by the correction in the Dax index.

Germany's benchmark stock index is down more than 6 percent from a high hit above 12,000 in April.

Angelos Tzortzinis | AFP | Getty Images

"We had a correction in the Dax, so the uncertainty is in the price so the opportunity is there for a summer rally," Gattiker said.

Other analysts said markets were underestimating the risk of Greece leaving the euro zone – an event that would be unprecedented and could open the door to other members departing the 19-member single currency club.

"There is uncertainty because there is no structure in place for a Greek exit," Lothar Mentel, chief investment officer at Tatton Investment Management, told CNBC's "Squawk Box Europe."

"If there isn't an 11th hour solution then there is more downside to markets than currently priced in," he said.

In a sign that nervousness about Greece was gathering pace, the euro slipped to a three-week low against the dollar on Friday, while safe-haven government bonds in the U.S. and German saw their yields fall.

Oanda's Erlam said he would be watching the final hour of trade in stock markets closely since any sign of investors pulling out of long positions would reflect uncertainty over Greece heading into the weekend.