Markets sold off quite sharply on Monday in response to the developments in Greece last weekend. Investors had just learned that Greece's stock market and banks would be closed for the week, and capital controls would begin with a 60 euro-limit on ATM withdrawals. The euro tanked, and US stocks had their worst single day in several months, with the Dow plunging 350 points, the S&P falling more than 2%, and both indexes going red for the year. In a note Thursday, UBS' Ramin Nakisa analyzed the global stock markets most sensitive, in the short term, to the Greek debt situation: "We compare Greece risk sensitivity in two ways (i) the "shock" response to the weekend referendum announcement and (ii) beta found by regressing asset returns against peripheral spread during [the] 2012 [sovereign debt crisis.] Amongst equity indices the surprise was that some EM countries such as India and Russia were only weakly correlated with European woes and offered some diversification. European sectors that held up best were the standard defensives such as Health Care and Consumer Goods but not Utilities. In FX betas were generally low but [the Japanese Yen] and, more surprisingly, [Korean Won] offered the best protection against a peripheral spread widening." As the chart below shows, stocks in Portugal, Italy and Spain – or those closest to the crisis – suffered the worst losses. UBS analysts think there is a 40% chance that Greece exits the euro. At this point, a Grexit is possibly the worst-case outcome of a "No" vote in Sunday's referendum, where Greeks will decide whether the government should accept a set of conditions that creditors have proposed for emergency loans. And so, with a less than 50% chance of a Grexit in UBS' view, the debt crisis creates an "attractive entry point" for European stocks, Nakisa wrote. Here's Nakisa's chart showing the global stock market reaction this week. Vietnam was the big outlier because its government removed a ceiling on foreign investment for most local shares. Whichever way the vote swings on Sunday, the market reaction next week will certainly be something to watch closely.SEE ALSO: This 5,000-year trend in interest rates shows why Greece, China, and Puerto Rico won't cause a global recession Join the conversation about this story » NOW WATCH: 6 mind-blowing facts about Greece's economy