protected function parseAmountNegativeFormat($amount) {
    // An amount wrapped in parentheses.
    $amount = preg_replace('/^\((.*?)\)$/', '-\\1', $amount);
    // An amount suffixed by a minus sign.
    $amount = preg_replace('/^(.*?)-$/', '-\\1', $amount);
    // Double minus signs.
    $amount = preg_replace('/--/', '', $amount);

    return $amount;
  }