malee/_malee.py
def gm(rors):
    """The Geometric Mean is the average of a set of products,
    the calculation of which is commonly used to determine the
    performance results of an investment or portfolio. It is
    technically defined as "the nth root product of n numbers."

    Args:
        rors: List of all rors over multiple time periods

    Returns:
        The Geometric Mean of a list of returns

    Example:
        By providing a list of returns you can calculate
        the Geometric Mean of the given list:

        >>> import malee
        >>> malee.gm([.14, .06, -.05, .20])
        0.08337520558323552
    """
    total = 1
    n = len(rors)
    for ror in rors:
        total *= 1 + ror
    return total ** (1 / n) - 1
The Geometric Mean is the average of a set of products,
    the calculation of which is commonly used to determine the
    performance results of an investment or portfolio. It is
    technically defined as "the nth root product of n numbers."

    Args:
        rors: List of all rors over multiple time periods

    Returns:
        The Geometric Mean of a list of returns

    Example:
        By providing a list of returns you can calculate
        the Geometric Mean of the given list:

        >>> import malee
        >>> malee.gm([.14, .06, -.05, .20])
        0.08337520558323552
    
The Geometric Mean is the average of a set of products,
the calculation of which is commonly used to determine the
performance results of an investment or portfolio. It is
technically defined as "the nth root product of n numbers."
The Geometric Mean is the average of a set of products the calculation of which is commonly used to determine the performance results of an investment or portfolio . It is technically defined as " the nth root product of n numbers . "
def gm(rors):
    total = 1
    n = len(rors)
    for ror in rors:
        total *= 1 + ror
    return total ** (1 / n) - 1
def gm ( rors ) : total = 1 n = len ( rors ) for ror in rors : total *= 1 + ror return total ** ( 1 / n ) - 1
The Geometric Mean is the average of a set of products,
the calculation of which is commonly used to determine the
performance results of an investment or portfolio.
The Geometric Mean is the average of a set of products the calculation of which is commonly used to determine the performance results of an investment or portfolio .
"""The Geometric Mean is the average of a set of products,
    the calculation of which is commonly used to determine the
    performance results of an investment or portfolio. It is
    technically defined as "the nth root product of n numbers."

    Args:
        rors: List of all rors over multiple time periods

    Returns:
        The Geometric Mean of a list of returns

    Example:
        By providing a list of returns you can calculate
        the Geometric Mean of the given list:

        >>> import malee
        >>> malee.gm([.14, .06, -.05, .20])
        0.08337520558323552
    """
The Geometric Mean of a list of returns
The Geometric Mean of a list of returns
rors
List of all rors over multiple time periods
List of all rors over multiple time periods
examples
By providing a list of returns you can calculate
the Geometric Mean of the given list.


By providing a list of returns you can calculate the Geometric Mean of the given list .