We develop an optimization model for risk management in a virtual enterprise environment based on a novel multiswarm particle swarm optimizer called (PSO)-O-2. The main idea of (PSO)-O-2 is to extend the single population PSO to the interacting multiswarms model by constructing hierarchical interaction topology and enhanced dynamical update equations. With the hierarchical interaction topology, a suitable diversity in the whole population can be maintained. At the same time, the enhanced dynamical update rule significantly speeds up the multiswarm to converge to the global optimum. With five mathematical benchmark functions, (PSO)-O-2 is proved to have considerable potential for solving complex optimization problems. (PSO)-O-2 is then applied to risk management in a virtual enterprise environment. Simulation results demonstrate that the (PSO)-O-2 algorithm is more feasible and efficient than the PSO algorithm in solving this real-world problem.