def get_max_draw_down(ts_vals):
    MDD = 0
    DD = 0
    peak = -99999
    for value in ts_vals:
        if (value > peak):
            peak = value
        else:
            DD = (peak - value) / peak
        if (DD > MDD):
            MDD = DD
    return -1*MDD
Ask YubiHSM to validate a YubiKey OTP using an AEAD and a key_handle to
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/QSTK/qstkutil/tsutil.py/get_max_draw_down--crossover with--dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/base.py/YHSM.validate_aead_otp