def OBV(df, close='Close', volume='Volume'):
    """
    On Balance Volume
    Returns: list of floats = jhta.OBV(df, close='Close', volume='Volume')
    Source: https://www.fmlabs.com/reference/default.htm?url=OBV.htm
    """
    obv_list = []
    for i in range(len(df[close])):
        obv = 0
        if i > 0:
            if df[close][i] > df[close][i - 1]:
                obv = obv_list[i - 1] + df[volume][i]
            elif df[close][i] < df[close][i - 1]:
                obv = obv_list[i - 1] - df[volume][i]
            else:
                obv = obv_list[i - 1]
        obv_list.append(obv)
    return obv_list
