def percent_k(data, period):
catch_errors.check_for_period_error(data, period)<EOL>percent_k = [((data[idx] - np.min(data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>])) /<EOL>(np.max(data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>]) -<EOL>np.min(data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>]))) for idx in range(period-<NUM_LIT:1>, len(data))]<EOL>percent_k = fill_for_noncomputable_vals(data, percent_k)<EOL>return percent_k<EOL>
%K.

Formula:
%k = data(t) - low(n) / (high(n) - low(n))