def triple_exponential_moving_average(data, period):
catch_errors.check_for_period_error(data, period)<EOL>tema = ((<NUM_LIT:3> * ema(data, period) - (<NUM_LIT:3> * ema(ema(data, period), period))) +<EOL>ema(ema(ema(data, period), period), period)<EOL>)<EOL>return tema<EOL>
Triple Exponential Moving Average.

Formula:
TEMA = (3*EMA - 3*EMA(EMA)) + EMA(EMA(EMA))