def positive_volume_index(close_data, volume):
catch_errors.check_for_input_len_diff(close_data, volume)<EOL>pvi = np.zeros(len(volume))<EOL>pvi[<NUM_LIT:0>] = <NUM_LIT:1><EOL>for idx in range(<NUM_LIT:1>, len(volume)):<EOL><INDENT>if volume[idx] > volume[idx-<NUM_LIT:1>]:<EOL><INDENT>pvi[idx] = volume_index_helper(pvi, idx, close_data)<EOL><DEDENT>else:<EOL><INDENT>pvi[idx] = pvi[idx-<NUM_LIT:1>]<EOL><DEDENT><DEDENT>return pvi<EOL>
Positive Volume Index (PVI).

Formula:
PVI0 = 1
IF Vt > Vt-1
    PVIt = PVIt-1 + (CLOSEt - CLOSEt-1 / CLOSEt-1 * PVIt-1)
ELSE:
    PVIt = PVIt-1