* Japan's ruling coalition wins upper house majority * Result broadly in line with expectations * Euro rises to one-month high vs dollar By Gertrude Chavez-Dreyfuss NEW YORK, July 22 (Reuters) - The yen rose against the dollar for the first time in four sessions on Monday after Japanese Prime Minister Shinzo Abe won a widely expected victory in elections for parliament's upper house. Investors had already priced in Abe's victory and had sold the yen against the dollar ahead of the outcome, and market participants locked in profits as a result. The victory represents a rare bout of political stability in Japan and strengthens the mandate for Abe's reflationary policies. The euro, meanwhile, rose to a one-month high versus the dollar after Portuguese President Anibal Cavaco Silva said the current government will stay in office to keep an international bailout on track. But it was the yen that grabbed the headlines in the currency market. Although Abe's victory affirmed Japan's aggressive monetary easing, some analysts said that at this point, there is not much the government can do to stimulate the economy. "Primarily, the yen's rise against the dollar was a buy-the-rumor, sell-the-fact kind of thing," said Vassili Serebriakov, currency strategist at BNP Paribas in New York. "But at the end of the day, Japan can only do so much to lift its economy, and the dollar's upside could be limited." In late afternoon trading, the dollar was down 1.1 percent at 99.53 yen, closer to the session low of 99.28 than the session peak of 100.71 yen. Volume on the pair totaled around $1.7 billion on the Reuters trading platform. The dollar, however, was still up around 15 percent versus the yen for the year as the Bank of Japan opted for unprecedented monetary stimulus to jump-start the economy. The yen remains the worst-performing currency year to date of the 36 most active currencies traded against the dollar, using Reuters data. The euro also fell against the yen, to 131.22 yen, down 0.6 percent, having risen to a two-month high of 132.43 earlier. Still, many investors view the yen's bounce as temporary with a dip in the dollar seen as a buying opportunity, traders said. Speculators remained long the dollar against the yen going into the election and that was not forecast to change after Abe's win. Analysts said the election result would also increase Japanese investor conviction about the success of Abe's reforms, potentially driving them to seek higher yields overseas. With the focus on the Japanese election now over, attention will turn back to the United States and the direction of the dollar against the yen for the rest of the week will likely be driven by U.S. economic data, said Boris Schlossberg, managing director of FX Strategy at BK Asset Management in New York. The dollar earlier extended losses against the yen after data showed U.S. existing home sales for June fell 1.2 percent rather than the 0.6 gain expected. But a surge in prices to a five-year high suggested the housing market recovery remained on course. "We find ourselves in an environment where sub-par numbers on U.S. activity and inflation are being viewed as a positive for risk appetite, as they further postpone an eventual withdrawal of liquidity by the Fed," said Samarjit Shankar, director of market strategy at BNY Mellon in Boston. Most riskier currencies rallied on Monday, with the Australian and New Zealand dollars as well as sterling up on the day. The euro was up 0.3 percent at $1.3186, after earlier rising to a one-month high of $1.3218, with investors relieved by a drop in Portuguese bond yields. Turnover on the euro/dollar pair was $3.7 billion on the Reuters FX platform.