Java program used to produce results, which are presented in the worthcomming paper "Preventing endogenous extreme events in herding dominant agent-based financial market" (A. Kononovicius, V. Gontis).