def ema(data, period=10):
    """
        [Description] : Utility method to calculate exponential moving averages over a period.
    """
    result = [0] * len(data)
    for i, j in enumerate(data):
        if i < period - 1:
            result[i] = 0
        elif i == period - 1:
            result[i] = sum(data[:period]) / period
        else:
            result[i] = j * 2 / (period + 1) + result[i - 1] * (1 - 2 / (
                period + 1))
    return result
