def momentum(data, period):
catch_errors.check_for_period_error(data, period)<EOL>momentum = [data[idx] - data[idx+<NUM_LIT:1>-period] for idx in range(period-<NUM_LIT:1>, len(data))]<EOL>momentum = fill_for_noncomputable_vals(data, momentum)<EOL>return momentum<EOL>
Momentum.

Formula:
DATA[i] - DATA[i - period]