PARIS — Global stocks and the euro gained Monday, after Greek opinion polls published over the weekend suggested that parties favoring the implementation of the country’s contested bailout agreement would be able to form a government after June 17 elections.


Four surveys published Sunday in Greek newspapers showed that the New Democracy party would again lead the anti-bailout Syriza party in the final results, The Associated Press reported, but that New Democracy would win enough seats in Parliament to create a coalition government with the Socialist Pasok party.


There is “relief in the markets given the opinion polls from Greece over the weekend,” Derek Halpenny, senior currency economist at Bank of Tokyo-Mitsubishi U.F.J. in London, wrote in a research note.


European Union leaders had long said there was no chance of Greece leaving the euro, but have now come to view that possibility as increasingly likely, as the June 17 election could bring a government that repudiates the country’s bailout agreements. That would set up an immediate crisis, as the government will run out of cash within weeks without new aid. The legal basis for any Greek exit is not clear, though, and it is possible that the country would muddle on as a euro member in some form.


In early trading, the Euro Stoxx 50 index, a barometer of euro zone blue chips, rose 0.7 percent, while the FTSE 100 index in London rose 0.8 percent. The Standard & Poor’s 500 index closed Friday down 0.2 percent.


For the year, global stocks remain in positive territory, with the M.S.C.I. World index up 0.5 percent through Friday.


Trading Monday was well below normal volume, as Wall Street was closed for Memorial Day, and many Europeans were celebrating the Pentecost holiday. And with the majority of equity trading now generated by the computer programs of big banks and investment funds, analysts caution against reading too much into daily stock moves as a reflection of market sentiment.


The dollar was mixed against most other major currencies. The euro rose to $1.2587 from $1.2517 late Friday in New York, and the British pound rose to $1.5695 from $1.5666. The dollar fell to 79.37 yen from 79.68 yen, and to 0.9555 Swiss francs from 0.9595 francs.


Even with Greece the main cause of concern, investors are keeping a wary eye on Spain, which is struggling to clear the bad loans in its banking sector after the collapse of the credit bubble. On Friday, the board of Bankia, the country’s biggest mortgage lender, called for a bailout of €23.5 billion, far beyond what the government estimated when it seized the bank and its portfolio of delinquent real estate loans.


Shares of Bankia, which were suspended Friday, fell 24 percent in Madrid.


Asian shares gained. The Tokyo benchmark Nikkei 225 stock average ticked up 0.2 percent. The Sydney market index S.&P./ASX 200 rose 0.6 percent. In Hong Kong, the Hang Seng index was up 1.6 percent in late trading.


Spanish bond prices fell. The yield on the 10-year Spanish government bond, which moves in the opposite direction of the price, rose 7 basis points to 6.34 percent. Equivalent Italian bond yields rose 5 basis points to 5.69 percent. A basis point is one-hundredth of a percent.