The New York Stock Exchange signed an agreement with the Soviet Union to help train Soviets and provide other assistance as the country struggles to establish a market economy.

The agreement was signed Wednesday at the end of a three-day financial market seminar that drew 22 NYSE officials and top American financial experts."The road will be painful and difficult," Finance Minister Valentin Pavlov told the closing session of the seminar for 400 Soviet officials and budding entrepreneurs. "We are glad as we begin this road that we have such good assistance."

The agreement signed by Pavlov and NYSE Chairman John Phelan called for continued American assistance as the Soviets attempt to set up financial markets and move away from a centrally planned economy.

Phelan said details of the exchanges were not set but added Soviet specialists would likely travel to the United States for training at the stock exchange and affiliated firms.

The Moscow seminar included lectures on fundamentals such as the difference between stocks and bonds, and practical matters such as accounting procedures and regulations. But Soviet and American participants cautioned it would be some time before the Soviet Union was ready to establish an exchange.