The Song dynasty had one of the most prosperous and advanced economies in the medieval world. Song Chinese invested their funds in joint stock companies and in multiple sailing vessels at a time when monetary gain was assured from the vigorous overseas trade and domestic trade along the Grand Canal and Yangtze River. Prominent merchant families and private businesses were allowed to occupy industries that were not already government-operated monopolies. Both private and government-controlled industries met the needs of a growing Chinese population in the Song. Artisans and merchants formed guilds that the state had to deal with when assessing taxes, requisitioning goods, and setting standard workers' wages and prices on goods.