def upper_bollinger_band(data, period, std_mult=<NUM_LIT>):
catch_errors.check_for_period_error(data, period)<EOL>period = int(period)<EOL>simple_ma = sma(data, period)[period-<NUM_LIT:1>:]<EOL>upper_bb = []<EOL>for idx in range(len(data) - period + <NUM_LIT:1>):<EOL><INDENT>std_dev = np.std(data[idx:idx + period])<EOL>upper_bb.append(simple_ma[idx] + std_dev * std_mult)<EOL><DEDENT>upper_bb = fill_for_noncomputable_vals(data, upper_bb)<EOL>return np.array(upper_bb)<EOL>
Upper Bollinger Band.

Formula:
u_bb = SMA(t) + STD(SMA(t-n:t)) * std_mult