def chande_momentum_oscillator(close_data, period):
catch_errors.check_for_period_error(close_data, period)<EOL>close_data = np.array(close_data)<EOL>moving_period_diffs = [[(close_data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>][i] -<EOL>close_data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>][i-<NUM_LIT:1>]) for i in range(<NUM_LIT:1>, len(close_data[idx+<NUM_LIT:1>-period:idx+<NUM_LIT:1>]))] for idx in range(<NUM_LIT:0>, len(close_data))]<EOL>sum_up = []<EOL>sum_down = []<EOL>for period_diffs in moving_period_diffs:<EOL><INDENT>ups = [val if val > <NUM_LIT:0> else <NUM_LIT:0> for val in period_diffs]<EOL>sum_up.append(sum(ups))<EOL>downs = [abs(val) if val < <NUM_LIT:0> else <NUM_LIT:0> for val in period_diffs]<EOL>sum_down.append(sum(downs))<EOL><DEDENT>sum_up = np.array(sum_up)<EOL>sum_down = np.array(sum_down)<EOL>with warnings.catch_warnings():<EOL><INDENT>warnings.simplefilter("<STR_LIT:ignore>", category=RuntimeWarning)<EOL>cmo = <NUM_LIT:100> * ((sum_up - sum_down) / (sum_up + sum_down))<EOL><DEDENT>return cmo<EOL>
Chande Momentum Oscillator.

Formula:
cmo = 100 * ((sum_up - sum_down) / (sum_up + sum_down))