from functools import reduce


def geo_mean(returns):
    """
    quickly calculate the geometric mean of a series
    :param returns: the data to calc the mean
    :return: the geometric mean
    """
    return (reduce(lambda x, y: x * y, returns)) ** (1.0 / len(returns))