<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_balance_volume(close_data, volume):
 """ On Balance Volume. Formula: start = 1 if CLOSEt > CLOSEt-1 obv = obvt-1 + volumet elif CLOSEt < CLOSEt-1 obv = obvt-1 - volumet elif CLOSEt == CLOSTt-1 obv = obvt-1 """

    catch_errors.check_for_input_len_diff(close_data, volume)
    obv = np.zeros(len(volume))
    obv[0] = 1
    for idx in range(1, len(obv)):
        if close_data[idx] > close_data[idx-1]:
            obv[idx] = obv[idx-1] + volume[idx]
        elif close_data[idx] < close_data[idx-1]:
            obv[idx] = obv[idx-1] - volume[idx]
        elif close_data[idx] == close_data[idx-1]:
            obv[idx] = obv[idx-1]
    return obv