def moving_average_convergence_divergence(data, short_period, long_period):
catch_errors.check_for_period_error(data, short_period)<EOL>catch_errors.check_for_period_error(data, long_period)<EOL>macd = ema(data, short_period) - ema(data, long_period)<EOL>return macd<EOL>
Moving Average Convergence Divergence.

Formula:
EMA(DATA, P1) - EMA(DATA, P2)