def stddev_from_moving_average(timeseries):
    series = pandas.Series([x[1] for x in timeseries])
    expAverage = pandas.stats.moments.ewma(series, com=50)
    stdDev = pandas.stats.moments.ewmstd(series, com=50)

    return abs(series.iget(-1) - expAverage.iget(-1)) > 3 * stdDev.iget(-1)
A timeseries is anomalous if the absolute value of the average of the latest
dataset/ETHPy150Open etsy/skyline/src/analyzer/algorithms.py/stddev_from_moving_average