from functools import reduce
import math


def get_compound_rate(yearly_returns):
    """
    Computes the geometric average aka compound average rate of return.
    """
    if not yearly_returns:
        return 0.0
    count = float(len(yearly_returns))
    l = [1.0 + (x/100.0) for x in yearly_returns]
    p = reduce(lambda x,y : x * y, l)
    return ( math.pow(p, 1.0/count)-1.0 ) * 100.0