Applying algorithms to black swan events